@smoothbuilder/smoothagent-agent-server 0.3.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (416) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/bytes-HBD44S56.js +8 -0
  3. package/dist/bytes-HBD44S56.js.map +7 -0
  4. package/dist/{chunk-C64SPUFX.js → chunk-IZAPYKOR.js} +5943 -11537
  5. package/dist/chunk-IZAPYKOR.js.map +7 -0
  6. package/dist/{client-CN6PRCWE.js → client-TQOOMRH6.js} +6 -24
  7. package/dist/client-TQOOMRH6.js.map +7 -0
  8. package/dist/dashboard.js +1 -1
  9. package/dist/index.js +1 -1
  10. package/dist/types/sdk/generated/ts-client/api/errors/BadGatewayError.d.ts +2 -2
  11. package/dist/types/sdk/generated/ts-client/api/errors/BadRequestError.d.ts +2 -2
  12. package/dist/types/sdk/generated/ts-client/api/errors/ConflictError.d.ts +2 -2
  13. package/dist/types/sdk/generated/ts-client/api/errors/FailedDependencyError.d.ts +2 -2
  14. package/dist/types/sdk/generated/ts-client/api/errors/ForbiddenError.d.ts +2 -2
  15. package/dist/types/sdk/generated/ts-client/api/errors/GoneError.d.ts +2 -2
  16. package/dist/types/sdk/generated/ts-client/api/errors/InternalServerError.d.ts +2 -2
  17. package/dist/types/sdk/generated/ts-client/api/errors/NotFoundError.d.ts +2 -2
  18. package/dist/types/sdk/generated/ts-client/api/errors/PaymentRequiredError.d.ts +2 -2
  19. package/dist/types/sdk/generated/ts-client/api/errors/ServiceUnavailableError.d.ts +2 -2
  20. package/dist/types/sdk/generated/ts-client/api/errors/TooManyRequestsError.d.ts +2 -2
  21. package/dist/types/sdk/generated/ts-client/api/errors/UnauthorizedError.d.ts +2 -2
  22. package/dist/types/sdk/generated/ts-client/api/errors/UnprocessableEntityError.d.ts +2 -2
  23. package/dist/types/sdk/generated/ts-client/api/resources/agents/types/AgentsGetResponse.d.ts +1 -1
  24. package/dist/types/sdk/generated/ts-client/api/resources/agents/types/AgentsListResponse.d.ts +1 -1
  25. package/dist/types/sdk/generated/ts-client/api/resources/chats/client/requests/ChatsEventsRequest.d.ts +1 -1
  26. package/dist/types/sdk/generated/ts-client/api/resources/chats/client/requests/ChatsHistoryRequest.d.ts +1 -1
  27. package/dist/types/sdk/generated/ts-client/api/resources/chats/client/requests/ChatsUpdateRequest.d.ts +1 -1
  28. package/dist/types/sdk/generated/ts-client/api/resources/chats/client/requests/CreateChat.d.ts +1 -1
  29. package/dist/types/sdk/generated/ts-client/api/resources/chats/client/requests/EditQueuedChatsRequest.d.ts +1 -1
  30. package/dist/types/sdk/generated/ts-client/api/resources/chats/client/requests/SendMessage.d.ts +2 -2
  31. package/dist/types/sdk/generated/ts-client/api/resources/chats/client/requests/SwitchAgent.d.ts +6 -4
  32. package/dist/types/sdk/generated/ts-client/api/resources/chats/types/ChatBoxListTasksResponse.d.ts +1 -1
  33. package/dist/types/sdk/generated/ts-client/api/resources/chats/types/ChatsEventsRequestAccept.d.ts +1 -1
  34. package/dist/types/sdk/generated/ts-client/api/resources/chats/types/ChatsHistoryRequestAnchor.d.ts +1 -1
  35. package/dist/types/sdk/generated/ts-client/api/resources/chats/types/ChatsListResponse.d.ts +1 -1
  36. package/dist/types/sdk/generated/ts-client/api/resources/chats/types/ChatsRunsResponse.d.ts +1 -1
  37. package/dist/types/sdk/generated/ts-client/api/resources/chats/types/ChatsSendResponse.d.ts +1 -1
  38. package/dist/types/sdk/generated/ts-client/api/resources/files/client/requests/FilesUploadRequest.d.ts +1 -1
  39. package/dist/types/sdk/generated/ts-client/api/resources/files/types/CreateUploadFilesResponse.d.ts +1 -1
  40. package/dist/types/sdk/generated/ts-client/api/resources/identity/client/requests/MeFeedRequest.d.ts +1 -1
  41. package/dist/types/sdk/generated/ts-client/api/resources/identity/types/MeFeedRequestAccept.d.ts +1 -1
  42. package/dist/types/sdk/generated/ts-client/api/resources/identity/types/MeWhoamiResponse.d.ts +1 -1
  43. package/dist/types/sdk/generated/ts-client/api/resources/index.d.ts +6 -6
  44. package/dist/types/sdk/generated/ts-client/api/resources/machines/types/MachinesListResponse.d.ts +1 -1
  45. package/dist/types/sdk/generated/ts-client/api/resources/providers/client/requests/MyProvidersConnectRequest.d.ts +1 -1
  46. package/dist/types/sdk/generated/ts-client/api/resources/providers/client/requests/MyProvidersDisconnectRequest.d.ts +1 -1
  47. package/dist/types/sdk/generated/ts-client/api/resources/providers/client/requests/MyProvidersLimitsRequest.d.ts +1 -1
  48. package/dist/types/sdk/generated/ts-client/api/resources/providers/client/requests/MyProvidersSetKeyRequest.d.ts +1 -1
  49. package/dist/types/sdk/generated/ts-client/api/resources/providers/types/MyProvidersConnectResponse.d.ts +1 -1
  50. package/dist/types/sdk/generated/ts-client/api/resources/providers/types/MyProvidersDisconnectRequestVia.d.ts +1 -1
  51. package/dist/types/sdk/generated/ts-client/api/resources/providers/types/MyProvidersListResponse.d.ts +1 -1
  52. package/dist/types/sdk/generated/ts-client/api/types/Agent.d.ts +2 -2
  53. package/dist/types/sdk/generated/ts-client/api/types/AgentHooks.d.ts +7 -1
  54. package/dist/types/sdk/generated/ts-client/api/types/AgentLimits.d.ts +1 -1
  55. package/dist/types/sdk/generated/ts-client/api/types/AgentMessageOrigin.d.ts +1 -1
  56. package/dist/types/sdk/generated/ts-client/api/types/AgentProviderOption.d.ts +1 -1
  57. package/dist/types/sdk/generated/ts-client/api/types/AgentPublic.d.ts +1 -1
  58. package/dist/types/sdk/generated/ts-client/api/types/BoxFileContent.d.ts +1 -1
  59. package/dist/types/sdk/generated/ts-client/api/types/BoxFileEntry.d.ts +2 -2
  60. package/dist/types/sdk/generated/ts-client/api/types/BoxFileList.d.ts +1 -1
  61. package/dist/types/sdk/generated/ts-client/api/types/BoxProfile.d.ts +2 -0
  62. package/dist/types/sdk/generated/ts-client/api/types/Chat.d.ts +2 -2
  63. package/dist/types/sdk/generated/ts-client/api/types/ChatContext.d.ts +1 -1
  64. package/dist/types/sdk/generated/ts-client/api/types/ChatDeleted.d.ts +1 -1
  65. package/dist/types/sdk/generated/ts-client/api/types/ChatSelection.d.ts +2 -2
  66. package/dist/types/sdk/generated/ts-client/api/types/ChatTask.d.ts +3 -3
  67. package/dist/types/sdk/generated/ts-client/api/types/ChatUsage.d.ts +1 -1
  68. package/dist/types/sdk/generated/ts-client/api/types/DeviceFlow.d.ts +1 -1
  69. package/dist/types/sdk/generated/ts-client/api/types/ErrorBody.d.ts +1 -1
  70. package/dist/types/sdk/generated/ts-client/api/types/Error_.d.ts +1 -1
  71. package/dist/types/sdk/generated/ts-client/api/types/EventRange.d.ts +1 -1
  72. package/dist/types/sdk/generated/ts-client/api/types/EventsAgentSelection.d.ts +1 -1
  73. package/dist/types/sdk/generated/ts-client/api/types/EventsApprovalOption.d.ts +1 -1
  74. package/dist/types/sdk/generated/ts-client/api/types/EventsCapabilities.d.ts +9 -9
  75. package/dist/types/sdk/generated/ts-client/api/types/EventsContentFile.d.ts +1 -1
  76. package/dist/types/sdk/generated/ts-client/api/types/EventsContentImage.d.ts +1 -1
  77. package/dist/types/sdk/generated/ts-client/api/types/EventsContentPart.d.ts +1 -1
  78. package/dist/types/sdk/generated/ts-client/api/types/EventsDelta.d.ts +1 -1
  79. package/dist/types/sdk/generated/ts-client/api/types/EventsEAgentSwitchFailed.d.ts +1 -1
  80. package/dist/types/sdk/generated/ts-client/api/types/EventsEAgentSwitchFailedData.d.ts +1 -1
  81. package/dist/types/sdk/generated/ts-client/api/types/EventsEAgentSwitched.d.ts +1 -1
  82. package/dist/types/sdk/generated/ts-client/api/types/EventsEAgentSwitchedData.d.ts +1 -1
  83. package/dist/types/sdk/generated/ts-client/api/types/EventsEChatState.d.ts +1 -1
  84. package/dist/types/sdk/generated/ts-client/api/types/EventsEChatStateData.d.ts +1 -1
  85. package/dist/types/sdk/generated/ts-client/api/types/EventsEContextUpdated.d.ts +1 -1
  86. package/dist/types/sdk/generated/ts-client/api/types/EventsEContextUpdatedData.d.ts +1 -1
  87. package/dist/types/sdk/generated/ts-client/api/types/EventsEError.d.ts +1 -1
  88. package/dist/types/sdk/generated/ts-client/api/types/EventsEErrorData.d.ts +1 -1
  89. package/dist/types/sdk/generated/ts-client/api/types/EventsEItemCompleted.d.ts +1 -1
  90. package/dist/types/sdk/generated/ts-client/api/types/EventsEItemCompletedData.d.ts +1 -1
  91. package/dist/types/sdk/generated/ts-client/api/types/EventsEItemDelta.d.ts +1 -1
  92. package/dist/types/sdk/generated/ts-client/api/types/EventsEItemDeltaData.d.ts +1 -1
  93. package/dist/types/sdk/generated/ts-client/api/types/EventsEItemRetracted.d.ts +1 -1
  94. package/dist/types/sdk/generated/ts-client/api/types/EventsEItemRetractedData.d.ts +2 -2
  95. package/dist/types/sdk/generated/ts-client/api/types/EventsEItemStarted.d.ts +1 -1
  96. package/dist/types/sdk/generated/ts-client/api/types/EventsEItemStartedData.d.ts +1 -1
  97. package/dist/types/sdk/generated/ts-client/api/types/EventsEItemUpdated.d.ts +1 -1
  98. package/dist/types/sdk/generated/ts-client/api/types/EventsELimitsUpdated.d.ts +1 -1
  99. package/dist/types/sdk/generated/ts-client/api/types/EventsENotice.d.ts +1 -1
  100. package/dist/types/sdk/generated/ts-client/api/types/EventsENoticeData.d.ts +1 -1
  101. package/dist/types/sdk/generated/ts-client/api/types/EventsERunCompleted.d.ts +1 -1
  102. package/dist/types/sdk/generated/ts-client/api/types/EventsERunCompletedData.d.ts +2 -2
  103. package/dist/types/sdk/generated/ts-client/api/types/EventsERunStarted.d.ts +1 -1
  104. package/dist/types/sdk/generated/ts-client/api/types/EventsERunStartedData.d.ts +2 -2
  105. package/dist/types/sdk/generated/ts-client/api/types/EventsERunWaiting.d.ts +1 -1
  106. package/dist/types/sdk/generated/ts-client/api/types/EventsERunWaitingData.d.ts +2 -2
  107. package/dist/types/sdk/generated/ts-client/api/types/EventsESessionStarted.d.ts +1 -1
  108. package/dist/types/sdk/generated/ts-client/api/types/EventsESessionStartedData.d.ts +2 -2
  109. package/dist/types/sdk/generated/ts-client/api/types/EventsETaskUpdated.d.ts +1 -1
  110. package/dist/types/sdk/generated/ts-client/api/types/EventsETaskUpdatedData.d.ts +1 -1
  111. package/dist/types/sdk/generated/ts-client/api/types/EventsEUsageUpdated.d.ts +1 -1
  112. package/dist/types/sdk/generated/ts-client/api/types/EventsEUsageUpdatedData.d.ts +1 -1
  113. package/dist/types/sdk/generated/ts-client/api/types/EventsErrorCode.d.ts +1 -1
  114. package/dist/types/sdk/generated/ts-client/api/types/EventsEvent.d.ts +1 -1
  115. package/dist/types/sdk/generated/ts-client/api/types/EventsFailure.d.ts +1 -1
  116. package/dist/types/sdk/generated/ts-client/api/types/EventsFailureReason.d.ts +1 -1
  117. package/dist/types/sdk/generated/ts-client/api/types/EventsHandoffInjected.d.ts +1 -1
  118. package/dist/types/sdk/generated/ts-client/api/types/EventsHandoffLost.d.ts +1 -1
  119. package/dist/types/sdk/generated/ts-client/api/types/EventsInboxEntry.d.ts +5 -5
  120. package/dist/types/sdk/generated/ts-client/api/types/EventsInboxState.d.ts +2 -2
  121. package/dist/types/sdk/generated/ts-client/api/types/EventsItem.d.ts +1 -1
  122. package/dist/types/sdk/generated/ts-client/api/types/EventsItemApproval.d.ts +3 -3
  123. package/dist/types/sdk/generated/ts-client/api/types/EventsItemCommand.d.ts +2 -2
  124. package/dist/types/sdk/generated/ts-client/api/types/EventsItemCompaction.d.ts +3 -3
  125. package/dist/types/sdk/generated/ts-client/api/types/EventsItemError.d.ts +2 -2
  126. package/dist/types/sdk/generated/ts-client/api/types/EventsItemFileChange.d.ts +3 -3
  127. package/dist/types/sdk/generated/ts-client/api/types/EventsItemFileSearch.d.ts +2 -2
  128. package/dist/types/sdk/generated/ts-client/api/types/EventsItemHandoff.d.ts +4 -4
  129. package/dist/types/sdk/generated/ts-client/api/types/EventsItemHook.d.ts +2 -2
  130. package/dist/types/sdk/generated/ts-client/api/types/EventsItemNotification.d.ts +3 -3
  131. package/dist/types/sdk/generated/ts-client/api/types/EventsItemPlan.d.ts +3 -3
  132. package/dist/types/sdk/generated/ts-client/api/types/EventsItemProposedPlan.d.ts +2 -2
  133. package/dist/types/sdk/generated/ts-client/api/types/EventsItemQuestion.d.ts +2 -2
  134. package/dist/types/sdk/generated/ts-client/api/types/EventsItemReasoning.d.ts +2 -2
  135. package/dist/types/sdk/generated/ts-client/api/types/EventsItemSubagent.d.ts +2 -2
  136. package/dist/types/sdk/generated/ts-client/api/types/EventsItemText.d.ts +3 -3
  137. package/dist/types/sdk/generated/ts-client/api/types/EventsItemTimer.d.ts +2 -2
  138. package/dist/types/sdk/generated/ts-client/api/types/EventsItemToolCall.d.ts +3 -3
  139. package/dist/types/sdk/generated/ts-client/api/types/EventsItemUserMessage.d.ts +4 -4
  140. package/dist/types/sdk/generated/ts-client/api/types/EventsItemWebSearch.d.ts +3 -3
  141. package/dist/types/sdk/generated/ts-client/api/types/EventsLimitWindow.d.ts +2 -2
  142. package/dist/types/sdk/generated/ts-client/api/types/EventsLimits.d.ts +2 -2
  143. package/dist/types/sdk/generated/ts-client/api/types/EventsNativeRef.d.ts +1 -1
  144. package/dist/types/sdk/generated/ts-client/api/types/EventsOrigin.d.ts +2 -2
  145. package/dist/types/sdk/generated/ts-client/api/types/EventsRawFrame.d.ts +2 -2
  146. package/dist/types/sdk/generated/ts-client/api/types/EventsRunAgent.d.ts +2 -2
  147. package/dist/types/sdk/generated/ts-client/api/types/EventsRunTrigger.d.ts +2 -2
  148. package/dist/types/sdk/generated/ts-client/api/types/EventsScheduledSwitch.d.ts +1 -1
  149. package/dist/types/sdk/generated/ts-client/api/types/EventsTask.d.ts +3 -3
  150. package/dist/types/sdk/generated/ts-client/api/types/EventsToolOutput.d.ts +1 -1
  151. package/dist/types/sdk/generated/ts-client/api/types/EventsUsage.d.ts +1 -1
  152. package/dist/types/sdk/generated/ts-client/api/types/FileObject.d.ts +2 -2
  153. package/dist/types/sdk/generated/ts-client/api/types/HistoryEntry.d.ts +1 -1
  154. package/dist/types/sdk/generated/ts-client/api/types/HistoryPage.d.ts +1 -1
  155. package/dist/types/sdk/generated/ts-client/api/types/LoginStatus.d.ts +2 -2
  156. package/dist/types/sdk/generated/ts-client/api/types/Machine.d.ts +3 -3
  157. package/dist/types/sdk/generated/ts-client/api/types/MessageReceipt.d.ts +1 -1
  158. package/dist/types/sdk/generated/ts-client/api/types/MyProviderStatus.d.ts +4 -4
  159. package/dist/types/sdk/generated/ts-client/api/types/OAuthFlow.d.ts +1 -1
  160. package/dist/types/sdk/generated/ts-client/api/types/Pairing.d.ts +2 -2
  161. package/dist/types/sdk/generated/ts-client/api/types/Placement.d.ts +2 -2
  162. package/dist/types/sdk/generated/ts-client/api/types/PreTurnHook.d.ts +1 -1
  163. package/dist/types/sdk/generated/ts-client/api/types/Principal.d.ts +2 -2
  164. package/dist/types/sdk/generated/ts-client/api/types/ProviderKind.d.ts +1 -1
  165. package/dist/types/sdk/generated/ts-client/api/types/ProviderLimits.d.ts +2 -2
  166. package/dist/types/sdk/generated/ts-client/api/types/ProviderStatus.d.ts +4 -4
  167. package/dist/types/sdk/generated/ts-client/api/types/RunSummary.d.ts +2 -2
  168. package/dist/types/sdk/generated/ts-client/api/types/Scope.d.ts +1 -1
  169. package/dist/types/sdk/generated/ts-client/api/types/SwitchResult.d.ts +2 -2
  170. package/dist/types/sdk/generated/ts-client/api/types/ToolPrincipal.d.ts +3 -3
  171. package/dist/types/sdk/generated/ts-client/api/types/index.d.ts +1 -1
  172. package/dist/types/sdk/generated/ts-client/core/runtime/index.d.ts +1 -1
  173. package/dist/types/sdk/generated/ts-client/core/stream/Stream.d.ts +1 -1
  174. package/dist/types/sdk/generated/ts-client/core/stream/index.d.ts +1 -1
  175. package/dist/types/sdk/generated/ts-client/core/url/index.d.ts +1 -1
  176. package/dist/types/sdk/generated/ts-client/errors/SmoothAgentApiError.d.ts +2 -2
  177. package/dist/types/sdk/generated/ts-server/BaseClient.d.ts +2 -2
  178. package/dist/types/sdk/generated/ts-server/api/errors/BadGatewayError.d.ts +2 -2
  179. package/dist/types/sdk/generated/ts-server/api/errors/BadRequestError.d.ts +2 -2
  180. package/dist/types/sdk/generated/ts-server/api/errors/ConflictError.d.ts +2 -2
  181. package/dist/types/sdk/generated/ts-server/api/errors/FailedDependencyError.d.ts +2 -2
  182. package/dist/types/sdk/generated/ts-server/api/errors/ForbiddenError.d.ts +2 -2
  183. package/dist/types/sdk/generated/ts-server/api/errors/GoneError.d.ts +2 -2
  184. package/dist/types/sdk/generated/ts-server/api/errors/InternalServerError.d.ts +2 -2
  185. package/dist/types/sdk/generated/ts-server/api/errors/NotFoundError.d.ts +2 -2
  186. package/dist/types/sdk/generated/ts-server/api/errors/PaymentRequiredError.d.ts +2 -2
  187. package/dist/types/sdk/generated/ts-server/api/errors/ServiceUnavailableError.d.ts +2 -2
  188. package/dist/types/sdk/generated/ts-server/api/errors/TooManyRequestsError.d.ts +2 -2
  189. package/dist/types/sdk/generated/ts-server/api/errors/UnauthorizedError.d.ts +2 -2
  190. package/dist/types/sdk/generated/ts-server/api/errors/UnprocessableEntityError.d.ts +2 -2
  191. package/dist/types/sdk/generated/ts-server/api/resources/agents/client/requests/AgentConfig.d.ts +2 -2
  192. package/dist/types/sdk/generated/ts-server/api/resources/agents/client/requests/AgentConfigMergePatchUpdate.d.ts +2 -2
  193. package/dist/types/sdk/generated/ts-server/api/resources/agents/types/AgentsEmbedResponse.d.ts +1 -1
  194. package/dist/types/sdk/generated/ts-server/api/resources/agents/types/AgentsGetResponse.d.ts +1 -1
  195. package/dist/types/sdk/generated/ts-server/api/resources/agents/types/AgentsListResponse.d.ts +1 -1
  196. package/dist/types/sdk/generated/ts-server/api/resources/billing/client/requests/UsageGetRequest.d.ts +1 -1
  197. package/dist/types/sdk/generated/ts-server/api/resources/billing/types/UsageGetRequestGroupBy.d.ts +1 -1
  198. package/dist/types/sdk/generated/ts-server/api/resources/billing/types/UsageGetResponse.d.ts +1 -1
  199. package/dist/types/sdk/generated/ts-server/api/resources/chats/client/requests/ChatsEventsRequest.d.ts +1 -1
  200. package/dist/types/sdk/generated/ts-server/api/resources/chats/client/requests/ChatsHistoryRequest.d.ts +1 -1
  201. package/dist/types/sdk/generated/ts-server/api/resources/chats/client/requests/ChatsUpdateRequest.d.ts +1 -1
  202. package/dist/types/sdk/generated/ts-server/api/resources/chats/client/requests/CreateChat.d.ts +1 -1
  203. package/dist/types/sdk/generated/ts-server/api/resources/chats/client/requests/EditQueuedChatsRequest.d.ts +1 -1
  204. package/dist/types/sdk/generated/ts-server/api/resources/chats/client/requests/SendMessage.d.ts +2 -2
  205. package/dist/types/sdk/generated/ts-server/api/resources/chats/client/requests/SwitchAgent.d.ts +6 -4
  206. package/dist/types/sdk/generated/ts-server/api/resources/chats/types/ChatBoxListTasksResponse.d.ts +1 -1
  207. package/dist/types/sdk/generated/ts-server/api/resources/chats/types/ChatsEventsRequestAccept.d.ts +1 -1
  208. package/dist/types/sdk/generated/ts-server/api/resources/chats/types/ChatsHistoryRequestAnchor.d.ts +1 -1
  209. package/dist/types/sdk/generated/ts-server/api/resources/chats/types/ChatsListResponse.d.ts +1 -1
  210. package/dist/types/sdk/generated/ts-server/api/resources/chats/types/ChatsRunsResponse.d.ts +1 -1
  211. package/dist/types/sdk/generated/ts-server/api/resources/chats/types/ChatsSendResponse.d.ts +1 -1
  212. package/dist/types/sdk/generated/ts-server/api/resources/connections/client/requests/ConnectionsConnectRequest.d.ts +1 -1
  213. package/dist/types/sdk/generated/ts-server/api/resources/connections/client/requests/ConnectionsDisconnectRequest.d.ts +1 -1
  214. package/dist/types/sdk/generated/ts-server/api/resources/connections/client/requests/ConnectionsLimitsRequest.d.ts +1 -1
  215. package/dist/types/sdk/generated/ts-server/api/resources/connections/client/requests/SetKeyConnectionsRequest.d.ts +1 -1
  216. package/dist/types/sdk/generated/ts-server/api/resources/connections/types/ConnectionsConnectResponse.d.ts +1 -1
  217. package/dist/types/sdk/generated/ts-server/api/resources/connections/types/ConnectionsDisconnectRequestVia.d.ts +1 -1
  218. package/dist/types/sdk/generated/ts-server/api/resources/connections/types/ConnectionsListResponse.d.ts +1 -1
  219. package/dist/types/sdk/generated/ts-server/api/resources/files/client/requests/FilesUploadRequest.d.ts +1 -1
  220. package/dist/types/sdk/generated/ts-server/api/resources/files/types/CreateUploadFilesResponse.d.ts +1 -1
  221. package/dist/types/sdk/generated/ts-server/api/resources/identity/types/MeWhoamiResponse.d.ts +1 -1
  222. package/dist/types/sdk/generated/ts-server/api/resources/index.d.ts +15 -15
  223. package/dist/types/sdk/generated/ts-server/api/resources/keys/client/requests/CreateApiKey.d.ts +1 -1
  224. package/dist/types/sdk/generated/ts-server/api/resources/keys/types/ApiKeysListResponse.d.ts +1 -1
  225. package/dist/types/sdk/generated/ts-server/api/resources/machines/client/requests/MachinesCreateRequest.d.ts +1 -1
  226. package/dist/types/sdk/generated/ts-server/api/resources/machines/client/requests/MachinesUpdateRequest.d.ts +1 -1
  227. package/dist/types/sdk/generated/ts-server/api/resources/machines/types/MachinesListResponse.d.ts +1 -1
  228. package/dist/types/sdk/generated/ts-server/api/resources/observability/client/requests/ChatObservabilityLogsRequest.d.ts +1 -1
  229. package/dist/types/sdk/generated/ts-server/api/resources/observability/client/requests/ChatObservabilityMetricsRequest.d.ts +1 -1
  230. package/dist/types/sdk/generated/ts-server/api/resources/providers/client/requests/MyProvidersConnectRequest.d.ts +1 -1
  231. package/dist/types/sdk/generated/ts-server/api/resources/providers/client/requests/MyProvidersDisconnectRequest.d.ts +1 -1
  232. package/dist/types/sdk/generated/ts-server/api/resources/providers/client/requests/MyProvidersLimitsRequest.d.ts +1 -1
  233. package/dist/types/sdk/generated/ts-server/api/resources/providers/client/requests/MyProvidersSetKeyRequest.d.ts +1 -1
  234. package/dist/types/sdk/generated/ts-server/api/resources/providers/types/MyProvidersConnectResponse.d.ts +1 -1
  235. package/dist/types/sdk/generated/ts-server/api/resources/providers/types/MyProvidersDisconnectRequestVia.d.ts +1 -1
  236. package/dist/types/sdk/generated/ts-server/api/resources/providers/types/MyProvidersListResponse.d.ts +1 -1
  237. package/dist/types/sdk/generated/ts-server/api/resources/runs/client/requests/RunsListRequest.d.ts +1 -1
  238. package/dist/types/sdk/generated/ts-server/api/resources/runs/types/RunsListRequestStatus.d.ts +1 -1
  239. package/dist/types/sdk/generated/ts-server/api/resources/runs/types/RunsListResponse.d.ts +1 -1
  240. package/dist/types/sdk/generated/ts-server/api/resources/secrets/types/SecretsListResponse.d.ts +1 -1
  241. package/dist/types/sdk/generated/ts-server/api/resources/users/client/Client.d.ts +38 -0
  242. package/dist/types/sdk/generated/ts-server/api/resources/users/client/requests/UsersCreateRequest.d.ts +3 -1
  243. package/dist/types/sdk/generated/ts-server/api/resources/users/client/requests/UsersMergeRequest.d.ts +13 -0
  244. package/dist/types/sdk/generated/ts-server/api/resources/users/client/requests/UsersUpdateRequest.d.ts +3 -1
  245. package/dist/types/sdk/generated/ts-server/api/resources/users/client/requests/index.d.ts +1 -0
  246. package/dist/types/sdk/generated/ts-server/api/resources/users/types/GrantsListResponse.d.ts +1 -1
  247. package/dist/types/sdk/generated/ts-server/api/resources/users/types/UserTokensListResponse.d.ts +1 -1
  248. package/dist/types/sdk/generated/ts-server/api/resources/users/types/UsersListResponse.d.ts +1 -1
  249. package/dist/types/sdk/generated/ts-server/api/resources/webhooks/types/WebhooksCreateResponse.d.ts +1 -1
  250. package/dist/types/sdk/generated/ts-server/api/resources/webhooks/types/WebhooksListResponse.d.ts +1 -1
  251. package/dist/types/sdk/generated/ts-server/api/resources/workspaces/client/requests/WorkspacesCreateRequest.d.ts +1 -1
  252. package/dist/types/sdk/generated/ts-server/api/resources/workspaces/client/requests/WorkspacesUpdateRequest.d.ts +1 -1
  253. package/dist/types/sdk/generated/ts-server/api/resources/workspaces/types/WorkspacesListResponse.d.ts +1 -1
  254. package/dist/types/sdk/generated/ts-server/api/types/Agent.d.ts +2 -2
  255. package/dist/types/sdk/generated/ts-server/api/types/AgentHealth.d.ts +4 -4
  256. package/dist/types/sdk/generated/ts-server/api/types/AgentHooks.d.ts +7 -1
  257. package/dist/types/sdk/generated/ts-server/api/types/AgentHooksMergePatchUpdateOrCreate.d.ts +7 -1
  258. package/dist/types/sdk/generated/ts-server/api/types/AgentLimits.d.ts +1 -1
  259. package/dist/types/sdk/generated/ts-server/api/types/AgentLimitsMergePatchUpdateOrCreate.d.ts +1 -1
  260. package/dist/types/sdk/generated/ts-server/api/types/AgentMessageOrigin.d.ts +1 -1
  261. package/dist/types/sdk/generated/ts-server/api/types/AgentProviderOption.d.ts +1 -1
  262. package/dist/types/sdk/generated/ts-server/api/types/AgentPublic.d.ts +1 -1
  263. package/dist/types/sdk/generated/ts-server/api/types/ApiKey.d.ts +2 -2
  264. package/dist/types/sdk/generated/ts-server/api/types/ApiKeyWithSecret.d.ts +2 -2
  265. package/dist/types/sdk/generated/ts-server/api/types/BillingLine.d.ts +1 -1
  266. package/dist/types/sdk/generated/ts-server/api/types/BillingStatement.d.ts +1 -1
  267. package/dist/types/sdk/generated/ts-server/api/types/BoxFileContent.d.ts +1 -1
  268. package/dist/types/sdk/generated/ts-server/api/types/BoxFileEntry.d.ts +2 -2
  269. package/dist/types/sdk/generated/ts-server/api/types/BoxFileList.d.ts +1 -1
  270. package/dist/types/sdk/generated/ts-server/api/types/BoxIncident.d.ts +1 -1
  271. package/dist/types/sdk/generated/ts-server/api/types/BoxProfile.d.ts +2 -0
  272. package/dist/types/sdk/generated/ts-server/api/types/BoxProfileMergePatchUpdateOrCreate.d.ts +2 -0
  273. package/dist/types/sdk/generated/ts-server/api/types/Chat.d.ts +2 -2
  274. package/dist/types/sdk/generated/ts-server/api/types/ChatContext.d.ts +1 -1
  275. package/dist/types/sdk/generated/ts-server/api/types/ChatDeleted.d.ts +1 -1
  276. package/dist/types/sdk/generated/ts-server/api/types/ChatDiagnosis.d.ts +1 -1
  277. package/dist/types/sdk/generated/ts-server/api/types/ChatSelection.d.ts +2 -2
  278. package/dist/types/sdk/generated/ts-server/api/types/ChatTask.d.ts +3 -3
  279. package/dist/types/sdk/generated/ts-server/api/types/ChatUsage.d.ts +1 -1
  280. package/dist/types/sdk/generated/ts-server/api/types/Connection.d.ts +1 -1
  281. package/dist/types/sdk/generated/ts-server/api/types/Culprit.d.ts +1 -1
  282. package/dist/types/sdk/generated/ts-server/api/types/DeviceFlow.d.ts +1 -1
  283. package/dist/types/sdk/generated/ts-server/api/types/ErrorBody.d.ts +1 -1
  284. package/dist/types/sdk/generated/ts-server/api/types/Error_.d.ts +1 -1
  285. package/dist/types/sdk/generated/ts-server/api/types/EventRange.d.ts +1 -1
  286. package/dist/types/sdk/generated/ts-server/api/types/EventsAgentSelection.d.ts +1 -1
  287. package/dist/types/sdk/generated/ts-server/api/types/EventsApprovalOption.d.ts +1 -1
  288. package/dist/types/sdk/generated/ts-server/api/types/EventsCapabilities.d.ts +9 -9
  289. package/dist/types/sdk/generated/ts-server/api/types/EventsContentFile.d.ts +1 -1
  290. package/dist/types/sdk/generated/ts-server/api/types/EventsContentImage.d.ts +1 -1
  291. package/dist/types/sdk/generated/ts-server/api/types/EventsContentPart.d.ts +1 -1
  292. package/dist/types/sdk/generated/ts-server/api/types/EventsDelta.d.ts +1 -1
  293. package/dist/types/sdk/generated/ts-server/api/types/EventsEAgentSwitchFailed.d.ts +1 -1
  294. package/dist/types/sdk/generated/ts-server/api/types/EventsEAgentSwitchFailedData.d.ts +1 -1
  295. package/dist/types/sdk/generated/ts-server/api/types/EventsEAgentSwitched.d.ts +1 -1
  296. package/dist/types/sdk/generated/ts-server/api/types/EventsEAgentSwitchedData.d.ts +1 -1
  297. package/dist/types/sdk/generated/ts-server/api/types/EventsEChatState.d.ts +1 -1
  298. package/dist/types/sdk/generated/ts-server/api/types/EventsEChatStateData.d.ts +1 -1
  299. package/dist/types/sdk/generated/ts-server/api/types/EventsEContextUpdated.d.ts +1 -1
  300. package/dist/types/sdk/generated/ts-server/api/types/EventsEContextUpdatedData.d.ts +1 -1
  301. package/dist/types/sdk/generated/ts-server/api/types/EventsEError.d.ts +1 -1
  302. package/dist/types/sdk/generated/ts-server/api/types/EventsEErrorData.d.ts +1 -1
  303. package/dist/types/sdk/generated/ts-server/api/types/EventsEItemCompleted.d.ts +1 -1
  304. package/dist/types/sdk/generated/ts-server/api/types/EventsEItemCompletedData.d.ts +1 -1
  305. package/dist/types/sdk/generated/ts-server/api/types/EventsEItemDelta.d.ts +1 -1
  306. package/dist/types/sdk/generated/ts-server/api/types/EventsEItemDeltaData.d.ts +1 -1
  307. package/dist/types/sdk/generated/ts-server/api/types/EventsEItemRetracted.d.ts +1 -1
  308. package/dist/types/sdk/generated/ts-server/api/types/EventsEItemRetractedData.d.ts +2 -2
  309. package/dist/types/sdk/generated/ts-server/api/types/EventsEItemStarted.d.ts +1 -1
  310. package/dist/types/sdk/generated/ts-server/api/types/EventsEItemStartedData.d.ts +1 -1
  311. package/dist/types/sdk/generated/ts-server/api/types/EventsEItemUpdated.d.ts +1 -1
  312. package/dist/types/sdk/generated/ts-server/api/types/EventsELimitsUpdated.d.ts +1 -1
  313. package/dist/types/sdk/generated/ts-server/api/types/EventsENotice.d.ts +1 -1
  314. package/dist/types/sdk/generated/ts-server/api/types/EventsENoticeData.d.ts +1 -1
  315. package/dist/types/sdk/generated/ts-server/api/types/EventsERunCompleted.d.ts +1 -1
  316. package/dist/types/sdk/generated/ts-server/api/types/EventsERunCompletedData.d.ts +2 -2
  317. package/dist/types/sdk/generated/ts-server/api/types/EventsERunStarted.d.ts +1 -1
  318. package/dist/types/sdk/generated/ts-server/api/types/EventsERunStartedData.d.ts +2 -2
  319. package/dist/types/sdk/generated/ts-server/api/types/EventsERunWaiting.d.ts +1 -1
  320. package/dist/types/sdk/generated/ts-server/api/types/EventsERunWaitingData.d.ts +2 -2
  321. package/dist/types/sdk/generated/ts-server/api/types/EventsESessionStarted.d.ts +1 -1
  322. package/dist/types/sdk/generated/ts-server/api/types/EventsESessionStartedData.d.ts +2 -2
  323. package/dist/types/sdk/generated/ts-server/api/types/EventsETaskUpdated.d.ts +1 -1
  324. package/dist/types/sdk/generated/ts-server/api/types/EventsETaskUpdatedData.d.ts +1 -1
  325. package/dist/types/sdk/generated/ts-server/api/types/EventsEUsageUpdated.d.ts +1 -1
  326. package/dist/types/sdk/generated/ts-server/api/types/EventsEUsageUpdatedData.d.ts +1 -1
  327. package/dist/types/sdk/generated/ts-server/api/types/EventsErrorCode.d.ts +1 -1
  328. package/dist/types/sdk/generated/ts-server/api/types/EventsEvent.d.ts +1 -1
  329. package/dist/types/sdk/generated/ts-server/api/types/EventsFailure.d.ts +1 -1
  330. package/dist/types/sdk/generated/ts-server/api/types/EventsFailureReason.d.ts +1 -1
  331. package/dist/types/sdk/generated/ts-server/api/types/EventsHandoffInjected.d.ts +1 -1
  332. package/dist/types/sdk/generated/ts-server/api/types/EventsHandoffLost.d.ts +1 -1
  333. package/dist/types/sdk/generated/ts-server/api/types/EventsInboxEntry.d.ts +5 -5
  334. package/dist/types/sdk/generated/ts-server/api/types/EventsInboxState.d.ts +2 -2
  335. package/dist/types/sdk/generated/ts-server/api/types/EventsItem.d.ts +1 -1
  336. package/dist/types/sdk/generated/ts-server/api/types/EventsItemApproval.d.ts +3 -3
  337. package/dist/types/sdk/generated/ts-server/api/types/EventsItemCommand.d.ts +2 -2
  338. package/dist/types/sdk/generated/ts-server/api/types/EventsItemCompaction.d.ts +3 -3
  339. package/dist/types/sdk/generated/ts-server/api/types/EventsItemError.d.ts +2 -2
  340. package/dist/types/sdk/generated/ts-server/api/types/EventsItemFileChange.d.ts +3 -3
  341. package/dist/types/sdk/generated/ts-server/api/types/EventsItemFileSearch.d.ts +2 -2
  342. package/dist/types/sdk/generated/ts-server/api/types/EventsItemHandoff.d.ts +4 -4
  343. package/dist/types/sdk/generated/ts-server/api/types/EventsItemHook.d.ts +2 -2
  344. package/dist/types/sdk/generated/ts-server/api/types/EventsItemNotification.d.ts +3 -3
  345. package/dist/types/sdk/generated/ts-server/api/types/EventsItemPlan.d.ts +3 -3
  346. package/dist/types/sdk/generated/ts-server/api/types/EventsItemProposedPlan.d.ts +2 -2
  347. package/dist/types/sdk/generated/ts-server/api/types/EventsItemQuestion.d.ts +2 -2
  348. package/dist/types/sdk/generated/ts-server/api/types/EventsItemReasoning.d.ts +2 -2
  349. package/dist/types/sdk/generated/ts-server/api/types/EventsItemSubagent.d.ts +2 -2
  350. package/dist/types/sdk/generated/ts-server/api/types/EventsItemText.d.ts +3 -3
  351. package/dist/types/sdk/generated/ts-server/api/types/EventsItemTimer.d.ts +2 -2
  352. package/dist/types/sdk/generated/ts-server/api/types/EventsItemToolCall.d.ts +3 -3
  353. package/dist/types/sdk/generated/ts-server/api/types/EventsItemUserMessage.d.ts +4 -4
  354. package/dist/types/sdk/generated/ts-server/api/types/EventsItemWebSearch.d.ts +3 -3
  355. package/dist/types/sdk/generated/ts-server/api/types/EventsLimitWindow.d.ts +2 -2
  356. package/dist/types/sdk/generated/ts-server/api/types/EventsLimits.d.ts +2 -2
  357. package/dist/types/sdk/generated/ts-server/api/types/EventsNativeRef.d.ts +1 -1
  358. package/dist/types/sdk/generated/ts-server/api/types/EventsOrigin.d.ts +2 -2
  359. package/dist/types/sdk/generated/ts-server/api/types/EventsRawFrame.d.ts +2 -2
  360. package/dist/types/sdk/generated/ts-server/api/types/EventsRunAgent.d.ts +2 -2
  361. package/dist/types/sdk/generated/ts-server/api/types/EventsRunTrigger.d.ts +2 -2
  362. package/dist/types/sdk/generated/ts-server/api/types/EventsScheduledSwitch.d.ts +1 -1
  363. package/dist/types/sdk/generated/ts-server/api/types/EventsTask.d.ts +3 -3
  364. package/dist/types/sdk/generated/ts-server/api/types/EventsToolOutput.d.ts +1 -1
  365. package/dist/types/sdk/generated/ts-server/api/types/EventsUsage.d.ts +1 -1
  366. package/dist/types/sdk/generated/ts-server/api/types/FileObject.d.ts +2 -2
  367. package/dist/types/sdk/generated/ts-server/api/types/Grant.d.ts +1 -1
  368. package/dist/types/sdk/generated/ts-server/api/types/HistoryEntry.d.ts +1 -1
  369. package/dist/types/sdk/generated/ts-server/api/types/HistoryPage.d.ts +1 -1
  370. package/dist/types/sdk/generated/ts-server/api/types/LoginStatus.d.ts +2 -2
  371. package/dist/types/sdk/generated/ts-server/api/types/LogsPage.d.ts +1 -1
  372. package/dist/types/sdk/generated/ts-server/api/types/Machine.d.ts +3 -3
  373. package/dist/types/sdk/generated/ts-server/api/types/MessageReceipt.d.ts +1 -1
  374. package/dist/types/sdk/generated/ts-server/api/types/MetricsPage.d.ts +1 -1
  375. package/dist/types/sdk/generated/ts-server/api/types/MyProviderStatus.d.ts +4 -4
  376. package/dist/types/sdk/generated/ts-server/api/types/OAuthFlow.d.ts +1 -1
  377. package/dist/types/sdk/generated/ts-server/api/types/Pairing.d.ts +2 -2
  378. package/dist/types/sdk/generated/ts-server/api/types/Placement.d.ts +2 -2
  379. package/dist/types/sdk/generated/ts-server/api/types/PlacementMergePatchUpdateOrCreate.d.ts +2 -2
  380. package/dist/types/sdk/generated/ts-server/api/types/PreTurnHook.d.ts +1 -1
  381. package/dist/types/sdk/generated/ts-server/api/types/PreTurnHookMergePatchUpdateOrCreate.d.ts +1 -1
  382. package/dist/types/sdk/generated/ts-server/api/types/Principal.d.ts +2 -2
  383. package/dist/types/sdk/generated/ts-server/api/types/ProviderKind.d.ts +1 -1
  384. package/dist/types/sdk/generated/ts-server/api/types/ProviderLimits.d.ts +2 -2
  385. package/dist/types/sdk/generated/ts-server/api/types/ProviderStatus.d.ts +4 -4
  386. package/dist/types/sdk/generated/ts-server/api/types/ReleasesStatus.d.ts +1 -1
  387. package/dist/types/sdk/generated/ts-server/api/types/RunDiagnosis.d.ts +1 -1
  388. package/dist/types/sdk/generated/ts-server/api/types/RunSummary.d.ts +2 -2
  389. package/dist/types/sdk/generated/ts-server/api/types/RunVerdict.d.ts +2 -2
  390. package/dist/types/sdk/generated/ts-server/api/types/Scope.d.ts +1 -1
  391. package/dist/types/sdk/generated/ts-server/api/types/SecretInfo.d.ts +1 -1
  392. package/dist/types/sdk/generated/ts-server/api/types/SwitchResult.d.ts +2 -2
  393. package/dist/types/sdk/generated/ts-server/api/types/ToolPrincipal.d.ts +3 -3
  394. package/dist/types/sdk/generated/ts-server/api/types/User.d.ts +9 -1
  395. package/dist/types/sdk/generated/ts-server/api/types/UserKind.d.ts +5 -0
  396. package/dist/types/sdk/generated/ts-server/api/types/UserSession.d.ts +2 -2
  397. package/dist/types/sdk/generated/ts-server/api/types/UserToken.d.ts +1 -1
  398. package/dist/types/sdk/generated/ts-server/api/types/WebhookEndpoint.d.ts +1 -1
  399. package/dist/types/sdk/generated/ts-server/api/types/Workspace.d.ts +1 -1
  400. package/dist/types/sdk/generated/ts-server/api/types/WorkspaceRun.d.ts +2 -2
  401. package/dist/types/sdk/generated/ts-server/api/types/index.d.ts +2 -1
  402. package/dist/types/sdk/generated/ts-server/auth/BearerAuthProvider.d.ts +1 -1
  403. package/dist/types/sdk/generated/ts-server/core/runtime/index.d.ts +1 -1
  404. package/dist/types/sdk/generated/ts-server/core/stream/Stream.d.ts +1 -1
  405. package/dist/types/sdk/generated/ts-server/core/stream/index.d.ts +1 -1
  406. package/dist/types/sdk/generated/ts-server/core/url/index.d.ts +1 -1
  407. package/dist/types/sdk/generated/ts-server/errors/SmoothAgentApiError.d.ts +2 -2
  408. package/dist/types/sdk/generated/ts-server/errors/handleNonStatusCodeError.d.ts +1 -1
  409. package/dist/types/sdk/generated/ts-server/index.d.ts +1 -1
  410. package/dist/types/sdk/ts/core-live/src/types.d.ts +1 -1
  411. package/dist/types/sdk/ts/core-live/src/wasm/bytes.d.ts +1 -1
  412. package/dist/types/sdk/ts/core-live/src/watch.d.ts +3 -1
  413. package/package.json +2 -2
  414. package/dist/bytes-3XCX7CRA.js +0 -8
  415. package/dist/chunk-C64SPUFX.js.map +0 -7
  416. package/dist/client-CN6PRCWE.js.map +0 -7
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../generated/ts-server/core/json.ts", "../../../generated/ts-server/errors/SmoothAgentApiError.ts", "../../../generated/ts-server/errors/SmoothAgentApiTimeoutError.ts", "../../../generated/ts-server/api/errors/BadGatewayError.ts", "../../../generated/ts-server/api/errors/BadRequestError.ts", "../../../generated/ts-server/api/errors/ConflictError.ts", "../../../generated/ts-server/api/errors/FailedDependencyError.ts", "../../../generated/ts-server/api/errors/ForbiddenError.ts", "../../../generated/ts-server/api/errors/GoneError.ts", "../../../generated/ts-server/api/errors/InternalServerError.ts", "../../../generated/ts-server/api/errors/NotFoundError.ts", "../../../generated/ts-server/api/errors/PaymentRequiredError.ts", "../../../generated/ts-server/api/errors/ServiceUnavailableError.ts", "../../../generated/ts-server/api/errors/TooManyRequestsError.ts", "../../../generated/ts-server/api/errors/UnauthorizedError.ts", "../../../generated/ts-server/api/errors/UnprocessableEntityError.ts", "../../../generated/ts-server/api/resources/agents/client/requests/AgentConfig.ts", "../../../generated/ts-server/api/resources/agents/client/requests/AgentConfigMergePatchUpdate.ts", "../../../generated/ts-server/api/resources/chats/client/requests/SendMessage.ts", "../../../generated/ts-server/api/resources/chats/types/ChatsSendResponse.ts", "../../../generated/ts-server/api/types/Agent.ts", "../../../generated/ts-server/api/types/AgentHealth.ts", "../../../generated/ts-server/api/types/AgentMessageOrigin.ts", "../../../generated/ts-server/api/types/ApiKey.ts", "../../../generated/ts-server/api/types/ApiKeyWithSecret.ts", "../../../generated/ts-server/api/types/BillingLine.ts", "../../../generated/ts-server/api/types/BoxFileContent.ts", "../../../generated/ts-server/api/types/BoxFileEntry.ts", "../../../generated/ts-server/api/types/Chat.ts", "../../../generated/ts-server/api/types/ChatDeleted.ts", "../../../generated/ts-server/api/types/ChatSelection.ts", "../../../generated/ts-server/api/types/ChatTask.ts", "../../../generated/ts-server/api/types/EventsApprovalOption.ts", "../../../generated/ts-server/api/types/EventsCapabilities.ts", "../../../generated/ts-server/api/types/EventsDelta.ts", "../../../generated/ts-server/api/types/EventsEChatStateData.ts", "../../../generated/ts-server/api/types/EventsEItemRetractedData.ts", "../../../generated/ts-server/api/types/EventsENoticeData.ts", "../../../generated/ts-server/api/types/EventsERunCompletedData.ts", "../../../generated/ts-server/api/types/EventsERunStartedData.ts", "../../../generated/ts-server/api/types/EventsERunWaitingData.ts", "../../../generated/ts-server/api/types/EventsESessionStartedData.ts", "../../../generated/ts-server/api/types/EventsHandoffInjected.ts", "../../../generated/ts-server/api/types/EventsHandoffLost.ts", "../../../generated/ts-server/api/types/EventsInboxEntry.ts", "../../../generated/ts-server/api/types/EventsInboxState.ts", "../../../generated/ts-server/api/types/EventsItemApproval.ts", "../../../generated/ts-server/api/types/EventsItemCommand.ts", "../../../generated/ts-server/api/types/EventsItemCompaction.ts", "../../../generated/ts-server/api/types/EventsItemError.ts", "../../../generated/ts-server/api/types/EventsItemFileChange.ts", "../../../generated/ts-server/api/types/EventsItemFileSearch.ts", "../../../generated/ts-server/api/types/EventsItemHandoff.ts", "../../../generated/ts-server/api/types/EventsItemHook.ts", "../../../generated/ts-server/api/types/EventsItemNotification.ts", "../../../generated/ts-server/api/types/EventsItemPlan.ts", "../../../generated/ts-server/api/types/EventsItemProposedPlan.ts", "../../../generated/ts-server/api/types/EventsItemQuestion.ts", "../../../generated/ts-server/api/types/EventsItemReasoning.ts", "../../../generated/ts-server/api/types/EventsItemSubagent.ts", "../../../generated/ts-server/api/types/EventsItemText.ts", "../../../generated/ts-server/api/types/EventsItemTimer.ts", "../../../generated/ts-server/api/types/EventsItemToolCall.ts", "../../../generated/ts-server/api/types/EventsItemUserMessage.ts", "../../../generated/ts-server/api/types/EventsItemWebSearch.ts", "../../../generated/ts-server/api/types/EventsLimits.ts", "../../../generated/ts-server/api/types/EventsLimitWindow.ts", "../../../generated/ts-server/api/types/EventsOrigin.ts", "../../../generated/ts-server/api/types/EventsRawFrame.ts", "../../../generated/ts-server/api/types/EventsRunAgent.ts", "../../../generated/ts-server/api/types/EventsRunTrigger.ts", "../../../generated/ts-server/api/types/EventsTask.ts", "../../../generated/ts-server/api/types/FileObject.ts", "../../../generated/ts-server/api/types/LoginStatus.ts", "../../../generated/ts-server/api/types/Machine.ts", "../../../generated/ts-server/api/types/MessageReceipt.ts", "../../../generated/ts-server/api/types/MyProviderStatus.ts", "../../../generated/ts-server/api/types/Pairing.ts", "../../../generated/ts-server/api/types/Placement.ts", "../../../generated/ts-server/api/types/PlacementMergePatchUpdateOrCreate.ts", "../../../generated/ts-server/api/types/PreTurnHook.ts", "../../../generated/ts-server/api/types/PreTurnHookMergePatchUpdateOrCreate.ts", "../../../generated/ts-server/api/types/Principal.ts", "../../../generated/ts-server/api/types/ProviderLimits.ts", "../../../generated/ts-server/api/types/ProviderStatus.ts", "../../../generated/ts-server/api/types/RunSummary.ts", "../../../generated/ts-server/api/types/RunVerdict.ts", "../../../generated/ts-server/api/types/SwitchResult.ts", "../../../generated/ts-server/api/types/ToolPrincipal.ts", "../../../generated/ts-server/api/types/UserSession.ts", "../../../generated/ts-server/api/types/WorkspaceRun.ts", "../../../generated/ts-server/core/auth/AuthProvider.ts", "../../../generated/ts-server/core/auth/NoOpAuthProvider.ts", "../../../generated/ts-server/core/fetcher/EndpointSupplier.ts", "../../../generated/ts-server/core/logging/logger.ts", "../../../generated/ts-server/core/url/qs.ts", "../../../generated/ts-server/core/fetcher/createRequestUrl.ts", "../../../generated/ts-server/core/fetcher/BinaryResponse.ts", "../../../generated/ts-server/core/fetcher/getResponseBody.ts", "../../../generated/ts-server/core/fetcher/getErrorResponseBody.ts", "../../../generated/ts-server/core/fetcher/getFetchFn.ts", "../../../generated/ts-server/core/fetcher/getRequestBody.ts", "../../../generated/ts-server/core/fetcher/Headers.ts", "../../../generated/ts-server/core/fetcher/signals.ts", "../../../generated/ts-server/core/fetcher/makeRequest.ts", "../../../generated/ts-server/core/fetcher/RawResponse.ts", "../../../generated/ts-server/core/fetcher/redactUrl.ts", "../../../generated/ts-server/core/fetcher/requestWithRetries.ts", "../../../generated/ts-server/core/fetcher/Fetcher.ts", "../../../generated/ts-server/core/fetcher/HttpResponsePromise.ts", "../../../generated/ts-server/core/url/join.ts", "../../../generated/ts-server/core/fetcher/Supplier.ts", "../../../generated/ts-server/core/fetcher/makePassthroughRequest.ts", "../../../generated/ts-server/core/file/file.ts", "../../../generated/ts-server/core/runtime/runtime.ts", "../../../generated/ts-server/core/form-data-utils/FormDataWrapper.ts", "../../../generated/ts-server/core/logging/index.ts", "../../../generated/ts-server/core/pagination/Page.ts", "../../../generated/ts-server/core/stream/Stream.ts", "../../../generated/ts-server/core/url/index.ts", "../../../generated/ts-server/core/url/encodePathParam.ts", "../../../generated/ts-server/core/url/QueryStringBuilder.ts", "../../../generated/ts-server/core/utils/setObjectProperty.ts", "../../../generated/ts-server/auth/BearerAuthProvider.ts", "../../../generated/ts-server/core/headers.ts", "../../../generated/ts-server/BaseClient.ts", "../../../generated/ts-server/core/requestBody.ts", "../../../generated/ts-server/environments.ts", "../../../generated/ts-server/errors/handleNonStatusCodeError.ts", "../../../generated/ts-server/api/resources/account/client/Client.ts", "../../../generated/ts-server/api/resources/agents/client/Client.ts", "../../../generated/ts-server/api/resources/billing/client/Client.ts", "../../../generated/ts-server/api/resources/chats/client/Client.ts", "../../../generated/ts-server/api/resources/connections/client/Client.ts", "../../../generated/ts-server/api/resources/files/client/Client.ts", "../../../generated/ts-server/api/resources/identity/client/Client.ts", "../../../generated/ts-server/api/resources/keys/client/Client.ts", "../../../generated/ts-server/api/resources/machines/client/Client.ts", "../../../generated/ts-server/api/resources/observability/client/Client.ts", "../../../generated/ts-server/api/resources/providers/client/Client.ts", "../../../generated/ts-server/api/resources/runs/client/Client.ts", "../../../generated/ts-server/api/resources/secrets/client/Client.ts", "../../../generated/ts-server/api/resources/users/client/Client.ts", "../../../generated/ts-server/api/resources/webhooks/client/Client.ts", "../../../generated/ts-server/api/resources/workspaces/client/Client.ts", "../../../generated/ts-server/Client.ts", "../../../generated/ts-server/core/logging/exports.ts", "../../core-live/src/providers.ts", "../src/index.ts"],
4
- "sourcesContent": ["/**\n * Serialize a value to JSON\n * @param value A JavaScript value, usually an object or array, to be converted.\n * @param replacer A function that transforms the results.\n * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.\n * @returns JSON string\n */\nexport const toJson = (\n value: unknown,\n replacer?: (this: unknown, key: string, value: unknown) => unknown,\n space?: string | number,\n): string => {\n return JSON.stringify(value, replacer, space);\n};\n\n/**\n * Parse JSON string to object, array, or other type\n * @param text A valid JSON string.\n * @param reviver A function that transforms the results. This function is called for each member of the object. If a member contains nested objects, the nested objects are transformed before the parent object is.\n * @returns Parsed object, array, or other type\n */\nexport function fromJson<T = unknown>(\n text: string,\n reviver?: (this: unknown, key: string, value: unknown) => unknown,\n): T {\n return JSON.parse(text, reviver);\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as core from \"../core/index.js\";\nimport { toJson } from \"../core/json.js\";\n\nexport class SmoothAgentApiError extends Error {\n public readonly statusCode?: number;\n public readonly body?: unknown;\n public readonly rawResponse?: core.RawResponse;\n public readonly cause?: unknown;\n\n constructor({\n message,\n statusCode,\n body,\n rawResponse,\n cause,\n }: {\n message?: string;\n statusCode?: number;\n body?: unknown;\n rawResponse?: core.RawResponse;\n cause?: unknown;\n }) {\n super(buildMessage({ message, statusCode, body }));\n Object.setPrototypeOf(this, new.target.prototype);\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n\n this.name = \"SmoothAgentApiError\";\n this.statusCode = statusCode;\n this.body = body;\n this.rawResponse = rawResponse;\n if (cause != null) {\n this.cause = cause;\n }\n }\n\n public get requestId(): string | undefined {\n const headers = this.rawResponse?.headers;\n if (headers == null) {\n return undefined;\n }\n const requestId = headers.get(\"X-Request-Id\");\n if (requestId != null) {\n return requestId;\n }\n let fallback: string | undefined;\n headers.forEach((value, name) => {\n if (fallback === undefined && /request[-_]?id$/i.test(name)) {\n fallback = value;\n }\n });\n return fallback;\n }\n}\n\nfunction buildMessage({\n message,\n statusCode,\n body,\n}: {\n message: string | undefined;\n statusCode: number | undefined;\n body: unknown | undefined;\n}): string {\n const lines: string[] = [];\n if (message != null) {\n lines.push(message);\n }\n\n if (statusCode != null) {\n lines.push(`Status code: ${statusCode.toString()}`);\n }\n\n if (body != null) {\n lines.push(`Body: ${toJson(body, undefined, 2)}`);\n }\n\n return lines.join(\"\\n\");\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport * as errors from \"./index.js\";\n\nexport class SmoothAgentApiTimeoutError extends errors.SmoothAgentApiError {\n constructor(message: string, opts?: { cause?: unknown }) {\n super({\n message: message,\n cause: opts?.cause,\n });\n Object.setPrototypeOf(this, new.target.prototype);\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n\n this.name = \"SmoothAgentApiTimeoutError\";\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as core from \"../../core/index.js\";\nimport * as errors from \"../../errors/index.js\";\nimport type * as SmoothAgentApi from \"../index.js\";\n\nexport class BadGatewayError extends errors.SmoothAgentApiError {\n public declare readonly body: SmoothAgentApi.Error_;\n\n constructor(body: SmoothAgentApi.Error_, rawResponse?: core.RawResponse) {\n super({\n message: \"BadGatewayError\",\n statusCode: 502,\n body: body,\n rawResponse: rawResponse,\n });\n Object.setPrototypeOf(this, new.target.prototype);\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n\n this.name = \"BadGatewayError\";\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as core from \"../../core/index.js\";\nimport * as errors from \"../../errors/index.js\";\nimport type * as SmoothAgentApi from \"../index.js\";\n\nexport class BadRequestError extends errors.SmoothAgentApiError {\n public declare readonly body: SmoothAgentApi.Error_;\n\n constructor(body: SmoothAgentApi.Error_, rawResponse?: core.RawResponse) {\n super({\n message: \"BadRequestError\",\n statusCode: 400,\n body: body,\n rawResponse: rawResponse,\n });\n Object.setPrototypeOf(this, new.target.prototype);\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n\n this.name = \"BadRequestError\";\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as core from \"../../core/index.js\";\nimport * as errors from \"../../errors/index.js\";\nimport type * as SmoothAgentApi from \"../index.js\";\n\nexport class ConflictError extends errors.SmoothAgentApiError {\n public declare readonly body: SmoothAgentApi.Error_;\n\n constructor(body: SmoothAgentApi.Error_, rawResponse?: core.RawResponse) {\n super({\n message: \"ConflictError\",\n statusCode: 409,\n body: body,\n rawResponse: rawResponse,\n });\n Object.setPrototypeOf(this, new.target.prototype);\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n\n this.name = \"ConflictError\";\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as core from \"../../core/index.js\";\nimport * as errors from \"../../errors/index.js\";\nimport type * as SmoothAgentApi from \"../index.js\";\n\nexport class FailedDependencyError extends errors.SmoothAgentApiError {\n public declare readonly body: SmoothAgentApi.Error_;\n\n constructor(body: SmoothAgentApi.Error_, rawResponse?: core.RawResponse) {\n super({\n message: \"FailedDependencyError\",\n statusCode: 424,\n body: body,\n rawResponse: rawResponse,\n });\n Object.setPrototypeOf(this, new.target.prototype);\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n\n this.name = \"FailedDependencyError\";\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as core from \"../../core/index.js\";\nimport * as errors from \"../../errors/index.js\";\nimport type * as SmoothAgentApi from \"../index.js\";\n\nexport class ForbiddenError extends errors.SmoothAgentApiError {\n public declare readonly body: SmoothAgentApi.Error_;\n\n constructor(body: SmoothAgentApi.Error_, rawResponse?: core.RawResponse) {\n super({\n message: \"ForbiddenError\",\n statusCode: 403,\n body: body,\n rawResponse: rawResponse,\n });\n Object.setPrototypeOf(this, new.target.prototype);\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n\n this.name = \"ForbiddenError\";\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as core from \"../../core/index.js\";\nimport * as errors from \"../../errors/index.js\";\nimport type * as SmoothAgentApi from \"../index.js\";\n\nexport class GoneError extends errors.SmoothAgentApiError {\n public declare readonly body: SmoothAgentApi.Error_;\n\n constructor(body: SmoothAgentApi.Error_, rawResponse?: core.RawResponse) {\n super({\n message: \"GoneError\",\n statusCode: 410,\n body: body,\n rawResponse: rawResponse,\n });\n Object.setPrototypeOf(this, new.target.prototype);\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n\n this.name = \"GoneError\";\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as core from \"../../core/index.js\";\nimport * as errors from \"../../errors/index.js\";\nimport type * as SmoothAgentApi from \"../index.js\";\n\nexport class InternalServerError extends errors.SmoothAgentApiError {\n public declare readonly body: SmoothAgentApi.Error_;\n\n constructor(body: SmoothAgentApi.Error_, rawResponse?: core.RawResponse) {\n super({\n message: \"InternalServerError\",\n statusCode: 500,\n body: body,\n rawResponse: rawResponse,\n });\n Object.setPrototypeOf(this, new.target.prototype);\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n\n this.name = \"InternalServerError\";\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as core from \"../../core/index.js\";\nimport * as errors from \"../../errors/index.js\";\nimport type * as SmoothAgentApi from \"../index.js\";\n\nexport class NotFoundError extends errors.SmoothAgentApiError {\n public declare readonly body: SmoothAgentApi.Error_;\n\n constructor(body: SmoothAgentApi.Error_, rawResponse?: core.RawResponse) {\n super({\n message: \"NotFoundError\",\n statusCode: 404,\n body: body,\n rawResponse: rawResponse,\n });\n Object.setPrototypeOf(this, new.target.prototype);\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n\n this.name = \"NotFoundError\";\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as core from \"../../core/index.js\";\nimport * as errors from \"../../errors/index.js\";\nimport type * as SmoothAgentApi from \"../index.js\";\n\nexport class PaymentRequiredError extends errors.SmoothAgentApiError {\n public declare readonly body: SmoothAgentApi.Error_;\n\n constructor(body: SmoothAgentApi.Error_, rawResponse?: core.RawResponse) {\n super({\n message: \"PaymentRequiredError\",\n statusCode: 402,\n body: body,\n rawResponse: rawResponse,\n });\n Object.setPrototypeOf(this, new.target.prototype);\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n\n this.name = \"PaymentRequiredError\";\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as core from \"../../core/index.js\";\nimport * as errors from \"../../errors/index.js\";\nimport type * as SmoothAgentApi from \"../index.js\";\n\nexport class ServiceUnavailableError extends errors.SmoothAgentApiError {\n public declare readonly body: SmoothAgentApi.Error_;\n\n constructor(body: SmoothAgentApi.Error_, rawResponse?: core.RawResponse) {\n super({\n message: \"ServiceUnavailableError\",\n statusCode: 503,\n body: body,\n rawResponse: rawResponse,\n });\n Object.setPrototypeOf(this, new.target.prototype);\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n\n this.name = \"ServiceUnavailableError\";\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as core from \"../../core/index.js\";\nimport * as errors from \"../../errors/index.js\";\nimport type * as SmoothAgentApi from \"../index.js\";\n\nexport class TooManyRequestsError extends errors.SmoothAgentApiError {\n public declare readonly body: SmoothAgentApi.Error_;\n\n constructor(body: SmoothAgentApi.Error_, rawResponse?: core.RawResponse) {\n super({\n message: \"TooManyRequestsError\",\n statusCode: 429,\n body: body,\n rawResponse: rawResponse,\n });\n Object.setPrototypeOf(this, new.target.prototype);\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n\n this.name = \"TooManyRequestsError\";\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as core from \"../../core/index.js\";\nimport * as errors from \"../../errors/index.js\";\nimport type * as SmoothAgentApi from \"../index.js\";\n\nexport class UnauthorizedError extends errors.SmoothAgentApiError {\n public declare readonly body: SmoothAgentApi.Error_;\n\n constructor(body: SmoothAgentApi.Error_, rawResponse?: core.RawResponse) {\n super({\n message: \"UnauthorizedError\",\n statusCode: 401,\n body: body,\n rawResponse: rawResponse,\n });\n Object.setPrototypeOf(this, new.target.prototype);\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n\n this.name = \"UnauthorizedError\";\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as core from \"../../core/index.js\";\nimport * as errors from \"../../errors/index.js\";\nimport type * as SmoothAgentApi from \"../index.js\";\n\nexport class UnprocessableEntityError extends errors.SmoothAgentApiError {\n public declare readonly body: SmoothAgentApi.Error_;\n\n constructor(body: SmoothAgentApi.Error_, rawResponse?: core.RawResponse) {\n super({\n message: \"UnprocessableEntityError\",\n statusCode: 422,\n body: body,\n rawResponse: rawResponse,\n });\n Object.setPrototypeOf(this, new.target.prototype);\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n\n this.name = \"UnprocessableEntityError\";\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../../../../index.js\";\n\n/**\n * @example\n * {\n * name: \"name\"\n * }\n */\nexport interface AgentConfig {\n \"SmoothAgent-Workspace\"?: string;\n \"Idempotency-Key\"?: string;\n name: string;\n /**\n * O motor. Ausente = agente SEM motor (DESIGN \u00A714, 2026-11-01): roda com a credencial DO USU\u00C1RIO e o chat escolhe\n * entre os provedores que ele tem conectados (fixo no chat). Sem motor n\u00E3o aceita `credential`\n * (`{reason: connection_requires_provider}`) nem `model`/`allowedModels`/`providerOptions` (`{reason: provider_required}`).\n */\n provider?: SmoothAgentApi.EventsProvider;\n /** Id do modelo do provedor; ausente = padr\u00E3o da conta/assinatura. `id#esfor\u00E7o` vira o esfor\u00E7o. */\n model?: string;\n /** Recorte do que o usu\u00E1rio pode escolher por chat. Ausente = s\u00F3 `model`. */\n allowedModels?: string[];\n systemPrompt?: string;\n mcp?: SmoothAgentApi.McpServer[];\n limits?: SmoothAgentApi.AgentLimits;\n box?: SmoothAgentApi.BoxProfile;\n placement?: SmoothAgentApi.Placement;\n /**\n * O que `mode: 'auto'` faz com o agente trabalhando. Ausente na cria\u00E7\u00E3o = `queue` (decis\u00E3o do dono 2026-11-01: a\n * FILA \u00E9 o padr\u00E3o; `steer` \u2014 a experi\u00EAncia do terminal \u2014 \u00E9 escolha expl\u00EDcita; fila vazia come\u00E7a na hora), GRAVADO na config \u2014 a leitura sempre traz o valor. O mesmo padr\u00E3o em\n * todas as pontas (control, realtime, box).\n */\n queue?: AgentConfig.Queue;\n hooks?: SmoothAgentApi.AgentHooks;\n /**\n * A credencial do WORKSPACE (uma conex\u00E3o) que roda o agente; vence a do usu\u00E1rio (\u00A79.7). ATEN\u00C7\u00C3O: p\u00F4r `credential` num\n * agente que j\u00E1 tem chats faz TODOS eles passarem a rodar com a conex\u00E3o no pr\u00F3ximo turno (e tirar faz voltarem pra a\n * credencial de cada usu\u00E1rio) \u2014 sem aviso aos usu\u00E1rios. Exige `provider` (agente sem motor = 400\n * `connection_requires_provider`).\n */\n credential?: SmoothAgentApi.AgentCredential;\n /** Op\u00E7\u00F5es nativas do provedor repassadas sem interpretar (permiss\u00F5es, sandbox\u2026). */\n providerOptions?: Record<string, unknown>;\n /**\n * Origens de navegador que podem usar o agente com token de USU\u00C1RIO (paridade v2 `allowed_origins`).\n * Ausente/vazio = qualquer uma. Fora da lista = `forbidden {reason:'origin_not_allowed'}`.\n */\n allowedOrigins?: string[];\n /** Tema do agente (paridade v2), vis\u00EDvel pro usu\u00E1rio no `AgentPublic`. */\n theme?: SmoothAgentApi.AgentTheme;\n /** Tool nossa: o agente busca nos chats anteriores DESTE usu\u00E1rio com ESTE agente (MCP `smoothagent`). */\n memory?: boolean;\n /**\n * Tools nossas pro agente. `schedule`: criar/listar/cancelar agendamentos no pr\u00F3prio chat. `platform`\n * (s\u00F3 agente do workspace nativo da plataforma; fora dele \u00E9 ignorado): criar/configurar os agentes da conta do\n * usu\u00E1rio que conversa e ler o que \u00E9 dele.\n */\n tools?: AgentConfig.Tools;\n metadata?: SmoothAgentApi.Metadata;\n}\n\nexport namespace AgentConfig {\n /**\n * O que `mode: 'auto'` faz com o agente trabalhando. Ausente na cria\u00E7\u00E3o = `queue` (decis\u00E3o do dono 2026-11-01: a\n * FILA \u00E9 o padr\u00E3o; `steer` \u2014 a experi\u00EAncia do terminal \u2014 \u00E9 escolha expl\u00EDcita; fila vazia come\u00E7a na hora), GRAVADO na config \u2014 a leitura sempre traz o valor. O mesmo padr\u00E3o em\n * todas as pontas (control, realtime, box).\n */\n export interface Queue {\n defaultMode: Queue.DefaultMode;\n }\n\n export namespace Queue {\n export const DefaultMode = {\n Steer: \"steer\",\n Queue: \"queue\",\n } as const;\n export type DefaultMode = (typeof DefaultMode)[keyof typeof DefaultMode];\n }\n\n /**\n * Tools nossas pro agente. `schedule`: criar/listar/cancelar agendamentos no pr\u00F3prio chat. `platform`\n * (s\u00F3 agente do workspace nativo da plataforma; fora dele \u00E9 ignorado): criar/configurar os agentes da conta do\n * usu\u00E1rio que conversa e ler o que \u00E9 dele.\n */\n export interface Tools {\n schedule?: boolean | undefined;\n platform?: boolean | undefined;\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../../../../index.js\";\n\n/**\n * @example\n * {\n * id: \"id\"\n * }\n */\nexport interface AgentConfigMergePatchUpdate {\n id: string;\n \"If-Match\"?: string;\n name?: string;\n /**\n * O motor. Ausente = agente SEM motor (DESIGN \u00A714, 2026-11-01): roda com a credencial DO USU\u00C1RIO e o chat escolhe\n * entre os provedores que ele tem conectados (fixo no chat). Sem motor n\u00E3o aceita `credential`\n * (`{reason: connection_requires_provider}`) nem `model`/`allowedModels`/`providerOptions` (`{reason: provider_required}`).\n */\n provider?: SmoothAgentApi.EventsProvider | null;\n /** Id do modelo do provedor; ausente = padr\u00E3o da conta/assinatura. `id#esfor\u00E7o` vira o esfor\u00E7o. */\n model?: string | null;\n /** Recorte do que o usu\u00E1rio pode escolher por chat. Ausente = s\u00F3 `model`. */\n allowedModels?: string[] | null;\n systemPrompt?: string | null;\n mcp?: SmoothAgentApi.McpServerMergePatchUpdateReplaceOnly[] | null;\n limits?: SmoothAgentApi.AgentLimitsMergePatchUpdateOrCreate | null;\n box?: SmoothAgentApi.BoxProfileMergePatchUpdateOrCreate | null;\n placement?: SmoothAgentApi.PlacementMergePatchUpdateOrCreate | null;\n /**\n * O que `mode: 'auto'` faz com o agente trabalhando. Ausente na cria\u00E7\u00E3o = `queue` (decis\u00E3o do dono 2026-11-01: a\n * FILA \u00E9 o padr\u00E3o; `steer` \u2014 a experi\u00EAncia do terminal \u2014 \u00E9 escolha expl\u00EDcita; fila vazia come\u00E7a na hora), GRAVADO na config \u2014 a leitura sempre traz o valor. O mesmo padr\u00E3o em\n * todas as pontas (control, realtime, box).\n */\n queue?: AgentConfigMergePatchUpdate.Queue | null;\n hooks?: SmoothAgentApi.AgentHooksMergePatchUpdateOrCreate | null;\n /**\n * A credencial do WORKSPACE (uma conex\u00E3o) que roda o agente; vence a do usu\u00E1rio (\u00A79.7). ATEN\u00C7\u00C3O: p\u00F4r `credential` num\n * agente que j\u00E1 tem chats faz TODOS eles passarem a rodar com a conex\u00E3o no pr\u00F3ximo turno (e tirar faz voltarem pra a\n * credencial de cada usu\u00E1rio) \u2014 sem aviso aos usu\u00E1rios. Exige `provider` (agente sem motor = 400\n * `connection_requires_provider`).\n */\n credential?: SmoothAgentApi.AgentCredentialMergePatchUpdateOrCreate | null;\n /** Op\u00E7\u00F5es nativas do provedor repassadas sem interpretar (permiss\u00F5es, sandbox\u2026). */\n providerOptions?: Record<string, unknown> | null;\n /**\n * Origens de navegador que podem usar o agente com token de USU\u00C1RIO (paridade v2 `allowed_origins`).\n * Ausente/vazio = qualquer uma. Fora da lista = `forbidden {reason:'origin_not_allowed'}`.\n */\n allowedOrigins?: string[] | null;\n /** Tema do agente (paridade v2), vis\u00EDvel pro usu\u00E1rio no `AgentPublic`. */\n theme?: SmoothAgentApi.AgentThemeMergePatchUpdateOrCreate | null;\n /** Tool nossa: o agente busca nos chats anteriores DESTE usu\u00E1rio com ESTE agente (MCP `smoothagent`). */\n memory?: boolean | null;\n /**\n * Tools nossas pro agente. `schedule`: criar/listar/cancelar agendamentos no pr\u00F3prio chat. `platform`\n * (s\u00F3 agente do workspace nativo da plataforma; fora dele \u00E9 ignorado): criar/configurar os agentes da conta do\n * usu\u00E1rio que conversa e ler o que \u00E9 dele.\n */\n tools?: AgentConfigMergePatchUpdate.Tools | null;\n metadata?: SmoothAgentApi.MetadataMergePatchUpdateOrCreate | null;\n}\n\nexport namespace AgentConfigMergePatchUpdate {\n export interface Queue {\n defaultMode?: (Queue.DefaultMode | null) | undefined;\n }\n\n export namespace Queue {\n export const DefaultMode = {\n Steer: \"steer\",\n Queue: \"queue\",\n } as const;\n export type DefaultMode = (typeof DefaultMode)[keyof typeof DefaultMode];\n }\n\n export interface Tools {\n schedule?: (boolean | null) | undefined;\n platform?: (boolean | null) | undefined;\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../../../../index.js\";\n\n/**\n * @example\n * {\n * id: \"id\",\n * content: \"content\"\n * }\n */\nexport interface SendMessage {\n id: string;\n \"SmoothAgent-As-User\"?: string;\n \"Idempotency-Key\"?: string;\n /** Apenas chave de conta/workspace; agente autor precisa pertencer ao workspace do chat. */\n origin?: SmoothAgentApi.AgentMessageOrigin;\n /** At\u00E9 16 chaves, valores texto de at\u00E9 512 caracteres. Nunca entra no prompt do modelo. */\n metadata?: Record<string, string>;\n /** Texto ou partes (`ContentPart[]`, do contract/events). */\n content: SendMessage.Content;\n attachments?: string[];\n mode?: SendMessage.Mode;\n /**\n * Id da mensagem gerado pelo cliente (a SDK gera) pra exatamente-uma-vez; vira o\n * `messageId`. Sempre com prefixo `msg_` \u2014 \u00E9 como `history?around=` distingue mensagem de n\u00FAmero\n * de evento. Ausente = o servidor gera um `msg_\u2026`.\n */\n clientMessageId?: string;\n}\n\nexport namespace SendMessage {\n /**\n * Texto ou partes (`ContentPart[]`, do contract/events).\n */\n export type Content = string | SmoothAgentApi.EventsContentPart[];\n export const Mode = {\n Auto: \"auto\",\n Steer: \"steer\",\n Queue: \"queue\",\n } as const;\n export type Mode = (typeof Mode)[keyof typeof Mode];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nexport interface ChatsSendResponse {\n messageId: string;\n /** `duplicate` = este `clientMessageId` j\u00E1 estava no log (reenvio inofensivo; nada novo entrou). */\n status: ChatsSendResponse.Status;\n inboxVersion?: number | undefined;\n runId?: string | undefined;\n}\n\nexport namespace ChatsSendResponse {\n /** `duplicate` = este `clientMessageId` j\u00E1 estava no log (reenvio inofensivo; nada novo entrou). */\n export const Status = {\n Pending: \"pending\",\n Duplicate: \"duplicate\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\nexport interface Agent {\n id: string;\n workspaceId: string;\n name: string;\n /**\n * O motor. Ausente = agente SEM motor (DESIGN \u00A714, 2026-11-01): roda com a credencial DO USU\u00C1RIO e o chat escolhe\n * entre os provedores que ele tem conectados (fixo no chat). Sem motor n\u00E3o aceita `credential`\n * (`{reason: connection_requires_provider}`) nem `model`/`allowedModels`/`providerOptions` (`{reason: provider_required}`).\n */\n provider?: SmoothAgentApi.EventsProvider | undefined;\n /** Id do modelo do provedor; ausente = padr\u00E3o da conta/assinatura. `id#esfor\u00E7o` vira o esfor\u00E7o. */\n model?: string | undefined;\n /** Recorte do que o usu\u00E1rio pode escolher por chat. Ausente = s\u00F3 `model`. */\n allowedModels?: string[] | undefined;\n systemPrompt?: string | undefined;\n mcp?: SmoothAgentApi.McpServer[] | undefined;\n limits?: SmoothAgentApi.AgentLimits | undefined;\n box?: SmoothAgentApi.BoxProfile | undefined;\n placement?: SmoothAgentApi.Placement | undefined;\n /**\n * O que `mode: 'auto'` faz com o agente trabalhando. Ausente na cria\u00E7\u00E3o = `queue` (decis\u00E3o do dono 2026-11-01: a\n * FILA \u00E9 o padr\u00E3o; `steer` \u2014 a experi\u00EAncia do terminal \u2014 \u00E9 escolha expl\u00EDcita; fila vazia come\u00E7a na hora), GRAVADO na config \u2014 a leitura sempre traz o valor. O mesmo padr\u00E3o em\n * todas as pontas (control, realtime, box).\n */\n queue?: Agent.Queue | undefined;\n hooks?: SmoothAgentApi.AgentHooks | undefined;\n /**\n * A credencial do WORKSPACE (uma conex\u00E3o) que roda o agente; vence a do usu\u00E1rio (\u00A79.7). ATEN\u00C7\u00C3O: p\u00F4r `credential` num\n * agente que j\u00E1 tem chats faz TODOS eles passarem a rodar com a conex\u00E3o no pr\u00F3ximo turno (e tirar faz voltarem pra a\n * credencial de cada usu\u00E1rio) \u2014 sem aviso aos usu\u00E1rios. Exige `provider` (agente sem motor = 400\n * `connection_requires_provider`).\n */\n credential?: SmoothAgentApi.AgentCredential | undefined;\n /** Op\u00E7\u00F5es nativas do provedor repassadas sem interpretar (permiss\u00F5es, sandbox\u2026). */\n providerOptions?: Record<string, unknown> | undefined;\n /**\n * Origens de navegador que podem usar o agente com token de USU\u00C1RIO (paridade v2 `allowed_origins`).\n * Ausente/vazio = qualquer uma. Fora da lista = `forbidden {reason:'origin_not_allowed'}`.\n */\n allowedOrigins?: string[] | undefined;\n /** Tema do agente (paridade v2), vis\u00EDvel pro usu\u00E1rio no `AgentPublic`. */\n theme?: SmoothAgentApi.AgentTheme | undefined;\n /** Tool nossa: o agente busca nos chats anteriores DESTE usu\u00E1rio com ESTE agente (MCP `smoothagent`). */\n memory?: boolean | undefined;\n /**\n * Tools nossas pro agente. `schedule`: criar/listar/cancelar agendamentos no pr\u00F3prio chat. `platform`\n * (s\u00F3 agente do workspace nativo da plataforma; fora dele \u00E9 ignorado): criar/configurar os agentes da conta do\n * usu\u00E1rio que conversa e ler o que \u00E9 dele.\n */\n tools?: Agent.Tools | undefined;\n metadata?: SmoothAgentApi.Metadata | undefined;\n /** Sobe a cada PATCH; vai no `ETag`. Os runs registram com qual revis\u00E3o rodaram. */\n revision: number;\n capabilities: SmoothAgentApi.EventsCapabilities;\n createdAt: SmoothAgentApi.Timestamp;\n updatedAt: SmoothAgentApi.Timestamp;\n}\n\nexport namespace Agent {\n /**\n * O que `mode: 'auto'` faz com o agente trabalhando. Ausente na cria\u00E7\u00E3o = `queue` (decis\u00E3o do dono 2026-11-01: a\n * FILA \u00E9 o padr\u00E3o; `steer` \u2014 a experi\u00EAncia do terminal \u2014 \u00E9 escolha expl\u00EDcita; fila vazia come\u00E7a na hora), GRAVADO na config \u2014 a leitura sempre traz o valor. O mesmo padr\u00E3o em\n * todas as pontas (control, realtime, box).\n */\n export interface Queue {\n defaultMode: Queue.DefaultMode;\n }\n\n export namespace Queue {\n export const DefaultMode = {\n Steer: \"steer\",\n Queue: \"queue\",\n } as const;\n export type DefaultMode = (typeof DefaultMode)[keyof typeof DefaultMode];\n }\n\n /**\n * Tools nossas pro agente. `schedule`: criar/listar/cancelar agendamentos no pr\u00F3prio chat. `platform`\n * (s\u00F3 agente do workspace nativo da plataforma; fora dele \u00E9 ignorado): criar/configurar os agentes da conta do\n * usu\u00E1rio que conversa e ler o que \u00E9 dele.\n */\n export interface Tools {\n schedule?: boolean | undefined;\n platform?: boolean | undefined;\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * Sa\u00FAde do agente: credencial, MCP (testado na hora com `probeMcp`) e boxes.\n */\nexport interface AgentHealth {\n agentId: string;\n name: string;\n provider: string;\n credential: AgentHealth.Credential;\n mcp: AgentHealth.Mcp.Item[];\n boxes: AgentHealth.Boxes.Item[];\n}\n\nexport namespace AgentHealth {\n export interface Credential {\n source: Credential.Source;\n connectionId: string | null;\n status: Credential.Status;\n via: string | null;\n expiresAt: SmoothAgentApi.Timestamp | null;\n message: string;\n }\n\n export namespace Credential {\n export const Source = {\n Connection: \"connection\",\n User: \"user\",\n } as const;\n export type Source = (typeof Source)[keyof typeof Source];\n export const Status = {\n Ok: \"ok\",\n Expired: \"expired\",\n Dead: \"dead\",\n NotConnected: \"not_connected\",\n PerUser: \"per_user\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n }\n\n export type Mcp = Mcp.Item[];\n\n export namespace Mcp {\n export interface Item {\n name: string;\n url: string;\n status: Item.Status;\n latencyMs?: number | undefined;\n error?: string | undefined;\n }\n\n export namespace Item {\n export const Status = {\n Online: \"online\",\n Offline: \"offline\",\n NotProbed: \"not_probed\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n }\n }\n\n export type Boxes = Boxes.Item[];\n\n export namespace Boxes {\n export interface Item {\n machineId: string;\n kind: string;\n boxKey: string | null;\n state: string;\n instanceId: string | null;\n busy: boolean | null;\n ramMb: number | null;\n message: string;\n }\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nexport interface AgentMessageOrigin {\n kind: AgentMessageOrigin.Kind;\n agentId: string;\n displayName?: string | undefined;\n avatarUrl?: string | undefined;\n}\n\nexport namespace AgentMessageOrigin {\n export const Kind = {\n Agent: \"agent\",\n } as const;\n export type Kind = (typeof Kind)[keyof typeof Kind];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\nexport interface ApiKey {\n id: string;\n name: string;\n kind: ApiKey.Kind;\n workspaceId: string | null;\n scopes: SmoothAgentApi.Scope[];\n agents: string[] | null;\n /** Os 4 \u00FAltimos caracteres do segredo, pra reconhecer. */\n last4: string;\n createdAt: SmoothAgentApi.Timestamp;\n lastUsedAt: SmoothAgentApi.Timestamp | null;\n expiresAt: SmoothAgentApi.Timestamp | null;\n revokedAt: SmoothAgentApi.Timestamp | null;\n /**\n * Quem criou, quando foi um membro pelo dashboard (preenchido na LISTA). A chave \u00E9 da organiza\u00E7\u00E3o: continua valendo\n * depois que o membro sai (padr\u00E3o Stripe); o remover membro devolve as dele pra oferecer revogar. null = criada por\n * outra chave/plataforma, ou fora da lista.\n */\n createdBy: ApiKey.CreatedBy | null;\n}\n\nexport namespace ApiKey {\n export const Kind = {\n Account: \"account\",\n Workspace: \"workspace\",\n Restricted: \"restricted\",\n } as const;\n export type Kind = (typeof Kind)[keyof typeof Kind];\n\n export interface CreatedBy {\n memberId: string;\n email: string | null;\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\nexport interface ApiKeyWithSecret {\n id: string;\n name: string;\n kind: ApiKeyWithSecret.Kind;\n workspaceId: string | null;\n scopes: SmoothAgentApi.Scope[];\n agents: string[] | null;\n /** Os 4 \u00FAltimos caracteres do segredo, pra reconhecer. */\n last4: string;\n createdAt: SmoothAgentApi.Timestamp;\n lastUsedAt: SmoothAgentApi.Timestamp | null;\n expiresAt: SmoothAgentApi.Timestamp | null;\n revokedAt: SmoothAgentApi.Timestamp | null;\n /**\n * Quem criou, quando foi um membro pelo dashboard (preenchido na LISTA). A chave \u00E9 da organiza\u00E7\u00E3o: continua valendo\n * depois que o membro sai (padr\u00E3o Stripe); o remover membro devolve as dele pra oferecer revogar. null = criada por\n * outra chave/plataforma, ou fora da lista.\n */\n createdBy: ApiKeyWithSecret.CreatedBy | null;\n /** `sa_sk_\u2026` (cheia) ou `sa_rk_\u2026` (restrita). S\u00F3 nesta resposta \u2014 nunca mais. */\n secret: string;\n}\n\nexport namespace ApiKeyWithSecret {\n export const Kind = {\n Account: \"account\",\n Workspace: \"workspace\",\n Restricted: \"restricted\",\n } as const;\n export type Kind = (typeof Kind)[keyof typeof Kind];\n\n export interface CreatedBy {\n memberId: string;\n email: string | null;\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\n/**\n * S\u00F3 PRE\u00C7O: nunca custo, margem nem nota interna.\n */\nexport interface BillingLine {\n service: BillingLine.Service;\n detail: string;\n priceUsd: number;\n}\n\nexport namespace BillingLine {\n export const Service = {\n Compute: \"compute\",\n Storage: \"storage\",\n Logs: \"logs\",\n Other: \"other\",\n Shared: \"shared\",\n Cloudflare: \"cloudflare\",\n Llm: \"llm\",\n } as const;\n export type Service = (typeof Service)[keyof typeof Service];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nexport interface BoxFileContent {\n path: string;\n /** `utf8` = texto; `base64` = bin\u00E1rio. */\n encoding: BoxFileContent.Encoding;\n content: string;\n sizeBytes: number;\n /** Arquivo maior que o teto (1 MB): veio s\u00F3 o come\u00E7o. */\n truncated: boolean;\n}\n\nexport namespace BoxFileContent {\n /** `utf8` = texto; `base64` = bin\u00E1rio. */\n export const Encoding = {\n Utf8: \"utf8\",\n Base64: \"base64\",\n } as const;\n export type Encoding = (typeof Encoding)[keyof typeof Encoding];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\nexport interface BoxFileEntry {\n name: string;\n type: BoxFileEntry.Type;\n sizeBytes?: number | undefined;\n modifiedAt?: SmoothAgentApi.Timestamp | undefined;\n}\n\nexport namespace BoxFileEntry {\n export const Type = {\n File: \"file\",\n Dir: \"dir\",\n Symlink: \"symlink\",\n } as const;\n export type Type = (typeof Type)[keyof typeof Type];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\nexport interface Chat {\n id: string;\n workspaceId: string;\n userId: string;\n /** O \u00DALTIMO agente usado \u2014 o que a pr\u00F3xima mensagem usa se ningu\u00E9m trocar. */\n agentId: string;\n provider: SmoothAgentApi.EventsProvider;\n /** Modelo fixado neste chat. Ausente = o padr\u00E3o do agente/da conta (o resolvido est\u00E1 em `/selection`). Nunca `null`. */\n model?: string | undefined;\n /** Esfor\u00E7o de racioc\u00EDnio, separado do modelo (P1). Ausente = padr\u00E3o. */\n effort?: string | undefined;\n /** Troca agendada esperando o run ativo completar. */\n scheduledSwitch: SmoothAgentApi.EventsScheduledSwitch | null;\n machineId: string;\n title: string | null;\n metadata: SmoothAgentApi.Metadata;\n /** Proje\u00E7\u00E3o pra lateral: vem do log, atualizada pelo ingest. */\n state: Chat.State;\n /** Cursor do \u00FAltimo evento: `String(seq)` (o que a SDK usa pra assinar). */\n lastEventId: string | null;\n lastEventSeq: number;\n /** Respostas do agente (runs fechados) depois do que esta pessoa marcou como lido (P8). */\n unreadCount: number;\n /** At\u00E9 onde esta pessoa leu (`String(seq)`), ou null se nunca marcou. */\n lastReadEventId: string | null;\n createdAt: SmoothAgentApi.Timestamp;\n updatedAt: SmoothAgentApi.Timestamp;\n}\n\nexport namespace Chat {\n /** Proje\u00E7\u00E3o pra lateral: vem do log, atualizada pelo ingest. */\n export const State = {\n Idle: \"idle\",\n Starting: \"starting\",\n Working: \"working\",\n Waiting: \"waiting\",\n } as const;\n export type State = (typeof State)[keyof typeof State];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\n/**\n * O chat apagado: some na hora; `pending` = a limpeza da box ainda corre (sem esperar o Detona), `done` = j\u00E1 foi.\n */\nexport interface ChatDeleted {\n id: string;\n deleted: boolean;\n cleanup: ChatDeleted.Cleanup;\n}\n\nexport namespace ChatDeleted {\n export const Cleanup = {\n Pending: \"pending\",\n Done: \"done\",\n } as const;\n export type Cleanup = (typeof Cleanup)[keyof typeof Cleanup];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * Tudo o que o seletor da tela precisa, pronto.\n */\nexport interface ChatSelection {\n current: ChatSelection.Current;\n scheduledSwitch: SmoothAgentApi.EventsScheduledSwitch | null;\n /**\n * O que d\u00E1 pra escolher: os agentes que o usu\u00E1rio pode usar, cada um com S\u00D3 os modelos\n * conectados pra ele (credencial do agente > a do usu\u00E1rio). Agente sem credencial vem com\n * `ready: false` e `needs` (a tela oferece conectar), nunca escondido sem motivo.\n */\n options: SmoothAgentApi.AgentPublic[];\n /** `false` enquanto h\u00E1 run ativo: a troca seria agendada, n\u00E3o imediata. */\n switchableNow: boolean;\n}\n\nexport namespace ChatSelection {\n export interface Current {\n agentId: string;\n agentName: string | null;\n provider: SmoothAgentApi.EventsProvider;\n /** O modelo que VAI RODAR, resolvido (chat > agente > padr\u00E3o da credencial). Ausente s\u00F3 se o provedor n\u00E3o informou nenhum. */\n model?: string | undefined;\n modelName?: string | undefined;\n /** O modelo concreto em que o `model` (alias da assinatura) resolve agora, segundo o CLI. Ausente = `model` j\u00E1 \u00E9 concreto. */\n resolvedModel?: string | undefined;\n /** Esfor\u00E7o separado do modelo (P1). */\n effort?: string | undefined;\n /** De onde vem a credencial que roda este chat; null = nenhuma conectada. */\n credentialVia: Current.CredentialVia | null;\n }\n\n export namespace Current {\n export const CredentialVia = {\n Agent: \"agent\",\n Subscription: \"subscription\",\n Key: \"key\",\n } as const;\n export type CredentialVia = (typeof CredentialVia)[keyof typeof CredentialVia];\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * Uma tarefa viva ou recente do chat: subagente ou processo de fundo do agente.\n */\nexport interface ChatTask {\n id: string;\n kind: ChatTask.Kind;\n /** O que o agente disse que \u00E9 (descri\u00E7\u00E3o do subagente, a linha de comando\u2026). */\n title: string;\n status: ChatTask.Status;\n /** O item do log que abriu a tarefa (pular pra ela no hist\u00F3rico). */\n itemId?: string | undefined;\n startedAt: SmoothAgentApi.Timestamp;\n endedAt?: SmoothAgentApi.Timestamp | undefined;\n exitCode?: number | undefined;\n}\n\nexport namespace ChatTask {\n export const Kind = {\n Subagent: \"subagent\",\n Command: \"command\",\n Monitor: \"monitor\",\n Terminal: \"terminal\",\n } as const;\n export type Kind = (typeof Kind)[keyof typeof Kind];\n export const Status = {\n Running: \"running\",\n Completed: \"completed\",\n Failed: \"failed\",\n Stopped: \"stopped\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\n/**\n * Uma op\u00E7\u00E3o de resposta a um pedido de aprova\u00E7\u00E3o (vocabul\u00E1rio do ACP).\n */\nexport interface EventsApprovalOption {\n /** Id. */\n id: string;\n /** R\u00F3tulo. */\n label?: string | undefined;\n /** ACP */\n kind: EventsApprovalOption.Kind;\n /** o que o \"sempre\" grava */\n detail?: unknown | undefined;\n}\n\nexport namespace EventsApprovalOption {\n /** ACP */\n export const Kind = {\n AllowOnce: \"allow_once\",\n AllowAlways: \"allow_always\",\n RejectOnce: \"reject_once\",\n RejectAlways: \"reject_always\",\n Other: \"other\",\n } as const;\n export type Kind = (typeof Kind)[keyof typeof Kind];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\n/**\n * O que o provedor suporta, declarado no initialize; vai em agent.get(). Versionado.\n */\nexport interface EventsCapabilities {\n version: number;\n /** Racioc\u00EDnio. */\n reasoning?: boolean | undefined;\n /** Mostra resumo do racioc\u00EDnio. */\n reasoningSummary?: boolean | undefined;\n /** Mostra plano (todo list). */\n plans?: boolean | undefined;\n /** Prop\u00F5e plano pra aprovar. */\n proposedPlans?: boolean | undefined;\n /** Pede aprova\u00E7\u00E3o. */\n approvals?: boolean | undefined;\n /** Perguntas. */\n questions?: boolean | undefined;\n /** Roda subagentes. */\n subagents?: boolean | undefined;\n /** Trabalho que segue depois do turno. */\n background?: boolean | undefined;\n /** o provedor abre turno sozinho quando uma tarefa acaba */\n wakeTurns?: boolean | undefined;\n /** Para uma tarefa sem parar o run. */\n taskStop?: boolean | undefined;\n /** Agenda (schedule_task). */\n timers?: boolean | undefined;\n /** Mostra mudan\u00E7a de arquivo. */\n fileChanges?: boolean | undefined;\n /** Quantidade de imagens. */\n images?: boolean | undefined;\n /** Lista/l\u00EA arquivos da box. */\n boxFiles?: boolean | undefined;\n /** Informa a janela de contexto. */\n contextUsage?: boolean | undefined;\n /** Informa os limites. */\n usageLimits?: boolean | undefined;\n /** Informa custo. */\n costReporting?: boolean | undefined;\n /** Roda tools em paralelo. */\n parallelTools?: boolean | undefined;\n /** Como entra mensagem com turno rodando: native (steer do provedor), restart (interrompe e reinicia) ou none. */\n steering: EventsCapabilities.Steering;\n /** onde o steer nativo entra */\n steerBoundary?: EventsCapabilities.SteerBoundary | undefined;\n /** retirar steer entregue e n\u00E3o lido: Claude interrupt{cancel_queued} = sim */\n steerRecall?: boolean | undefined;\n /** Codex: espera o turno */\n steerDuringCompaction?: EventsCapabilities.SteerDuringCompaction | undefined;\n /** o que o steer nativo corta: nada (Claude next: espera a tool), a resposta em curso (Codex 0.163: o adaptador fecha o item interrupted antes do message.consumed), ou tools em andamento */\n steerInterrupts?: EventsCapabilities.SteerInterrupts | undefined;\n /** Como o STOP para o turno: native (pedido ao provedor) ou kill (mata o processo). */\n interrupt?: EventsCapabilities.Interrupt | undefined;\n /** Como sabemos que o provedor leu a mensagem: echo, item ou order. */\n consumptionSignal?: EventsCapabilities.ConsumptionSignal | undefined;\n /** O que chega em peda\u00E7os (deltas) enquanto o item est\u00E1 aberto. */\n streaming?: EventsCapabilities.Streaming | undefined;\n /** Troca de modelo na mesma sess\u00E3o. */\n modelSwitchInSession?: boolean | undefined;\n /** troca dos servidores MCP (config do agente): live = setMcpServers no processo vivo, mesma sess\u00E3o, s\u00F3 entre turnos (Claude mcp_set_servers); restart = a box reinicia o processo com resume; none/ausente = idem restart */\n mcpSwitch?: EventsCapabilities.McpSwitch | undefined;\n /** troca de esfor\u00E7o: live = na mesma sess\u00E3o, vale a partir do PR\u00D3XIMO turno, nunca no meio de um (Claude apply_flag_settings{effortLevel}, Codex por turn/start); restart = precisa reiniciar o processo (com --resume); none = n\u00E3o troca */\n effortSwitch?: EventsCapabilities.EffortSwitch | undefined;\n /** Retomar a sess\u00E3o nativa. */\n resume?: boolean | undefined;\n /** como recebe o hist\u00F3rico numa troca de provedor (Claude: .jsonl sint\u00E9tico + --resume) */\n handoffInject?: EventsCapabilities.HandoffInject | undefined;\n}\n\nexport namespace EventsCapabilities {\n /** Como entra mensagem com turno rodando: native (steer do provedor), restart (interrompe e reinicia) ou none. */\n export const Steering = {\n Native: \"native\",\n Restart: \"restart\",\n None: \"none\",\n } as const;\n export type Steering = (typeof Steering)[keyof typeof Steering];\n /** onde o steer nativo entra */\n export const SteerBoundary = {\n Tool: \"tool\",\n ModelCall: \"model_call\",\n Turn: \"turn\",\n } as const;\n export type SteerBoundary = (typeof SteerBoundary)[keyof typeof SteerBoundary];\n /** Codex: espera o turno */\n export const SteerDuringCompaction = {\n Joins: \"joins\",\n WaitsTurn: \"waits_turn\",\n } as const;\n export type SteerDuringCompaction = (typeof SteerDuringCompaction)[keyof typeof SteerDuringCompaction];\n /** o que o steer nativo corta: nada (Claude next: espera a tool), a resposta em curso (Codex 0.163: o adaptador fecha o item interrupted antes do message.consumed), ou tools em andamento */\n export const SteerInterrupts = {\n Nothing: \"nothing\",\n Response: \"response\",\n Tools: \"tools\",\n } as const;\n export type SteerInterrupts = (typeof SteerInterrupts)[keyof typeof SteerInterrupts];\n /** Como o STOP para o turno: native (pedido ao provedor) ou kill (mata o processo). */\n export const Interrupt = {\n Native: \"native\",\n Kill: \"kill\",\n } as const;\n export type Interrupt = (typeof Interrupt)[keyof typeof Interrupt];\n /** Como sabemos que o provedor leu a mensagem: echo, item ou order. */\n export const ConsumptionSignal = {\n Echo: \"echo\",\n Item: \"item\",\n Order: \"order\",\n } as const;\n export type ConsumptionSignal = (typeof ConsumptionSignal)[keyof typeof ConsumptionSignal];\n\n /**\n * O que chega em peda\u00E7os (deltas) enquanto o item est\u00E1 aberto.\n */\n export interface Streaming {\n /** Texto. */\n text?: boolean | undefined;\n /** Racioc\u00EDnio. */\n reasoning?: boolean | undefined;\n /** Entrada da tool em peda\u00E7os. */\n toolInput?: boolean | undefined;\n /** Sa\u00EDda de comando em peda\u00E7os. */\n commandOutput?: boolean | undefined;\n /** Texto do plano em peda\u00E7os. */\n planText?: boolean | undefined;\n }\n\n /** troca dos servidores MCP (config do agente): live = setMcpServers no processo vivo, mesma sess\u00E3o, s\u00F3 entre turnos (Claude mcp_set_servers); restart = a box reinicia o processo com resume; none/ausente = idem restart */\n export const McpSwitch = {\n Live: \"live\",\n Restart: \"restart\",\n None: \"none\",\n } as const;\n export type McpSwitch = (typeof McpSwitch)[keyof typeof McpSwitch];\n /** troca de esfor\u00E7o: live = na mesma sess\u00E3o, vale a partir do PR\u00D3XIMO turno, nunca no meio de um (Claude apply_flag_settings{effortLevel}, Codex por turn/start); restart = precisa reiniciar o processo (com --resume); none = n\u00E3o troca */\n export const EffortSwitch = {\n Live: \"live\",\n Restart: \"restart\",\n None: \"none\",\n } as const;\n export type EffortSwitch = (typeof EffortSwitch)[keyof typeof EffortSwitch];\n /** como recebe o hist\u00F3rico numa troca de provedor (Claude: .jsonl sint\u00E9tico + --resume) */\n export const HandoffInject = {\n NativeHistory: \"native_history\",\n ContextMessage: \"context_message\",\n None: \"none\",\n } as const;\n export type HandoffInject = (typeof HandoffInject)[keyof typeof HandoffInject];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\n/**\n * anexo a um campo string do item aberto\n */\nexport interface EventsDelta {\n /** Caminho do arquivo. */\n path: EventsDelta.Path;\n /** \u00CDndice no array. */\n index?: number | undefined;\n /** Texto a anexar. */\n append: string;\n}\n\nexport namespace EventsDelta {\n /** Caminho do arquivo. */\n export const Path = {\n Text: \"text\",\n Summary: \"summary\",\n InputText: \"inputText\",\n Output: \"output\",\n } as const;\n export type Path = (typeof Path)[keyof typeof Path];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\n/**\n * Dados (`data`) do evento `chat.state`.\n */\nexport interface EventsEChatStateData {\n /** Estado do chat: idle (parado), starting (pedido aceito, provedor ainda n\u00E3o come\u00E7ou), working (rodando), waiting (esperando resposta do usu\u00E1rio). */\n state: EventsEChatStateData.State;\n}\n\nexport namespace EventsEChatStateData {\n /** Estado do chat: idle (parado), starting (pedido aceito, provedor ainda n\u00E3o come\u00E7ou), working (rodando), waiting (esperando resposta do usu\u00E1rio). */\n export const State = {\n Idle: \"idle\",\n Starting: \"starting\",\n Working: \"working\",\n Waiting: \"waiting\",\n } as const;\n export type State = (typeof State)[keyof typeof State];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * Dados (`data`) do evento `item.retracted`.\n */\nexport interface EventsEItemRetractedData {\n /** Por que o item saiu: superseded (outro o substitui), provider_rewrite ou rollback. */\n reason?: EventsEItemRetractedData.Reason | undefined;\n supersededBy?: SmoothAgentApi.EventsItemId | undefined;\n}\n\nexport namespace EventsEItemRetractedData {\n /** Por que o item saiu: superseded (outro o substitui), provider_rewrite ou rollback. */\n export const Reason = {\n Superseded: \"superseded\",\n ProviderRewrite: \"provider_rewrite\",\n Rollback: \"rollback\",\n } as const;\n export type Reason = (typeof Reason)[keyof typeof Reason];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\n/**\n * Dados (`data`) do evento `notice`.\n */\nexport interface EventsENoticeData {\n /** Gravidade do aviso. */\n level: EventsENoticeData.Level;\n /** C\u00F3digo do aviso (ex.: mcp_unavailable). */\n code?: string | undefined;\n /** Texto do aviso pra tela. */\n message: string;\n}\n\nexport namespace EventsENoticeData {\n /** Gravidade do aviso. */\n export const Level = {\n Info: \"info\",\n Warning: \"warning\",\n } as const;\n export type Level = (typeof Level)[keyof typeof Level];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * Dados (`data`) do evento `run.completed`.\n */\nexport interface EventsERunCompletedData {\n runId: SmoothAgentApi.EventsRunId;\n /** Como o run fechou: completed, stopped (STOP) ou failed. */\n status: EventsERunCompletedData.Status;\n /** Tentativas feitas. */\n attempts?: number | undefined;\n usage?: SmoothAgentApi.EventsUsage | undefined;\n error?: SmoothAgentApi.EventsFailure | undefined;\n /** O STOP que fechou. */\n stop?: EventsERunCompletedData.Stop | undefined;\n /** nativo da \u00FAltima chamada: end_turn, max_tokens\u2026 */\n stopReason?: string | undefined;\n /** Dura\u00E7\u00E3o em milissegundos. */\n durationMs?: number | undefined;\n}\n\nexport namespace EventsERunCompletedData {\n /** Como o run fechou: completed, stopped (STOP) ou failed. */\n export const Status = {\n Completed: \"completed\",\n Stopped: \"stopped\",\n Failed: \"failed\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n\n /**\n * O STOP que fechou.\n */\n export interface Stop {\n stopId?: SmoothAgentApi.EventsStopId | undefined;\n by?: SmoothAgentApi.EventsOrigin | undefined;\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * Dados (`data`) do evento `run.started`.\n */\nexport interface EventsERunStartedData {\n runId: SmoothAgentApi.EventsRunId;\n /** Tentativa deste run (1 = a primeira; sobe em retry e auth_retry). */\n attempt: number;\n /** Por que esta tentativa abriu: initial, steer_restart (steer que reinicia), retry (erro recuper\u00E1vel), auth_retry (depois do 401, M1). */\n reason: EventsERunStartedData.Reason;\n trigger: SmoothAgentApi.EventsRunTrigger;\n agent: SmoothAgentApi.EventsRunAgent;\n}\n\nexport namespace EventsERunStartedData {\n /** Por que esta tentativa abriu: initial, steer_restart (steer que reinicia), retry (erro recuper\u00E1vel), auth_retry (depois do 401, M1). */\n export const Reason = {\n Initial: \"initial\",\n SteerRestart: \"steer_restart\",\n Retry: \"retry\",\n AuthRetry: \"auth_retry\",\n } as const;\n export type Reason = (typeof Reason)[keyof typeof Reason];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * Dados (`data`) do evento `run.waiting`.\n */\nexport interface EventsERunWaitingData {\n /** O que o run espera: input (aprova\u00E7\u00E3o/pergunta), task (tarefa em background) ou timer (agendamento). */\n reason: EventsERunWaitingData.Reason;\n /** Pedidos (aprova\u00E7\u00E3o/pergunta) envolvidos. */\n requestIds?: SmoothAgentApi.EventsRequestId[] | undefined;\n /** Tarefas envolvidas. */\n taskIds?: SmoothAgentApi.EventsTaskId[] | undefined;\n wakeAt?: SmoothAgentApi.EventsTimestamp | undefined;\n}\n\nexport namespace EventsERunWaitingData {\n /** O que o run espera: input (aprova\u00E7\u00E3o/pergunta), task (tarefa em background) ou timer (agendamento). */\n export const Reason = {\n Input: \"input\",\n Task: \"task\",\n Timer: \"timer\",\n } as const;\n export type Reason = (typeof Reason)[keyof typeof Reason];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * Dados (`data`) do evento `session.started`.\n */\nexport interface EventsESessionStartedData {\n provider: SmoothAgentApi.EventsProvider;\n /** Modelo da sess\u00E3o, quando o provedor informa. */\n model?: string | undefined;\n /** true = retomou a sess\u00E3o nativa existente (resume); false = sess\u00E3o nova. */\n resumed: boolean;\n /** session_lost = a sess\u00E3o nativa sumiu (conta reconectada, chat noutra m\u00E1quina): sess\u00E3o NOVA do mesmo provedor, reinjetada com o hist\u00F3rico do log */\n reason?: EventsESessionStartedData.Reason | undefined;\n agent?: SmoothAgentApi.EventsAgentSelection | undefined;\n /** reason=reset com clearHistory (R7): o reducer tira do estado os itens FECHADOS, os runs e as tarefas fechadas; mant\u00E9m selection, usage, limits, context e o que est\u00E1 aberto */\n clearHistory?: boolean | undefined;\n native?: SmoothAgentApi.EventsNativeRef | undefined;\n /** Vers\u00E3o do engine do provedor. */\n providerVersion?: string | undefined;\n /** Servidores MCP e o estado de cada um. */\n mcpServers?: EventsESessionStartedData.McpServers.Item[] | undefined;\n /** Quantidade de tools. */\n tools?: number | undefined;\n}\n\nexport namespace EventsESessionStartedData {\n /** session_lost = a sess\u00E3o nativa sumiu (conta reconectada, chat noutra m\u00E1quina): sess\u00E3o NOVA do mesmo provedor, reinjetada com o hist\u00F3rico do log */\n export const Reason = {\n First: \"first\",\n Reset: \"reset\",\n Switch: \"switch\",\n SessionLost: \"session_lost\",\n ProcessRestart: \"process_restart\",\n Resume: \"resume\",\n } as const;\n export type Reason = (typeof Reason)[keyof typeof Reason];\n export type McpServers = McpServers.Item[];\n\n export namespace McpServers {\n export interface Item {\n /** Nome. */\n name: string;\n /** Estado. */\n status: string;\n /** Quantidade de tools. */\n tools?: number | undefined;\n }\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\n/**\n * o que foi reinjetado na sess\u00E3o nova\n */\nexport interface EventsHandoffInjected {\n /** primeiro evento reinjetado */\n fromSeq?: number | undefined;\n /** \u00FAltimo */\n toSeq?: number | undefined;\n /** Mensagens. */\n messages?: number | undefined;\n /** Quantidade de itens. */\n items?: number | undefined;\n /** medido ou estimado \u2014 ver estimated */\n tokens?: number | undefined;\n /** tokens \u00E9 estimativa do adaptador, n\u00E3o contagem do provedor */\n estimated?: boolean | undefined;\n /** Quantidade de imagens. */\n images?: number | undefined;\n /** Por onde. */\n via?: EventsHandoffInjected.Via | undefined;\n}\n\nexport namespace EventsHandoffInjected {\n /** Por onde. */\n export const Via = {\n NativeHistory: \"native_history\",\n ContextMessage: \"context_message\",\n } as const;\n export type Via = (typeof Via)[keyof typeof Via];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\n/**\n * o que N\u00C3O passou\n */\nexport interface EventsHandoffLost {\n /** Primeiro seq. */\n fromSeq?: number | undefined;\n /** \u00DAltimo seq. */\n toSeq?: number | undefined;\n /** Quantidade de itens. */\n items?: number | undefined;\n /** Quantidade de imagens. */\n images?: number | undefined;\n /** Motivo. */\n reason?: EventsHandoffLost.Reason | undefined;\n}\n\nexport namespace EventsHandoffLost {\n /** Motivo. */\n export const Reason = {\n Budget: \"budget\",\n SummarizerUnavailable: \"summarizer_unavailable\",\n UnsupportedContent: \"unsupported_content\",\n } as const;\n export type Reason = (typeof Reason)[keyof typeof Reason];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * Uma mensagem na inbox (pendente, na fila ou n\u00E3o entregue), antes de o provedor ler.\n */\nexport interface EventsInboxEntry {\n messageId: SmoothAgentApi.EventsMessageId;\n /** Id do lado do cliente (idempot\u00EAncia). */\n clientMessageId?: string | undefined;\n /** Conte\u00FAdo da mensagem. */\n content: SmoothAgentApi.EventsContentPart[];\n /** Como a mensagem entra: auto (come\u00E7a ou vira steer), steer (no turno em andamento) ou queue (fila). */\n mode: EventsInboxEntry.Mode;\n origin: SmoothAgentApi.EventsOrigin;\n createdAt: SmoothAgentApi.EventsTimestamp;\n /** o metadata da mensagem (anexado pelo realtime na sa\u00EDda) */\n metadata?: Record<string, string> | undefined;\n /** taken = a box pegou (o \"visto\"); some da inbox quando o provedor L\u00CA (vira user_message no seq) */\n status?: EventsInboxEntry.Status | undefined;\n /** a box pegou mas o provedor n\u00E3o pode ler agora (Codex compactando: espera o turno) */\n waitingFor?: EventsInboxEntry.WaitingFor | undefined;\n /** s\u00F3 em notDelivered: not_consumed = a box pediu pra dormir v\u00E1rias vezes sem o provedor ler (o teto). Ausente = STOP antes do turno. Valor desconhecido = mostrar gen\u00E9rico */\n notDeliveredReason?: EventsInboxEntry.NotDeliveredReason | undefined;\n /** steer n\u00E3o lido no STOP voltou pro topo */\n requeued?: boolean | undefined;\n editedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n}\n\nexport namespace EventsInboxEntry {\n /** Como a mensagem entra: auto (come\u00E7a ou vira steer), steer (no turno em andamento) ou queue (fila). */\n export const Mode = {\n Auto: \"auto\",\n Steer: \"steer\",\n Queue: \"queue\",\n } as const;\n export type Mode = (typeof Mode)[keyof typeof Mode];\n /** taken = a box pegou (o \"visto\"); some da inbox quando o provedor L\u00CA (vira user_message no seq) */\n export const Status = {\n Pending: \"pending\",\n Taken: \"taken\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n /** a box pegou mas o provedor n\u00E3o pode ler agora (Codex compactando: espera o turno) */\n export const WaitingFor = {\n Compaction: \"compaction\",\n TurnEnd: \"turn_end\",\n } as const;\n export type WaitingFor = (typeof WaitingFor)[keyof typeof WaitingFor];\n /** s\u00F3 em notDelivered: not_consumed = a box pediu pra dormir v\u00E1rias vezes sem o provedor ler (o teto). Ausente = STOP antes do turno. Valor desconhecido = mostrar gen\u00E9rico */\n export const NotDeliveredReason = {\n NotConsumed: \"not_consumed\",\n } as const;\n export type NotDeliveredReason = (typeof NotDeliveredReason)[keyof typeof NotDeliveredReason];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * DEPRECATED (use QueueState). Pendentes, fila, STOP pendente, troca agendada \u2014 dono: o log. Duas trocas: a segunda SUBSTITUI a agendada (baseVersion; velha = conflict).\n */\nexport interface EventsInboxState {\n /** vers\u00E3o pr\u00F3pria da inbox (ordem dos comandos; base do conflict) */\n version: number;\n /** auto/steer ainda n\u00E3o lidos */\n pending: SmoothAgentApi.EventsInboxEntry[];\n /** a fila vis\u00EDvel, em ordem */\n queue: SmoothAgentApi.EventsInboxEntry[];\n /** STOP antes do turno: reenviar/descartar */\n notDelivered: SmoothAgentApi.EventsInboxEntry[];\n /** Respostas gravadas. */\n responses?: EventsInboxState.Responses.Item[] | undefined;\n stopPending?: SmoothAgentApi.EventsStopId | undefined;\n /** fila parada: s\u00F3 anda quando o usu\u00E1rio manda algo/enviar agora */\n held?: EventsInboxState.Held | undefined;\n scheduledSwitch?: SmoothAgentApi.EventsScheduledSwitch | undefined;\n}\n\nexport namespace EventsInboxState {\n export type Responses = Responses.Item[];\n\n export namespace Responses {\n export interface Item {\n requestId: SmoothAgentApi.EventsRequestId;\n answer?: unknown | undefined;\n origin: SmoothAgentApi.EventsOrigin;\n }\n }\n\n /**\n * fila parada: s\u00F3 anda quando o usu\u00E1rio manda algo/enviar agora\n */\n export interface Held {\n /** Motivo. */\n reason: Held.Reason;\n since?: SmoothAgentApi.EventsTimestamp | undefined;\n }\n\n export namespace Held {\n /** Motivo. */\n export const Reason = {\n Stop: \"stop\",\n Limit: \"limit\",\n NoCredit: \"no_credit\",\n Auth: \"auth\",\n Error: \"error\",\n WakeFailed: \"wake_failed\",\n } as const;\n export type Reason = (typeof Reason)[keyof typeof Reason];\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * Item `approval`: o agente pede permiss\u00E3o pra uma a\u00E7\u00E3o (comando, edi\u00E7\u00E3o, ferramenta) e o turno para em run.waiting. A tela mostra o cart\u00E3o com a a\u00E7\u00E3o e as op\u00E7\u00F5es; a resposta vai por `respond` com o requestId, e o item fecha com a decis\u00E3o.\n */\nexport interface EventsItemApproval {\n id: SmoothAgentApi.EventsItemId;\n /** Estado. */\n status: EventsItemApproval.Status;\n runId?: SmoothAgentApi.EventsRunId | undefined;\n /** N\u00FAmero da tentativa (1 = a primeira). */\n attempt?: number | undefined;\n /** subagente = itens com parentItemId */\n parentItemId?: SmoothAgentApi.EventsItemId | undefined;\n taskId?: SmoothAgentApi.EventsTaskId | undefined;\n /** trabalho que segue depois do turno: isento da regra do steer */\n background?: boolean | undefined;\n origin?: SmoothAgentApi.EventsOrigin | undefined;\n /** T\u00EDtulo curto pra tela. */\n title?: string | undefined;\n /** este item substitui aquele (o provedor reescreveu; o outro vem item.retracted) */\n supersedes?: SmoothAgentApi.EventsItemId | undefined;\n startedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n completedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n native?: SmoothAgentApi.EventsNativeRef | undefined;\n requestId?: SmoothAgentApi.EventsRequestId | undefined;\n targetItemId?: SmoothAgentApi.EventsItemId | undefined;\n /** O que o agente quer fazer. */\n action?: EventsItemApproval.Action | undefined;\n /** As op\u00E7\u00F5es de resposta. */\n options?: SmoothAgentApi.EventsApprovalOption[] | undefined;\n /** A resposta dada (presente depois de respondido). */\n decision?: EventsItemApproval.Decision | undefined;\n /** false = callback morreu (cold) \u2192 request_expired */\n respondable?: boolean | undefined;\n}\n\nexport namespace EventsItemApproval {\n /** Estado. */\n export const Status = {\n InProgress: \"in_progress\",\n Waiting: \"waiting\",\n Completed: \"completed\",\n Failed: \"failed\",\n Interrupted: \"interrupted\",\n Declined: \"declined\",\n Cancelled: \"cancelled\",\n Retracted: \"retracted\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n\n /**\n * O que o agente quer fazer.\n */\n export interface Action {\n /** Tipo (discriminador). */\n kind: Action.Kind;\n /** Linha de comando. */\n command?: string | undefined;\n /** Pasta de trabalho. */\n cwd?: string | undefined;\n /** Arquivos. */\n paths?: string[] | undefined;\n /** Nome da tool. */\n toolName?: string | undefined;\n /** Entrada (JSON). */\n input?: unknown | undefined;\n /** Motivo. */\n reason?: string | undefined;\n }\n\n export namespace Action {\n /** Tipo (discriminador). */\n export const Kind = {\n Command: \"command\",\n FileChange: \"file_change\",\n Tool: \"tool\",\n Network: \"network\",\n Permissions: \"permissions\",\n Other: \"other\",\n } as const;\n export type Kind = (typeof Kind)[keyof typeof Kind];\n }\n\n /**\n * A resposta dada (presente depois de respondido).\n */\n export interface Decision {\n /** Op\u00E7\u00E3o escolhida. */\n optionId: string;\n /** Tipo (discriminador). */\n kind?: string | undefined;\n /** Coment\u00E1rio do usu\u00E1rio junto da resposta. */\n feedback?: string | undefined;\n by?: SmoothAgentApi.EventsOrigin | undefined;\n at?: SmoothAgentApi.EventsTimestamp | undefined;\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * Item `command`: o agente roda um comando de shell; a sa\u00EDda chega por item.delta e o item fecha com o exitCode (ou segue em background como tarefa). A tela mostra o comando, a sa\u00EDda ao vivo e o c\u00F3digo de sa\u00EDda.\n */\nexport interface EventsItemCommand {\n id: SmoothAgentApi.EventsItemId;\n /** Estado. */\n status: EventsItemCommand.Status;\n runId?: SmoothAgentApi.EventsRunId | undefined;\n /** N\u00FAmero da tentativa (1 = a primeira). */\n attempt?: number | undefined;\n /** subagente = itens com parentItemId */\n parentItemId?: SmoothAgentApi.EventsItemId | undefined;\n taskId?: SmoothAgentApi.EventsTaskId | undefined;\n /** trabalho que segue depois do turno: isento da regra do steer */\n background?: boolean | undefined;\n origin?: SmoothAgentApi.EventsOrigin | undefined;\n /** T\u00EDtulo curto pra tela. */\n title?: string | undefined;\n /** este item substitui aquele (o provedor reescreveu; o outro vem item.retracted) */\n supersedes?: SmoothAgentApi.EventsItemId | undefined;\n startedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n completedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n native?: SmoothAgentApi.EventsNativeRef | undefined;\n /** Linha de comando. */\n command?: string | undefined;\n /** Descri\u00E7\u00E3o. */\n description?: string | undefined;\n /** Pasta de trabalho. */\n cwd?: string | undefined;\n /** Sa\u00EDda. */\n output?: string | undefined;\n /** C\u00F3digo de sa\u00EDda. */\n exitCode?: number | undefined;\n /** Dura\u00E7\u00E3o em milissegundos. */\n durationMs?: number | undefined;\n /** Id do processo. */\n processId?: string | undefined;\n /** \u00C9 um monitor (vigia em background). */\n monitor?: boolean | undefined;\n /** Codex commandActions */\n actions?: EventsItemCommand.Actions.Item[] | undefined;\n /** Origem. */\n source?: string | undefined;\n /** Entrada da tool como texto (JSON parcial durante o stream). */\n inputText?: string | undefined;\n}\n\nexport namespace EventsItemCommand {\n /** Estado. */\n export const Status = {\n InProgress: \"in_progress\",\n Waiting: \"waiting\",\n Completed: \"completed\",\n Failed: \"failed\",\n Interrupted: \"interrupted\",\n Declined: \"declined\",\n Cancelled: \"cancelled\",\n Retracted: \"retracted\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n export type Actions = Actions.Item[];\n\n export namespace Actions {\n export interface Item {\n /** Tipo (discriminador). */\n type: string;\n /** Caminho do arquivo. */\n path?: string | undefined;\n /** Consulta. */\n query?: string | undefined;\n /** Linha de comando. */\n command?: string | undefined;\n }\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * Item `compaction`: o provedor compactou o contexto (sozinho ou pedido), com tokens antes/depois e o resumo. A tela mostra um divisor \"contexto resumido\".\n */\nexport interface EventsItemCompaction {\n id: SmoothAgentApi.EventsItemId;\n /** Estado. */\n status: EventsItemCompaction.Status;\n runId?: SmoothAgentApi.EventsRunId | undefined;\n /** N\u00FAmero da tentativa (1 = a primeira). */\n attempt?: number | undefined;\n /** subagente = itens com parentItemId */\n parentItemId?: SmoothAgentApi.EventsItemId | undefined;\n taskId?: SmoothAgentApi.EventsTaskId | undefined;\n /** trabalho que segue depois do turno: isento da regra do steer */\n background?: boolean | undefined;\n origin?: SmoothAgentApi.EventsOrigin | undefined;\n /** T\u00EDtulo curto pra tela. */\n title?: string | undefined;\n /** este item substitui aquele (o provedor reescreveu; o outro vem item.retracted) */\n supersedes?: SmoothAgentApi.EventsItemId | undefined;\n startedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n completedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n native?: SmoothAgentApi.EventsNativeRef | undefined;\n /** auto (o provedor compactou sozinho) ou manual. */\n trigger?: EventsItemCompaction.Trigger | undefined;\n /** Tokens antes. */\n beforeTokens?: number | undefined;\n /** Tokens depois. */\n afterTokens?: number | undefined;\n /** Resumo. */\n summary?: string | undefined;\n /** Dura\u00E7\u00E3o em milissegundos. */\n durationMs?: number | undefined;\n}\n\nexport namespace EventsItemCompaction {\n /** Estado. */\n export const Status = {\n InProgress: \"in_progress\",\n Waiting: \"waiting\",\n Completed: \"completed\",\n Failed: \"failed\",\n Interrupted: \"interrupted\",\n Declined: \"declined\",\n Cancelled: \"cancelled\",\n Retracted: \"retracted\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n /** auto (o provedor compactou sozinho) ou manual. */\n export const Trigger = {\n Auto: \"auto\",\n Manual: \"manual\",\n } as const;\n export type Trigger = (typeof Trigger)[keyof typeof Trigger];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * Item `error`: um erro que fica registrado NA timeline, no ponto em que aconteceu (c\u00F3digo de erro e mensagem pronta). A tela mostra o erro em linha; o turno pode seguir ou fechar depois.\n */\nexport interface EventsItemError {\n id: SmoothAgentApi.EventsItemId;\n /** Estado. */\n status: EventsItemError.Status;\n runId?: SmoothAgentApi.EventsRunId | undefined;\n /** N\u00FAmero da tentativa (1 = a primeira). */\n attempt?: number | undefined;\n /** subagente = itens com parentItemId */\n parentItemId?: SmoothAgentApi.EventsItemId | undefined;\n taskId?: SmoothAgentApi.EventsTaskId | undefined;\n /** trabalho que segue depois do turno: isento da regra do steer */\n background?: boolean | undefined;\n origin?: SmoothAgentApi.EventsOrigin | undefined;\n /** T\u00EDtulo curto pra tela. */\n title?: string | undefined;\n /** este item substitui aquele (o provedor reescreveu; o outro vem item.retracted) */\n supersedes?: SmoothAgentApi.EventsItemId | undefined;\n startedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n completedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n native?: SmoothAgentApi.EventsNativeRef | undefined;\n error?: SmoothAgentApi.EventsFailure | undefined;\n}\n\nexport namespace EventsItemError {\n /** Estado. */\n export const Status = {\n InProgress: \"in_progress\",\n Waiting: \"waiting\",\n Completed: \"completed\",\n Failed: \"failed\",\n Interrupted: \"interrupted\",\n Declined: \"declined\",\n Cancelled: \"cancelled\",\n Retracted: \"retracted\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * Item `file_change`: o agente criou, editou ou apagou arquivos. A tela mostra a lista de arquivos com o diff (adi\u00E7\u00F5es/remo\u00E7\u00F5es).\n */\nexport interface EventsItemFileChange {\n id: SmoothAgentApi.EventsItemId;\n /** Estado. */\n status: EventsItemFileChange.Status;\n runId?: SmoothAgentApi.EventsRunId | undefined;\n /** N\u00FAmero da tentativa (1 = a primeira). */\n attempt?: number | undefined;\n /** subagente = itens com parentItemId */\n parentItemId?: SmoothAgentApi.EventsItemId | undefined;\n taskId?: SmoothAgentApi.EventsTaskId | undefined;\n /** trabalho que segue depois do turno: isento da regra do steer */\n background?: boolean | undefined;\n origin?: SmoothAgentApi.EventsOrigin | undefined;\n /** T\u00EDtulo curto pra tela. */\n title?: string | undefined;\n /** este item substitui aquele (o provedor reescreveu; o outro vem item.retracted) */\n supersedes?: SmoothAgentApi.EventsItemId | undefined;\n startedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n completedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n native?: SmoothAgentApi.EventsNativeRef | undefined;\n /** LISTA: um item do Codex muda v\u00E1rios arquivos */\n changes?: EventsItemFileChange.Changes.Item[] | undefined;\n /** Nome da tool. */\n tool?: string | undefined;\n output?: SmoothAgentApi.EventsToolOutput | undefined;\n /** Entrada da tool como texto (JSON parcial durante o stream). */\n inputText?: string | undefined;\n}\n\nexport namespace EventsItemFileChange {\n /** Estado. */\n export const Status = {\n InProgress: \"in_progress\",\n Waiting: \"waiting\",\n Completed: \"completed\",\n Failed: \"failed\",\n Interrupted: \"interrupted\",\n Declined: \"declined\",\n Cancelled: \"cancelled\",\n Retracted: \"retracted\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n export type Changes = Changes.Item[];\n\n export namespace Changes {\n export interface Item {\n /** Caminho do arquivo. */\n path: string;\n /** Opera\u00E7\u00E3o. */\n op: Item.Op;\n /** Caminho antigo (move). */\n oldPath?: string | undefined;\n /** Diff unificado. */\n diff?: string | undefined;\n /** Linhas adicionadas. */\n additions?: number | undefined;\n /** Linhas removidas. */\n deletions?: number | undefined;\n }\n\n export namespace Item {\n /** Opera\u00E7\u00E3o. */\n export const Op = {\n Create: \"create\",\n Edit: \"edit\",\n Delete: \"delete\",\n Move: \"move\",\n } as const;\n export type Op = (typeof Op)[keyof typeof Op];\n }\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * Item `file_search`: o agente buscou arquivos ou conte\u00FAdo (glob/grep). A tela mostra o padr\u00E3o, o caminho e os resultados.\n */\nexport interface EventsItemFileSearch {\n id: SmoothAgentApi.EventsItemId;\n /** Estado. */\n status: EventsItemFileSearch.Status;\n runId?: SmoothAgentApi.EventsRunId | undefined;\n /** N\u00FAmero da tentativa (1 = a primeira). */\n attempt?: number | undefined;\n /** subagente = itens com parentItemId */\n parentItemId?: SmoothAgentApi.EventsItemId | undefined;\n taskId?: SmoothAgentApi.EventsTaskId | undefined;\n /** trabalho que segue depois do turno: isento da regra do steer */\n background?: boolean | undefined;\n origin?: SmoothAgentApi.EventsOrigin | undefined;\n /** T\u00EDtulo curto pra tela. */\n title?: string | undefined;\n /** este item substitui aquele (o provedor reescreveu; o outro vem item.retracted) */\n supersedes?: SmoothAgentApi.EventsItemId | undefined;\n startedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n completedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n native?: SmoothAgentApi.EventsNativeRef | undefined;\n /** Nome da tool. */\n tool?: string | undefined;\n /** Padr\u00E3o buscado. */\n pattern?: string | undefined;\n /** Caminho do arquivo. */\n path?: string | undefined;\n /** Resultados. */\n results?: EventsItemFileSearch.Results.Item[] | undefined;\n output?: SmoothAgentApi.EventsToolOutput | undefined;\n /** Entrada da tool como texto (JSON parcial durante o stream). */\n inputText?: string | undefined;\n}\n\nexport namespace EventsItemFileSearch {\n /** Estado. */\n export const Status = {\n InProgress: \"in_progress\",\n Waiting: \"waiting\",\n Completed: \"completed\",\n Failed: \"failed\",\n Interrupted: \"interrupted\",\n Declined: \"declined\",\n Cancelled: \"cancelled\",\n Retracted: \"retracted\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n export type Results = Results.Item[];\n\n export namespace Results {\n export interface Item {\n /** Caminho do arquivo. */\n path: string;\n /** Linha. */\n line?: number | undefined;\n /** Trecho da linha. */\n preview?: string | undefined;\n }\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * Item `handoff`: na troca de agente/provedor, registra como o contexto passou pro agente novo (estrat\u00E9gia, o que foi reinjetado, o resumo do que n\u00E3o coube). A tela mostra um divisor da passagem, com o resumo aberto pra ler.\n */\nexport interface EventsItemHandoff {\n id: SmoothAgentApi.EventsItemId;\n /** Estado. */\n status: EventsItemHandoff.Status;\n runId?: SmoothAgentApi.EventsRunId | undefined;\n /** N\u00FAmero da tentativa (1 = a primeira). */\n attempt?: number | undefined;\n /** subagente = itens com parentItemId */\n parentItemId?: SmoothAgentApi.EventsItemId | undefined;\n taskId?: SmoothAgentApi.EventsTaskId | undefined;\n /** trabalho que segue depois do turno: isento da regra do steer */\n background?: boolean | undefined;\n origin?: SmoothAgentApi.EventsOrigin | undefined;\n /** T\u00EDtulo curto pra tela. */\n title?: string | undefined;\n /** este item substitui aquele (o provedor reescreveu; o outro vem item.retracted) */\n supersedes?: SmoothAgentApi.EventsItemId | undefined;\n startedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n completedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n native?: SmoothAgentApi.EventsNativeRef | undefined;\n from?: SmoothAgentApi.EventsAgentSelection | undefined;\n to?: SmoothAgentApi.EventsAgentSelection | undefined;\n /** como o contexto passou */\n strategy?: EventsItemHandoff.Strategy | undefined;\n injected?: SmoothAgentApi.EventsHandoffInjected | undefined;\n /** o resumo do que n\u00E3o coube (registrado, nunca escondido) */\n summary?: string | undefined;\n /** quem escreveu o resumo (o provedor que SAIU, por padr\u00E3o) */\n summarizedBy?: SmoothAgentApi.EventsAgentSelection | undefined;\n lost?: SmoothAgentApi.EventsHandoffLost | undefined;\n switchId?: SmoothAgentApi.EventsSwitchId | undefined;\n /** por que houve reinje\u00E7\u00E3o: troca de agente/provedor, ou sess\u00E3o nativa perdida (from = to = o pr\u00F3prio agente) */\n reason?: EventsItemHandoff.Reason | undefined;\n}\n\nexport namespace EventsItemHandoff {\n /** Estado. */\n export const Status = {\n InProgress: \"in_progress\",\n Waiting: \"waiting\",\n Completed: \"completed\",\n Failed: \"failed\",\n Interrupted: \"interrupted\",\n Declined: \"declined\",\n Cancelled: \"cancelled\",\n Retracted: \"retracted\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n /** como o contexto passou */\n export const Strategy = {\n FullHistory: \"full_history\",\n FullSummary: \"full_summary\",\n HistoryAndSummary: \"history_and_summary\",\n None: \"none\",\n } as const;\n export type Strategy = (typeof Strategy)[keyof typeof Strategy];\n /** por que houve reinje\u00E7\u00E3o: troca de agente/provedor, ou sess\u00E3o nativa perdida (from = to = o pr\u00F3prio agente) */\n export const Reason = {\n Switch: \"switch\",\n SessionLost: \"session_lost\",\n } as const;\n export type Reason = (typeof Reason)[keyof typeof Reason];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * Item `hook`: um hook configurado rodou num evento do agente (antes/depois de tool, fim de turno\u2026). A tela mostra o nome, o resultado e a sa\u00EDda, normalmente recolhido.\n */\nexport interface EventsItemHook {\n id: SmoothAgentApi.EventsItemId;\n /** Estado. */\n status: EventsItemHook.Status;\n runId?: SmoothAgentApi.EventsRunId | undefined;\n /** N\u00FAmero da tentativa (1 = a primeira). */\n attempt?: number | undefined;\n /** subagente = itens com parentItemId */\n parentItemId?: SmoothAgentApi.EventsItemId | undefined;\n taskId?: SmoothAgentApi.EventsTaskId | undefined;\n /** trabalho que segue depois do turno: isento da regra do steer */\n background?: boolean | undefined;\n origin?: SmoothAgentApi.EventsOrigin | undefined;\n /** T\u00EDtulo curto pra tela. */\n title?: string | undefined;\n /** este item substitui aquele (o provedor reescreveu; o outro vem item.retracted) */\n supersedes?: SmoothAgentApi.EventsItemId | undefined;\n startedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n completedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n native?: SmoothAgentApi.EventsNativeRef | undefined;\n /** Nome do hook. */\n name?: string | undefined;\n /** Evento que disparou o hook. */\n event?: string | undefined;\n /** Resultado do hook. */\n outcome?: string | undefined;\n /** C\u00F3digo de sa\u00EDda. */\n exitCode?: number | undefined;\n /** Sa\u00EDda. */\n output?: string | undefined;\n}\n\nexport namespace EventsItemHook {\n /** Estado. */\n export const Status = {\n InProgress: \"in_progress\",\n Waiting: \"waiting\",\n Completed: \"completed\",\n Failed: \"failed\",\n Interrupted: \"interrupted\",\n Declined: \"declined\",\n Cancelled: \"cancelled\",\n Retracted: \"retracted\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * Item `notification`: uma notifica\u00E7\u00E3o entrou no chat sem ser do usu\u00E1rio (tarefa em background terminou, agendamento disparou, outro agente, sistema). A tela mostra como linha de sistema com a origem.\n */\nexport interface EventsItemNotification {\n id: SmoothAgentApi.EventsItemId;\n /** Estado. */\n status: EventsItemNotification.Status;\n runId?: SmoothAgentApi.EventsRunId | undefined;\n /** N\u00FAmero da tentativa (1 = a primeira). */\n attempt?: number | undefined;\n /** subagente = itens com parentItemId */\n parentItemId?: SmoothAgentApi.EventsItemId | undefined;\n taskId?: SmoothAgentApi.EventsTaskId | undefined;\n /** trabalho que segue depois do turno: isento da regra do steer */\n background?: boolean | undefined;\n origin?: SmoothAgentApi.EventsOrigin | undefined;\n /** T\u00EDtulo curto pra tela. */\n title?: string | undefined;\n /** este item substitui aquele (o provedor reescreveu; o outro vem item.retracted) */\n supersedes?: SmoothAgentApi.EventsItemId | undefined;\n startedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n completedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n native?: SmoothAgentApi.EventsNativeRef | undefined;\n /** Origem. */\n source?: EventsItemNotification.Source | undefined;\n /** Texto. */\n text?: string | undefined;\n}\n\nexport namespace EventsItemNotification {\n /** Estado. */\n export const Status = {\n InProgress: \"in_progress\",\n Waiting: \"waiting\",\n Completed: \"completed\",\n Failed: \"failed\",\n Interrupted: \"interrupted\",\n Declined: \"declined\",\n Cancelled: \"cancelled\",\n Retracted: \"retracted\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n\n /**\n * Origem.\n */\n export interface Source {\n /** Tipo (discriminador). */\n kind: Source.Kind;\n taskId?: SmoothAgentApi.EventsTaskId | undefined;\n /** O agendamento. */\n scheduleId?: string | undefined;\n /** Nome. */\n name?: string | undefined;\n }\n\n export namespace Source {\n /** Tipo (discriminador). */\n export const Kind = {\n Task: \"task\",\n Schedule: \"schedule\",\n Peer: \"peer\",\n System: \"system\",\n } as const;\n export type Kind = (typeof Kind)[keyof typeof Kind];\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * Item `plan`: a lista de passos (to-do) que o agente mant\u00E9m durante o trabalho; atualiza enquanto ele avan\u00E7a. A tela mostra os passos com o estado de cada um.\n */\nexport interface EventsItemPlan {\n id: SmoothAgentApi.EventsItemId;\n /** Estado. */\n status: EventsItemPlan.Status;\n runId?: SmoothAgentApi.EventsRunId | undefined;\n /** N\u00FAmero da tentativa (1 = a primeira). */\n attempt?: number | undefined;\n /** subagente = itens com parentItemId */\n parentItemId?: SmoothAgentApi.EventsItemId | undefined;\n taskId?: SmoothAgentApi.EventsTaskId | undefined;\n /** trabalho que segue depois do turno: isento da regra do steer */\n background?: boolean | undefined;\n origin?: SmoothAgentApi.EventsOrigin | undefined;\n /** T\u00EDtulo curto pra tela. */\n title?: string | undefined;\n /** este item substitui aquele (o provedor reescreveu; o outro vem item.retracted) */\n supersedes?: SmoothAgentApi.EventsItemId | undefined;\n startedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n completedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n native?: SmoothAgentApi.EventsNativeRef | undefined;\n /** Passos do plano, em ordem. */\n steps?: EventsItemPlan.Steps.Item[] | undefined;\n /** Explica\u00E7\u00E3o. */\n explanation?: string | undefined;\n /** Entrada da tool como texto (JSON parcial durante o stream). */\n inputText?: string | undefined;\n}\n\nexport namespace EventsItemPlan {\n /** Estado. */\n export const Status = {\n InProgress: \"in_progress\",\n Waiting: \"waiting\",\n Completed: \"completed\",\n Failed: \"failed\",\n Interrupted: \"interrupted\",\n Declined: \"declined\",\n Cancelled: \"cancelled\",\n Retracted: \"retracted\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n export type Steps = Steps.Item[];\n\n export namespace Steps {\n export interface Item {\n /** Texto. */\n text: string;\n /** Texto do passo em andamento. */\n activeText?: string | undefined;\n /** Estado. */\n status: Item.Status;\n }\n\n export namespace Item {\n /** Estado. */\n export const Status = {\n Pending: \"pending\",\n InProgress: \"in_progress\",\n Completed: \"completed\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n }\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * Item `proposed_plan`: um plano que o agente PROP\u00D5E antes de executar (modo plano). A tela mostra o plano pra o usu\u00E1rio ler e decidir o que mandar em seguida.\n */\nexport interface EventsItemProposedPlan {\n id: SmoothAgentApi.EventsItemId;\n /** Estado. */\n status: EventsItemProposedPlan.Status;\n runId?: SmoothAgentApi.EventsRunId | undefined;\n /** N\u00FAmero da tentativa (1 = a primeira). */\n attempt?: number | undefined;\n /** subagente = itens com parentItemId */\n parentItemId?: SmoothAgentApi.EventsItemId | undefined;\n taskId?: SmoothAgentApi.EventsTaskId | undefined;\n /** trabalho que segue depois do turno: isento da regra do steer */\n background?: boolean | undefined;\n origin?: SmoothAgentApi.EventsOrigin | undefined;\n /** T\u00EDtulo curto pra tela. */\n title?: string | undefined;\n /** este item substitui aquele (o provedor reescreveu; o outro vem item.retracted) */\n supersedes?: SmoothAgentApi.EventsItemId | undefined;\n startedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n completedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n native?: SmoothAgentApi.EventsNativeRef | undefined;\n /** Texto. */\n text?: string | undefined;\n /** Entrada da tool como texto (JSON parcial durante o stream). */\n inputText?: string | undefined;\n}\n\nexport namespace EventsItemProposedPlan {\n /** Estado. */\n export const Status = {\n InProgress: \"in_progress\",\n Waiting: \"waiting\",\n Completed: \"completed\",\n Failed: \"failed\",\n Interrupted: \"interrupted\",\n Declined: \"declined\",\n Cancelled: \"cancelled\",\n Retracted: \"retracted\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * Item `question`: o agente faz uma ou mais perguntas ao usu\u00E1rio e o turno para em run.waiting. A tela mostra o formul\u00E1rio; a resposta vai por `respond` com o requestId, e o item fecha com as respostas.\n */\nexport interface EventsItemQuestion {\n id: SmoothAgentApi.EventsItemId;\n /** Estado. */\n status: EventsItemQuestion.Status;\n runId?: SmoothAgentApi.EventsRunId | undefined;\n /** N\u00FAmero da tentativa (1 = a primeira). */\n attempt?: number | undefined;\n /** subagente = itens com parentItemId */\n parentItemId?: SmoothAgentApi.EventsItemId | undefined;\n taskId?: SmoothAgentApi.EventsTaskId | undefined;\n /** trabalho que segue depois do turno: isento da regra do steer */\n background?: boolean | undefined;\n origin?: SmoothAgentApi.EventsOrigin | undefined;\n /** T\u00EDtulo curto pra tela. */\n title?: string | undefined;\n /** este item substitui aquele (o provedor reescreveu; o outro vem item.retracted) */\n supersedes?: SmoothAgentApi.EventsItemId | undefined;\n startedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n completedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n native?: SmoothAgentApi.EventsNativeRef | undefined;\n requestId?: SmoothAgentApi.EventsRequestId | undefined;\n /** As perguntas, em ordem. */\n questions?: EventsItemQuestion.Questions.Item[] | undefined;\n /** Respostas por id de pergunta. */\n answers?: Record<string, string[]> | undefined;\n answeredBy?: SmoothAgentApi.EventsOrigin | undefined;\n /** Ainda d\u00E1 pra responder (false = pedido morreu num acordar cold). */\n respondable?: boolean | undefined;\n /** Resolve sozinho depois disso (ms). */\n autoResolveMs?: number | undefined;\n /** O turno espera a resposta. */\n blocking?: boolean | undefined;\n}\n\nexport namespace EventsItemQuestion {\n /** Estado. */\n export const Status = {\n InProgress: \"in_progress\",\n Waiting: \"waiting\",\n Completed: \"completed\",\n Failed: \"failed\",\n Interrupted: \"interrupted\",\n Declined: \"declined\",\n Cancelled: \"cancelled\",\n Retracted: \"retracted\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n export type Questions = Questions.Item[];\n\n export namespace Questions {\n export interface Item {\n /** Id. */\n id: string;\n /** T\u00EDtulo curto da pergunta. */\n header?: string | undefined;\n /** Texto. */\n text: string;\n /** Op\u00E7\u00F5es. */\n options?: Item.Options.Item[] | undefined;\n /** Aceita v\u00E1rias op\u00E7\u00F5es. */\n multiSelect?: boolean | undefined;\n /** Aceita resposta livre. */\n allowOther?: boolean | undefined;\n /** Resposta \u00E9 segredo (n\u00E3o mostrar nem logar). */\n secret?: boolean | undefined;\n }\n\n export namespace Item {\n export type Options = Options.Item[];\n\n export namespace Options {\n export interface Item {\n /** R\u00F3tulo. */\n label: string;\n /** Descri\u00E7\u00E3o. */\n description?: string | undefined;\n }\n }\n }\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * Item `reasoning`: o racioc\u00EDnio do modelo, quando o provedor exp\u00F5e (texto ou s\u00F3 resumo; pode vir escondido). A tela mostra recolhido (\"pensando\u2026\") e deixa abrir.\n */\nexport interface EventsItemReasoning {\n id: SmoothAgentApi.EventsItemId;\n /** Estado. */\n status: EventsItemReasoning.Status;\n runId?: SmoothAgentApi.EventsRunId | undefined;\n /** N\u00FAmero da tentativa (1 = a primeira). */\n attempt?: number | undefined;\n /** subagente = itens com parentItemId */\n parentItemId?: SmoothAgentApi.EventsItemId | undefined;\n taskId?: SmoothAgentApi.EventsTaskId | undefined;\n /** trabalho que segue depois do turno: isento da regra do steer */\n background?: boolean | undefined;\n origin?: SmoothAgentApi.EventsOrigin | undefined;\n /** T\u00EDtulo curto pra tela. */\n title?: string | undefined;\n /** este item substitui aquele (o provedor reescreveu; o outro vem item.retracted) */\n supersedes?: SmoothAgentApi.EventsItemId | undefined;\n startedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n completedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n native?: SmoothAgentApi.EventsNativeRef | undefined;\n /** Texto. */\n text?: string | undefined;\n /** Resumo. */\n summary?: string[] | undefined;\n /** O provedor escondeu o conte\u00FAdo. */\n redacted?: boolean | undefined;\n /** Tokens estimados. */\n estimatedTokens?: number | undefined;\n}\n\nexport namespace EventsItemReasoning {\n /** Estado. */\n export const Status = {\n InProgress: \"in_progress\",\n Waiting: \"waiting\",\n Completed: \"completed\",\n Failed: \"failed\",\n Interrupted: \"interrupted\",\n Declined: \"declined\",\n Cancelled: \"cancelled\",\n Retracted: \"retracted\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * Item `subagent`: o agente abriu um subagente com uma tarefa; os itens do subagente v\u00EAm com parentItemId apontando pra c\u00E1 e o progresso por task.updated. A tela mostra um bloco aninhado com a tarefa, o progresso e o resultado.\n */\nexport interface EventsItemSubagent {\n id: SmoothAgentApi.EventsItemId;\n /** Estado. */\n status: EventsItemSubagent.Status;\n runId?: SmoothAgentApi.EventsRunId | undefined;\n /** N\u00FAmero da tentativa (1 = a primeira). */\n attempt?: number | undefined;\n /** subagente = itens com parentItemId */\n parentItemId?: SmoothAgentApi.EventsItemId | undefined;\n taskId?: SmoothAgentApi.EventsTaskId | undefined;\n /** trabalho que segue depois do turno: isento da regra do steer */\n background?: boolean | undefined;\n origin?: SmoothAgentApi.EventsOrigin | undefined;\n /** T\u00EDtulo curto pra tela. */\n title?: string | undefined;\n /** este item substitui aquele (o provedor reescreveu; o outro vem item.retracted) */\n supersedes?: SmoothAgentApi.EventsItemId | undefined;\n startedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n completedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n native?: SmoothAgentApi.EventsNativeRef | undefined;\n /** Tipo de subagente. */\n agentType?: string | undefined;\n /** Descri\u00E7\u00E3o. */\n description?: string | undefined;\n /** o prompt dado ao subagente */\n task?: string | undefined;\n /** Modelo. */\n model?: string | undefined;\n /** Esfor\u00E7o de racioc\u00EDnio (low, medium, high\u2026). */\n effort?: string | undefined;\n /** Resultado. */\n result?: string | undefined;\n progress?: SmoothAgentApi.EventsTaskProgress | undefined;\n /** Id da thread nativa do subagente. */\n nativeThreadId?: string | undefined;\n /** Entrada da tool como texto (JSON parcial durante o stream). */\n inputText?: string | undefined;\n}\n\nexport namespace EventsItemSubagent {\n /** Estado. */\n export const Status = {\n InProgress: \"in_progress\",\n Waiting: \"waiting\",\n Completed: \"completed\",\n Failed: \"failed\",\n Interrupted: \"interrupted\",\n Declined: \"declined\",\n Cancelled: \"cancelled\",\n Retracted: \"retracted\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * Item `text`: a resposta em texto do agente; abre quando ele come\u00E7a a escrever e cresce por item.delta. A tela renderiza o texto (markdown) e substitui pelo final no item.completed.\n */\nexport interface EventsItemText {\n id: SmoothAgentApi.EventsItemId;\n /** Estado. */\n status: EventsItemText.Status;\n runId?: SmoothAgentApi.EventsRunId | undefined;\n /** N\u00FAmero da tentativa (1 = a primeira). */\n attempt?: number | undefined;\n /** subagente = itens com parentItemId */\n parentItemId?: SmoothAgentApi.EventsItemId | undefined;\n taskId?: SmoothAgentApi.EventsTaskId | undefined;\n /** trabalho que segue depois do turno: isento da regra do steer */\n background?: boolean | undefined;\n origin?: SmoothAgentApi.EventsOrigin | undefined;\n /** T\u00EDtulo curto pra tela. */\n title?: string | undefined;\n /** este item substitui aquele (o provedor reescreveu; o outro vem item.retracted) */\n supersedes?: SmoothAgentApi.EventsItemId | undefined;\n startedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n completedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n native?: SmoothAgentApi.EventsNativeRef | undefined;\n /** Texto. */\n text?: string | undefined;\n /** Codex final_answer \u00D7 commentary */\n phase?: EventsItemText.Phase | undefined;\n}\n\nexport namespace EventsItemText {\n /** Estado. */\n export const Status = {\n InProgress: \"in_progress\",\n Waiting: \"waiting\",\n Completed: \"completed\",\n Failed: \"failed\",\n Interrupted: \"interrupted\",\n Declined: \"declined\",\n Cancelled: \"cancelled\",\n Retracted: \"retracted\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n /** Codex final_answer \u00D7 commentary */\n export const Phase = {\n Commentary: \"commentary\",\n Final: \"final\",\n } as const;\n export type Phase = (typeof Phase)[keyof typeof Phase];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * Item `timer`: o agente agendou continuar depois (wakeAt, opcionalmente recorrente). A tela mostra \"volto \u00E0s HH:MM\"; o chat pode dormir at\u00E9 l\u00E1.\n */\nexport interface EventsItemTimer {\n id: SmoothAgentApi.EventsItemId;\n /** Estado. */\n status: EventsItemTimer.Status;\n runId?: SmoothAgentApi.EventsRunId | undefined;\n /** N\u00FAmero da tentativa (1 = a primeira). */\n attempt?: number | undefined;\n /** subagente = itens com parentItemId */\n parentItemId?: SmoothAgentApi.EventsItemId | undefined;\n taskId?: SmoothAgentApi.EventsTaskId | undefined;\n /** trabalho que segue depois do turno: isento da regra do steer */\n background?: boolean | undefined;\n origin?: SmoothAgentApi.EventsOrigin | undefined;\n /** T\u00EDtulo curto pra tela. */\n title?: string | undefined;\n /** este item substitui aquele (o provedor reescreveu; o outro vem item.retracted) */\n supersedes?: SmoothAgentApi.EventsItemId | undefined;\n startedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n completedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n native?: SmoothAgentApi.EventsNativeRef | undefined;\n wakeAt?: SmoothAgentApi.EventsTimestamp | undefined;\n /** Motivo. */\n reason?: string | undefined;\n /** O agendamento. */\n scheduleId?: string | undefined;\n /** Recorr\u00EAncia. */\n recurrence?: string | undefined;\n}\n\nexport namespace EventsItemTimer {\n /** Estado. */\n export const Status = {\n InProgress: \"in_progress\",\n Waiting: \"waiting\",\n Completed: \"completed\",\n Failed: \"failed\",\n Interrupted: \"interrupted\",\n Declined: \"declined\",\n Cancelled: \"cancelled\",\n Retracted: \"retracted\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * Item `tool_call`: o agente chamou uma ferramenta (MCP ou nativa); abre com a entrada (em stream enquanto o modelo monta) e fecha com a sa\u00EDda. A tela mostra nome, entrada e sa\u00EDda, com o status.\n */\nexport interface EventsItemToolCall {\n id: SmoothAgentApi.EventsItemId;\n /** Estado. */\n status: EventsItemToolCall.Status;\n runId?: SmoothAgentApi.EventsRunId | undefined;\n /** N\u00FAmero da tentativa (1 = a primeira). */\n attempt?: number | undefined;\n /** subagente = itens com parentItemId */\n parentItemId?: SmoothAgentApi.EventsItemId | undefined;\n taskId?: SmoothAgentApi.EventsTaskId | undefined;\n /** trabalho que segue depois do turno: isento da regra do steer */\n background?: boolean | undefined;\n origin?: SmoothAgentApi.EventsOrigin | undefined;\n /** T\u00EDtulo curto pra tela. */\n title?: string | undefined;\n /** este item substitui aquele (o provedor reescreveu; o outro vem item.retracted) */\n supersedes?: SmoothAgentApi.EventsItemId | undefined;\n startedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n completedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n native?: SmoothAgentApi.EventsNativeRef | undefined;\n /** Nome. */\n name?: string | undefined;\n /** servidor MCP */\n server?: string | undefined;\n /** vocabul\u00E1rio do ACP */\n toolKind?: EventsItemToolCall.ToolKind | undefined;\n /** Entrada (JSON). */\n input?: unknown | undefined;\n /** JSON parcial em stream */\n inputText?: string | undefined;\n output?: SmoothAgentApi.EventsToolOutput | undefined;\n /** Arquivos/linhas que a tool tocou. */\n locations?: EventsItemToolCall.Locations.Item[] | undefined;\n}\n\nexport namespace EventsItemToolCall {\n /** Estado. */\n export const Status = {\n InProgress: \"in_progress\",\n Waiting: \"waiting\",\n Completed: \"completed\",\n Failed: \"failed\",\n Interrupted: \"interrupted\",\n Declined: \"declined\",\n Cancelled: \"cancelled\",\n Retracted: \"retracted\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n /** vocabul\u00E1rio do ACP */\n export const ToolKind = {\n Read: \"read\",\n Edit: \"edit\",\n Delete: \"delete\",\n Move: \"move\",\n Search: \"search\",\n Execute: \"execute\",\n Think: \"think\",\n Fetch: \"fetch\",\n Task: \"task\",\n Message: \"message\",\n Other: \"other\",\n } as const;\n export type ToolKind = (typeof ToolKind)[keyof typeof ToolKind];\n export type Locations = Locations.Item[];\n\n export namespace Locations {\n export interface Item {\n /** Caminho do arquivo. */\n path: string;\n /** Linha. */\n line?: number | undefined;\n }\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * Item `user_message`: aparece quando o PROVEDOR leu uma mensagem do usu\u00E1rio (come\u00E7o do turno, steer ou prompt de subagente). A tela tira a mensagem da fila/inbox e a mostra como bal\u00E3o do usu\u00E1rio na timeline, pelo messageId.\n */\nexport interface EventsItemUserMessage {\n id: SmoothAgentApi.EventsItemId;\n /** Estado. */\n status: EventsItemUserMessage.Status;\n runId?: SmoothAgentApi.EventsRunId | undefined;\n /** N\u00FAmero da tentativa (1 = a primeira). */\n attempt?: number | undefined;\n /** subagente = itens com parentItemId */\n parentItemId?: SmoothAgentApi.EventsItemId | undefined;\n taskId?: SmoothAgentApi.EventsTaskId | undefined;\n /** trabalho que segue depois do turno: isento da regra do steer */\n background?: boolean | undefined;\n origin?: SmoothAgentApi.EventsOrigin | undefined;\n /** T\u00EDtulo curto pra tela. */\n title?: string | undefined;\n /** este item substitui aquele (o provedor reescreveu; o outro vem item.retracted) */\n supersedes?: SmoothAgentApi.EventsItemId | undefined;\n startedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n completedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n native?: SmoothAgentApi.EventsNativeRef | undefined;\n /** ausente s\u00F3 em subagent_prompt */\n messageId?: SmoothAgentApi.EventsMessageId | undefined;\n /** Id do lado do cliente (idempot\u00EAncia). */\n clientMessageId?: string | undefined;\n /** Conte\u00FAdo da mensagem. */\n content?: SmoothAgentApi.EventsContentPart[] | undefined;\n /** o metadata que o cliente mandou com a mensagem (anexado pela plataforma; a box nunca v\u00EA) */\n metadata?: Record<string, string> | undefined;\n /** Como a mensagem entrou: turn_start, steer, steer_restart ou subagent_prompt. */\n via?: EventsItemUserMessage.Via | undefined;\n /** evid\u00EAncia do ponto de consumo */\n consumption?: EventsItemUserMessage.Consumption | undefined;\n}\n\nexport namespace EventsItemUserMessage {\n /** Estado. */\n export const Status = {\n InProgress: \"in_progress\",\n Waiting: \"waiting\",\n Completed: \"completed\",\n Failed: \"failed\",\n Interrupted: \"interrupted\",\n Declined: \"declined\",\n Cancelled: \"cancelled\",\n Retracted: \"retracted\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n /** Como a mensagem entrou: turn_start, steer, steer_restart ou subagent_prompt. */\n export const Via = {\n TurnStart: \"turn_start\",\n Steer: \"steer\",\n SteerRestart: \"steer_restart\",\n SubagentPrompt: \"subagent_prompt\",\n } as const;\n export type Via = (typeof Via)[keyof typeof Via];\n /** evid\u00EAncia do ponto de consumo */\n export const Consumption = {\n Echo: \"echo\",\n Item: \"item\",\n Order: \"order\",\n Result: \"result\",\n } as const;\n export type Consumption = (typeof Consumption)[keyof typeof Consumption];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * Item `web_search`: o agente buscou na web, abriu ou procurou numa p\u00E1gina. A tela mostra a busca/URL e os resultados.\n */\nexport interface EventsItemWebSearch {\n id: SmoothAgentApi.EventsItemId;\n /** Estado. */\n status: EventsItemWebSearch.Status;\n runId?: SmoothAgentApi.EventsRunId | undefined;\n /** N\u00FAmero da tentativa (1 = a primeira). */\n attempt?: number | undefined;\n /** subagente = itens com parentItemId */\n parentItemId?: SmoothAgentApi.EventsItemId | undefined;\n taskId?: SmoothAgentApi.EventsTaskId | undefined;\n /** trabalho que segue depois do turno: isento da regra do steer */\n background?: boolean | undefined;\n origin?: SmoothAgentApi.EventsOrigin | undefined;\n /** T\u00EDtulo curto pra tela. */\n title?: string | undefined;\n /** este item substitui aquele (o provedor reescreveu; o outro vem item.retracted) */\n supersedes?: SmoothAgentApi.EventsItemId | undefined;\n startedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n completedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n native?: SmoothAgentApi.EventsNativeRef | undefined;\n /** Consulta. */\n query?: string | undefined;\n /** Consultas. */\n queries?: string[] | undefined;\n /** search (busca), open (abriu p\u00E1gina) ou find (procurou na p\u00E1gina). */\n action?: EventsItemWebSearch.Action | undefined;\n /** URL. */\n url?: string | undefined;\n /** Resultados. */\n results?: EventsItemWebSearch.Results.Item[] | undefined;\n output?: SmoothAgentApi.EventsToolOutput | undefined;\n /** Entrada da tool como texto (JSON parcial durante o stream). */\n inputText?: string | undefined;\n}\n\nexport namespace EventsItemWebSearch {\n /** Estado. */\n export const Status = {\n InProgress: \"in_progress\",\n Waiting: \"waiting\",\n Completed: \"completed\",\n Failed: \"failed\",\n Interrupted: \"interrupted\",\n Declined: \"declined\",\n Cancelled: \"cancelled\",\n Retracted: \"retracted\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n /** search (busca), open (abriu p\u00E1gina) ou find (procurou na p\u00E1gina). */\n export const Action = {\n Search: \"search\",\n Open: \"open\",\n Find: \"find\",\n } as const;\n export type Action = (typeof Action)[keyof typeof Action];\n export type Results = Results.Item[];\n\n export namespace Results {\n export interface Item {\n /** T\u00EDtulo curto pra tela. */\n title?: string | undefined;\n /** URL. */\n url?: string | undefined;\n /** Trecho. */\n snippet?: string | undefined;\n /** Dom\u00EDnio. */\n domain?: string | undefined;\n /** o texto cita isto */\n refId?: string | undefined;\n }\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * Consumo da assinatura/chave \u2014 pronto pra tela\n */\nexport interface EventsLimits {\n provider: SmoothAgentApi.EventsProvider;\n /** De onde vem o limite: subscription, key ou agent. */\n via?: EventsLimits.Via | undefined;\n /** Plano da assinatura. */\n plan?: string | undefined;\n /** Janelas de limite. */\n windows: SmoothAgentApi.EventsLimitWindow[];\n /** Cr\u00E9ditos restantes. */\n credits?: EventsLimits.Credits | undefined;\n /** Uso al\u00E9m do plano. */\n overage?: EventsLimits.Overage | undefined;\n}\n\nexport namespace EventsLimits {\n /** De onde vem o limite: subscription, key ou agent. */\n export const Via = {\n Subscription: \"subscription\",\n Key: \"key\",\n Agent: \"agent\",\n } as const;\n export type Via = (typeof Via)[keyof typeof Via];\n\n /**\n * Cr\u00E9ditos restantes.\n */\n export interface Credits {\n /** Quanto resta. */\n remaining?: number | undefined;\n /** Unidade. */\n unit?: string | undefined;\n }\n\n /**\n * Uso al\u00E9m do plano.\n */\n export interface Overage {\n /** Estado. */\n status?: string | undefined;\n /** Em uso agora. */\n inUse?: boolean | undefined;\n /** Por que est\u00E1 desligado. */\n disabledReason?: string | undefined;\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * Uma janela de limite da assinatura/chave (5 h, 7 dias, prim\u00E1ria\u2026).\n */\nexport interface EventsLimitWindow {\n /** five_hour, seven_day, primary, secondary\u2026 */\n id: string;\n /** R\u00F3tulo. */\n label?: string | undefined;\n /** Tamanho da janela em minutos. */\n durationMins?: number | undefined;\n /** Quanto da janela foi usado (0\u2013100). */\n usedPercent?: number | undefined;\n resetsAt?: SmoothAgentApi.EventsTimestamp | undefined;\n /** ok, warning (perto do limite) ou reached (estourou). */\n status: EventsLimitWindow.Status;\n}\n\nexport namespace EventsLimitWindow {\n /** ok, warning (perto do limite) ou reached (estourou). */\n export const Status = {\n Ok: \"ok\",\n Warning: \"warning\",\n Reached: \"reached\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * QUEM causou\n */\nexport interface EventsOrigin {\n /** user = uma interface; agent = o agente (prompt de subagente); provider = o provedor sozinho (wake, peer); schedule = agendamento; system = a plataforma */\n kind: EventsOrigin.Kind;\n /** Id do usu\u00E1rio. */\n userId?: string | undefined;\n /** a interface/aba */\n clientId?: string | undefined;\n /** o token de dispositivo */\n deviceId?: string | undefined;\n /** nome do usu\u00E1rio pra tela (users.displayName, definido pelo dev) */\n displayName?: string | undefined;\n /** r\u00F3tulo do dispositivo da sess\u00E3o (web, celular, runner local\u2026) */\n deviceName?: string | undefined;\n /** nome leg\u00EDvel (peer, agendamento) */\n name?: string | undefined;\n /** kind=agent: agente autor validado no mesmo workspace */\n agentId?: SmoothAgentApi.EventsAgentId | undefined;\n /** URL do avatar do autor */\n avatarUrl?: string | undefined;\n /** kind=schedule: o agendamento que disparou (schedule_task) */\n scheduleId?: string | undefined;\n}\n\nexport namespace EventsOrigin {\n /** user = uma interface; agent = o agente (prompt de subagente); provider = o provedor sozinho (wake, peer); schedule = agendamento; system = a plataforma */\n export const Kind = {\n User: \"user\",\n Agent: \"agent\",\n Provider: \"provider\",\n Schedule: \"schedule\",\n System: \"system\",\n } as const;\n export type Kind = (typeof Kind)[keyof typeof Kind];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * Um frame nativo do provedor, como chegou ou saiu (s\u00F3 com includeRaw).\n */\nexport interface EventsRawFrame {\n provider: SmoothAgentApi.EventsProvider;\n /** in = do provedor; out = pro provedor. */\n direction?: EventsRawFrame.Direction | undefined;\n frame?: unknown | undefined;\n}\n\nexport namespace EventsRawFrame {\n /** in = do provedor; out = pro provedor. */\n export const Direction = {\n In: \"in\",\n Out: \"out\",\n } as const;\n export type Direction = (typeof Direction)[keyof typeof Direction];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * QUEM rodou este run \u2014 o que o control projeta (runs, uso por provedor)\n */\nexport interface EventsRunAgent {\n agentId: SmoothAgentApi.EventsAgentId;\n /** revis\u00E3o da config do agente que rodou */\n agentRevision: number;\n /** Nome do agente pra tela. */\n agentName?: string | undefined;\n provider: SmoothAgentApi.EventsProvider;\n /** Modelo. */\n model?: string | undefined;\n /** Esfor\u00E7o de racioc\u00EDnio (low, medium, high\u2026). */\n effort?: string | undefined;\n /** que credencial rodou (sem segredo): a do agente (inclui o provedor fake), a assinatura do usu\u00E1rio ou a chave de API \u2014 os mesmos valores do runs/config e do /selection */\n credentialVia: EventsRunAgent.CredentialVia;\n}\n\nexport namespace EventsRunAgent {\n /** que credencial rodou (sem segredo): a do agente (inclui o provedor fake), a assinatura do usu\u00E1rio ou a chave de API \u2014 os mesmos valores do runs/config e do /selection */\n export const CredentialVia = {\n Agent: \"agent\",\n Subscription: \"subscription\",\n Key: \"key\",\n } as const;\n export type CredentialVia = (typeof CredentialVia)[keyof typeof CredentialVia];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * Por que o run abriu e o que o disparou.\n */\nexport interface EventsRunTrigger {\n /** por que o run abriu: mensagem, wake (tarefa acabou), agendamento, troca, peer, provedor sem dizer, plataforma */\n kind: EventsRunTrigger.Kind;\n /** Mensagens envolvidas. */\n messageIds?: SmoothAgentApi.EventsMessageId[] | undefined;\n taskId?: SmoothAgentApi.EventsTaskId | undefined;\n /** O agendamento. */\n scheduleId?: string | undefined;\n switchId?: SmoothAgentApi.EventsSwitchId | undefined;\n /** Nome. */\n name?: string | undefined;\n}\n\nexport namespace EventsRunTrigger {\n /** por que o run abriu: mensagem, wake (tarefa acabou), agendamento, troca, peer, provedor sem dizer, plataforma */\n export const Kind = {\n Message: \"message\",\n Wake: \"wake\",\n Schedule: \"schedule\",\n Handoff: \"handoff\",\n Peer: \"peer\",\n Provider: \"provider\",\n System: \"system\",\n } as const;\n export type Kind = (typeof Kind)[keyof typeof Kind];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * Trabalho que vive al\u00E9m do item (subagente, background, monitor)\n */\nexport interface EventsTask {\n taskId: SmoothAgentApi.EventsTaskId;\n /** Tipo de tarefa: subagent, command (background), monitor ou other. */\n kind: EventsTask.Kind;\n /** Estado da tarefa: running, completed, failed ou stopped. */\n status: EventsTask.Status;\n /** Descri\u00E7\u00E3o. */\n description?: string | undefined;\n /** o agente espera: SEGURA o run; n\u00E3o-awaited segura s\u00F3 a box */\n awaited: boolean;\n itemId?: SmoothAgentApi.EventsItemId | undefined;\n runId?: SmoothAgentApi.EventsRunId | undefined;\n startedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n endedAt?: SmoothAgentApi.EventsTimestamp | undefined;\n /** Resumo. */\n summary?: string | undefined;\n /** C\u00F3digo de sa\u00EDda. */\n exitCode?: number | undefined;\n /** Tem sa\u00EDda guardada pra ler. */\n hasOutput?: boolean | undefined;\n progress?: SmoothAgentApi.EventsTaskProgress | undefined;\n native?: SmoothAgentApi.EventsNativeRef | undefined;\n}\n\nexport namespace EventsTask {\n /** Tipo de tarefa: subagent, command (background), monitor ou other. */\n export const Kind = {\n Subagent: \"subagent\",\n Command: \"command\",\n Monitor: \"monitor\",\n Other: \"other\",\n } as const;\n export type Kind = (typeof Kind)[keyof typeof Kind];\n /** Estado da tarefa: running, completed, failed ou stopped. */\n export const Status = {\n Running: \"running\",\n Completed: \"completed\",\n Failed: \"failed\",\n Stopped: \"stopped\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\nexport interface FileObject {\n id: string;\n workspaceId: string;\n userId: string | null;\n filename: string;\n mimeType: string;\n sizeBytes: number;\n status: FileObject.Status;\n createdAt: SmoothAgentApi.Timestamp;\n /**\n * Link p\u00FAblico do arquivo pronto, pra TELA mostrar direto (img/download), quando a plataforma publica os arquivos\n * por dom\u00EDnio pr\u00F3prio. N\u00E3o se adivinha pelo id; morre na hora em que o arquivo \u00E9 apagado. O agente nunca recebe\n * este link (recebe o conte\u00FAdo).\n */\n url?: string | undefined;\n}\n\nexport namespace FileObject {\n export const Status = {\n Uploading: \"uploading\",\n Ready: \"ready\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\nexport interface LoginStatus {\n loginId: string;\n status: LoginStatus.Status;\n error?: SmoothAgentApi.ErrorBody | undefined;\n}\n\nexport namespace LoginStatus {\n export const Status = {\n Pending: \"pending\",\n Completed: \"completed\",\n Failed: \"failed\",\n Expired: \"expired\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\nexport interface Machine {\n id: string;\n workspaceId: string;\n userId: string;\n kind: Machine.Kind;\n /** Nome do dev (cloud_box) ou do computador (local). \u00DAnico por (workspace, usu\u00E1rio). */\n name: string;\n /** S\u00F3 nuvem. O perfil da m\u00E1quina vale pra todo chat que aponta pra ela. */\n profile?: SmoothAgentApi.BoxProfile | undefined;\n state: Machine.State;\n /** S\u00F3 local: o que o runner reportou ao parear. */\n device?: Machine.Device | undefined;\n lastSeenAt: SmoothAgentApi.Timestamp | null;\n createdAt: SmoothAgentApi.Timestamp;\n}\n\nexport namespace Machine {\n export const Kind = {\n CloudChat: \"cloud_chat\",\n CloudBox: \"cloud_box\",\n Local: \"local\",\n } as const;\n export type Kind = (typeof Kind)[keyof typeof Kind];\n export const State = {\n Online: \"online\",\n Offline: \"offline\",\n Busy: \"busy\",\n Waking: \"waking\",\n Ready: \"ready\",\n Sleeping: \"sleeping\",\n Crashed: \"crashed\",\n } as const;\n export type State = (typeof State)[keyof typeof State];\n\n /**\n * S\u00F3 local: o que o runner reportou ao parear.\n */\n export interface Device {\n os: string;\n arch: string;\n runnerVersion: string;\n hostname?: string | undefined;\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\n/**\n * Consulta indexada de uma mensagem aceita, sem varrer eventos.\n */\nexport interface MessageReceipt {\n messageId: string;\n status: MessageReceipt.Status;\n runId?: string | undefined;\n eventId?: string | undefined;\n}\n\nexport namespace MessageReceipt {\n export const Status = {\n Accepted: \"accepted\",\n Queued: \"queued\",\n Running: \"running\",\n Completed: \"completed\",\n Failed: \"failed\",\n Stopped: \"stopped\",\n NotDelivered: \"not_delivered\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * Um provedor na lista do usu\u00E1rio: o status + se algum agente que ele pode usar roda nele.\n */\nexport interface MyProviderStatus {\n provider: SmoothAgentApi.ProviderKind;\n connected: boolean;\n /** `agent` = o agente j\u00E1 traz (o usu\u00E1rio n\u00E3o precisa conectar). */\n via: MyProviderStatus.Via.Item[];\n /** S\u00F3 assinatura: quando o access token atual vence (o CLI renova sozinho \u2014 doutrina do token). */\n expiresAt?: (SmoothAgentApi.Timestamp | null) | undefined;\n /**\n * Sa\u00FAde pro dashboard. `ok`; `expiring` = o access token da assinatura venceu, a box renova sozinha no\n * pr\u00F3ximo uso (nada a fazer); `dead` = o provedor recusou a renova\u00E7\u00E3o e n\u00E3o h\u00E1 outra viva (reconectar);\n * `disconnected` = nada conectado.\n */\n status: MyProviderStatus.Status;\n /** Explica\u00E7\u00E3o curta pro usu\u00E1rio quando n\u00E3o \u00E9 `ok`. */\n message?: string | undefined;\n /** Os modelos que ESTA credencial libera (extra\u00EDdos do provedor, nunca cat\u00E1logo nosso). */\n models: SmoothAgentApi.ModelInfo[];\n /** Como conectar o que falta. */\n connect: MyProviderStatus.Connect.Item[];\n /**\n * `true` = algum agente que o usu\u00E1rio pode usar roda neste provedor (o app do cliente filtra por isso pra\n * mostrar \"s\u00F3 o configurado\"); `false` = oferecido, mas nenhum agente dele precisa agora.\n */\n needed: boolean;\n}\n\nexport namespace MyProviderStatus {\n export type Via = Via.Item[];\n\n export namespace Via {\n export const Item = {\n Subscription: \"subscription\",\n Key: \"key\",\n Agent: \"agent\",\n } as const;\n export type Item = (typeof Item)[keyof typeof Item];\n }\n\n /**\n * Sa\u00FAde pro dashboard. `ok`; `expiring` = o access token da assinatura venceu, a box renova sozinha no\n * pr\u00F3ximo uso (nada a fazer); `dead` = o provedor recusou a renova\u00E7\u00E3o e n\u00E3o h\u00E1 outra viva (reconectar);\n * `disconnected` = nada conectado.\n */\n export const Status = {\n Ok: \"ok\",\n Expiring: \"expiring\",\n Dead: \"dead\",\n Disconnected: \"disconnected\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n export type Connect = Connect.Item[];\n\n export namespace Connect {\n export const Item = {\n Oauth: \"oauth\",\n Device: \"device\",\n Key: \"key\",\n } as const;\n export type Item = (typeof Item)[keyof typeof Item];\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\nexport interface Pairing {\n /** C\u00F3digo curto pra digitar (`XXXX-XXXX`, estilo device flow RFC 8628). */\n code: string;\n /** Comando pronto: `npx smoothagent@3 connect --code XXXX-XXXX` (fixa a major do runner). */\n command: string;\n expiresAt: SmoothAgentApi.Timestamp;\n status: Pairing.Status;\n machineId?: string | undefined;\n}\n\nexport namespace Pairing {\n export const Status = {\n Pending: \"pending\",\n Completed: \"completed\",\n Expired: \"expired\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\n/**\n * Onde os chats deste agente rodam por padr\u00E3o (`chats.create({ machineId })` sobrescreve):\n * - `chat`: box pr\u00F3pria por chat (padr\u00E3o);\n * - `user`: uma box por usu\u00E1rio, todos os chats dele nela;\n * - `machine`: uma m\u00E1quina fixa (box com nome ou computador pareado) \u2014 `machineId`.\n */\nexport interface Placement {\n mode: Placement.Mode;\n /**\n * S\u00F3 com `machine`: as m\u00E1quinas (do usu\u00E1rio) em que o agente pode rodar. Ausente = qualquer uma.\n * A m\u00E1quina do chat \u00E9 escolhida no `chats.create` (`machineId`, obrigat\u00F3rio com `machine`).\n */\n machineIds?: string[] | undefined;\n /**\n * Computador pareado offline: `reject` (`machine_offline`) ou `cloud` (cai numa box do chat). `cloud`\n * vale S\u00D3 ao criar o chat; mensagem num chat que j\u00E1 est\u00E1 no computador desligado \u00E9 sempre\n * `machine_offline` (mover o chat de box com hist\u00F3rico + sess\u00E3o \u00E9 a fase \"troca de m\u00E1quina\").\n */\n whenOffline?: Placement.WhenOffline | undefined;\n}\n\nexport namespace Placement {\n export const Mode = {\n Chat: \"chat\",\n User: \"user\",\n Machine: \"machine\",\n } as const;\n export type Mode = (typeof Mode)[keyof typeof Mode];\n /**\n * Computador pareado offline: `reject` (`machine_offline`) ou `cloud` (cai numa box do chat). `cloud`\n * vale S\u00D3 ao criar o chat; mensagem num chat que j\u00E1 est\u00E1 no computador desligado \u00E9 sempre\n * `machine_offline` (mover o chat de box com hist\u00F3rico + sess\u00E3o \u00E9 a fase \"troca de m\u00E1quina\").\n */\n export const WhenOffline = {\n Reject: \"reject\",\n Cloud: \"cloud\",\n } as const;\n export type WhenOffline = (typeof WhenOffline)[keyof typeof WhenOffline];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\n/**\n * Onde os chats deste agente rodam por padr\u00E3o (`chats.create({ machineId })` sobrescreve):\n * - `chat`: box pr\u00F3pria por chat (padr\u00E3o);\n * - `user`: uma box por usu\u00E1rio, todos os chats dele nela;\n * - `machine`: uma m\u00E1quina fixa (box com nome ou computador pareado) \u2014 `machineId`.\n */\nexport interface PlacementMergePatchUpdateOrCreate {\n mode?: PlacementMergePatchUpdateOrCreate.Mode | undefined;\n /**\n * S\u00F3 com `machine`: as m\u00E1quinas (do usu\u00E1rio) em que o agente pode rodar. Ausente = qualquer uma.\n * A m\u00E1quina do chat \u00E9 escolhida no `chats.create` (`machineId`, obrigat\u00F3rio com `machine`).\n */\n machineIds?: (string[] | null) | undefined;\n /**\n * Computador pareado offline: `reject` (`machine_offline`) ou `cloud` (cai numa box do chat). `cloud`\n * vale S\u00D3 ao criar o chat; mensagem num chat que j\u00E1 est\u00E1 no computador desligado \u00E9 sempre\n * `machine_offline` (mover o chat de box com hist\u00F3rico + sess\u00E3o \u00E9 a fase \"troca de m\u00E1quina\").\n */\n whenOffline?: (PlacementMergePatchUpdateOrCreate.WhenOffline | null) | undefined;\n}\n\nexport namespace PlacementMergePatchUpdateOrCreate {\n export const Mode = {\n Chat: \"chat\",\n User: \"user\",\n Machine: \"machine\",\n } as const;\n export type Mode = (typeof Mode)[keyof typeof Mode];\n export const WhenOffline = {\n Reject: \"reject\",\n Cloud: \"cloud\",\n } as const;\n export type WhenOffline = (typeof WhenOffline)[keyof typeof WhenOffline];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nexport interface PreTurnHook {\n /** Chamado do NOSSO servidor (nunca da box nem do runner local) antes de cada turno. */\n url: string;\n /**\n * Configura\u00E7\u00E3o sigilosa de quem integra (chaves da revenda, ids de template\u2026): vai nos headers\n * da chamada, guardada cifrada, write-only. Aceita `{{secret:NOME}}`.\n */\n headers?: Record<string, string> | undefined;\n /** Padr\u00E3o 800 ms. */\n timeoutMs?: number | undefined;\n /** `open` (padr\u00E3o): falhou/estourou \u2192 turno segue sem o hook. `closed`: turno falha. */\n onFailure?: PreTurnHook.OnFailure | undefined;\n}\n\nexport namespace PreTurnHook {\n /** `open` (padr\u00E3o): falhou/estourou \u2192 turno segue sem o hook. `closed`: turno falha. */\n export const OnFailure = {\n Open: \"open\",\n Closed: \"closed\",\n } as const;\n export type OnFailure = (typeof OnFailure)[keyof typeof OnFailure];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nexport interface PreTurnHookMergePatchUpdateOrCreate {\n /** Chamado do NOSSO servidor (nunca da box nem do runner local) antes de cada turno. */\n url?: string | undefined;\n /**\n * Configura\u00E7\u00E3o sigilosa de quem integra (chaves da revenda, ids de template\u2026): vai nos headers\n * da chamada, guardada cifrada, write-only. Aceita `{{secret:NOME}}`.\n */\n headers?: (Record<string, string | null> | null) | undefined;\n /** Padr\u00E3o 800 ms. */\n timeoutMs?: (number | null) | undefined;\n /** `open` (padr\u00E3o): falhou/estourou \u2192 turno segue sem o hook. `closed`: turno falha. */\n onFailure?: (PreTurnHookMergePatchUpdateOrCreate.OnFailure | null) | undefined;\n}\n\nexport namespace PreTurnHookMergePatchUpdateOrCreate {\n export const OnFailure = {\n Open: \"open\",\n Closed: \"closed\",\n } as const;\n export type OnFailure = (typeof OnFailure)[keyof typeof OnFailure];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\nexport interface Principal {\n kind: Principal.Kind;\n accountId: string;\n workspaceId: string | null;\n /** S\u00F3 `kind: user` (ou chave com `SmoothAgent-As-User`). */\n userId?: string | undefined;\n /** Sess\u00E3o do dispositivo (token de usu\u00E1rio). */\n sessionId?: string | undefined;\n /** Escopos efetivos (chave restrita) \u2014 `[\"*\"]` pras chaves cheias. */\n scopes: SmoothAgentApi.Scope[];\n /** `null` = todos os agentes do workspace. */\n agents: string[] | null;\n /** Chave que est\u00E1 agindo como o usu\u00E1rio (`sa.as`). */\n actingKeyId?: string | undefined;\n /**\n * O Assistente da plataforma agindo NA CONTA do usu\u00E1rio que conversa (token de ferramenta +\n * `SmoothAgent-Delegate: account`). Escopo enxuto e sem nada destrutivo.\n */\n delegated?: boolean | undefined;\n}\n\nexport namespace Principal {\n export const Kind = {\n AccountKey: \"account_key\",\n WorkspaceKey: \"workspace_key\",\n RestrictedKey: \"restricted_key\",\n User: \"user\",\n } as const;\n export type Kind = (typeof Kind)[keyof typeof Kind];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\nexport interface ProviderLimits {\n provider: SmoothAgentApi.EventsProvider;\n /** De onde vem o limite: subscription, key ou agent. */\n via?: ProviderLimits.Via | undefined;\n /** Plano da assinatura. */\n plan?: string | undefined;\n /** Janelas de limite. */\n windows: SmoothAgentApi.EventsLimitWindow[];\n /** Cr\u00E9ditos restantes. */\n credits?: ProviderLimits.Credits | undefined;\n /** Uso al\u00E9m do plano. */\n overage?: ProviderLimits.Overage | undefined;\n updatedAt: SmoothAgentApi.Timestamp | null;\n}\n\nexport namespace ProviderLimits {\n /** De onde vem o limite: subscription, key ou agent. */\n export const Via = {\n Subscription: \"subscription\",\n Key: \"key\",\n Agent: \"agent\",\n } as const;\n export type Via = (typeof Via)[keyof typeof Via];\n\n /**\n * Cr\u00E9ditos restantes.\n */\n export interface Credits {\n /** Quanto resta. */\n remaining?: number | undefined;\n /** Unidade. */\n unit?: string | undefined;\n }\n\n /**\n * Uso al\u00E9m do plano.\n */\n export interface Overage {\n /** Estado. */\n status?: string | undefined;\n /** Em uso agora. */\n inUse?: boolean | undefined;\n /** Por que est\u00E1 desligado. */\n disabledReason?: string | undefined;\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\nexport interface ProviderStatus {\n provider: SmoothAgentApi.ProviderKind;\n connected: boolean;\n /** `agent` = o agente j\u00E1 traz (o usu\u00E1rio n\u00E3o precisa conectar). */\n via: ProviderStatus.Via.Item[];\n /** S\u00F3 assinatura: quando o access token atual vence (o CLI renova sozinho \u2014 doutrina do token). */\n expiresAt?: (SmoothAgentApi.Timestamp | null) | undefined;\n /**\n * Sa\u00FAde pro dashboard. `ok`; `expiring` = o access token da assinatura venceu, a box renova sozinha no\n * pr\u00F3ximo uso (nada a fazer); `dead` = o provedor recusou a renova\u00E7\u00E3o e n\u00E3o h\u00E1 outra viva (reconectar);\n * `disconnected` = nada conectado.\n */\n status: ProviderStatus.Status;\n /** Explica\u00E7\u00E3o curta pro usu\u00E1rio quando n\u00E3o \u00E9 `ok`. */\n message?: string | undefined;\n /** Os modelos que ESTA credencial libera (extra\u00EDdos do provedor, nunca cat\u00E1logo nosso). */\n models: SmoothAgentApi.ModelInfo[];\n /** Como conectar o que falta. */\n connect: ProviderStatus.Connect.Item[];\n}\n\nexport namespace ProviderStatus {\n export type Via = Via.Item[];\n\n export namespace Via {\n export const Item = {\n Subscription: \"subscription\",\n Key: \"key\",\n Agent: \"agent\",\n } as const;\n export type Item = (typeof Item)[keyof typeof Item];\n }\n\n /**\n * Sa\u00FAde pro dashboard. `ok`; `expiring` = o access token da assinatura venceu, a box renova sozinha no\n * pr\u00F3ximo uso (nada a fazer); `dead` = o provedor recusou a renova\u00E7\u00E3o e n\u00E3o h\u00E1 outra viva (reconectar);\n * `disconnected` = nada conectado.\n */\n export const Status = {\n Ok: \"ok\",\n Expiring: \"expiring\",\n Dead: \"dead\",\n Disconnected: \"disconnected\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n export type Connect = Connect.Item[];\n\n export namespace Connect {\n export const Item = {\n Oauth: \"oauth\",\n Device: \"device\",\n Key: \"key\",\n } as const;\n export type Item = (typeof Item)[keyof typeof Item];\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * Um run, com quem rodou (cada run registra agente/provedor/modelo).\n */\nexport interface RunSummary {\n id: string;\n agentId: string;\n agentRevision: number;\n provider: SmoothAgentApi.EventsProvider;\n model: string | null;\n credentialVia: string | null;\n status: RunSummary.Status;\n errorCode?: string | undefined;\n attempts: number;\n usage: SmoothAgentApi.EventsUsage | null;\n /** Primeiro e \u00FAltimo evento do run no log (pra pular pro run no hist\u00F3rico). */\n firstEventId: string;\n lastEventId: string | null;\n startedAt: SmoothAgentApi.Timestamp;\n completedAt: SmoothAgentApi.Timestamp | null;\n}\n\nexport namespace RunSummary {\n export const Status = {\n Running: \"running\",\n Completed: \"completed\",\n Stopped: \"stopped\",\n Failed: \"failed\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\nexport interface RunVerdict {\n status: RunVerdict.Status;\n culprit: SmoothAgentApi.Culprit | null;\n summary: string;\n}\n\nexport namespace RunVerdict {\n export const Status = {\n Ok: \"ok\",\n OkDegraded: \"ok_degraded\",\n Stopped: \"stopped\",\n Running: \"running\",\n Stuck: \"stuck\",\n Failed: \"failed\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * A troca \u00E9 um comando da fila: `accepted` = o dono da fila aceitou (ms). A box aplica antes do\n * pr\u00F3ximo run (na hora, se o chat est\u00E1 parado) e a tela acompanha pelo `agent.switched` numerado; com run\n * ativo ela aparece como `scheduledSwitch`. Trocar de novo SUBSTITUI a pendente. Idempotente pelo\n * `Idempotency-Key` (vira o `switchId`).\n */\nexport interface SwitchResult {\n status: SwitchResult.Status;\n /** A vers\u00E3o da fila depois da troca (a mesma do estado da fila no snapshot). */\n version: number;\n chat: SmoothAgentApi.Chat;\n}\n\nexport namespace SwitchResult {\n export const Status = {\n Accepted: \"accepted\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * `GET /me` com o token de FERRAMENTA do chat (o MCP `smoothagent` do ops): s\u00F3 leitura dos chats daquele\n * usu\u00E1rio naquele agente + as tools que a config liberou.\n */\nexport interface ToolPrincipal {\n kind: ToolPrincipal.Kind;\n workspaceId: string;\n userId: string;\n chatId: string;\n agentId: string;\n tools: ToolPrincipal.Tools.Item[];\n scopes: SmoothAgentApi.Scope[];\n}\n\nexport namespace ToolPrincipal {\n export const Kind = {\n Tool: \"tool\",\n } as const;\n export type Kind = (typeof Kind)[keyof typeof Kind];\n export type Tools = Tools.Item[];\n\n export namespace Tools {\n export const Item = {\n Memory: \"memory\",\n Schedule: \"schedule\",\n Platform: \"platform\",\n } as const;\n export type Item = (typeof Item)[keyof typeof Item];\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * Um dispositivo com token ativo (aba, celular, runner local). Sess\u00E3o estilo Clerk.\n */\nexport interface UserSession {\n id: string;\n userId: string;\n /** R\u00F3tulo do dev: \"web\", \"ios\", \"runner:notebook-ana\". */\n device: string;\n kind: UserSession.Kind;\n createdAt: SmoothAgentApi.Timestamp;\n lastSeenAt: SmoothAgentApi.Timestamp | null;\n expiresAt: SmoothAgentApi.Timestamp;\n revokedAt: SmoothAgentApi.Timestamp | null;\n}\n\nexport namespace UserSession {\n export const Kind = {\n Interface: \"interface\",\n Runner: \"runner\",\n } as const;\n export type Kind = (typeof Kind)[keyof typeof Kind];\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as SmoothAgentApi from \"../index.js\";\n\n/**\n * Um run no log do workspace (`GET /runs`): o resumo + de que chat e de que usu\u00E1rio (o id do dev).\n */\nexport interface WorkspaceRun {\n id: string;\n agentId: string;\n agentRevision: number;\n provider: SmoothAgentApi.EventsProvider;\n model: string | null;\n credentialVia: string | null;\n status: WorkspaceRun.Status;\n errorCode?: string | undefined;\n attempts: number;\n usage: SmoothAgentApi.EventsUsage | null;\n /** Primeiro e \u00FAltimo evento do run no log (pra pular pro run no hist\u00F3rico). */\n firstEventId: string;\n lastEventId: string | null;\n startedAt: SmoothAgentApi.Timestamp;\n completedAt: SmoothAgentApi.Timestamp | null;\n chatId: string;\n userId: string;\n}\n\nexport namespace WorkspaceRun {\n export const Status = {\n Running: \"running\",\n Completed: \"completed\",\n Stopped: \"stopped\",\n Failed: \"failed\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n}\n", "import type { EndpointMetadata } from \"../fetcher/EndpointMetadata.js\";\nimport type { AuthRequest } from \"./AuthRequest.js\";\n\nexport interface AuthProvider {\n getAuthRequest(arg?: { endpointMetadata?: EndpointMetadata }): Promise<AuthRequest>;\n}\n\nexport function isAuthProvider(value: unknown): value is AuthProvider {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"getAuthRequest\" in value &&\n typeof value.getAuthRequest === \"function\"\n );\n}\n", "import type { AuthProvider } from \"./AuthProvider.js\";\nimport type { AuthRequest } from \"./AuthRequest.js\";\n\nexport class NoOpAuthProvider implements AuthProvider {\n public getAuthRequest(): Promise<AuthRequest> {\n return Promise.resolve({ headers: {} });\n }\n}\n", "import type { EndpointMetadata } from \"./EndpointMetadata.js\";\nimport type { Supplier } from \"./Supplier.js\";\n\ntype EndpointSupplierFn<T> = (arg: { endpointMetadata?: EndpointMetadata }) => T | Promise<T>;\nexport type EndpointSupplier<T> = Supplier<T> | EndpointSupplierFn<T>;\nexport const EndpointSupplier = {\n get: async <T>(supplier: EndpointSupplier<T>, arg: { endpointMetadata?: EndpointMetadata }): Promise<T> => {\n if (typeof supplier === \"function\") {\n return (supplier as EndpointSupplierFn<T>)(arg);\n } else {\n return supplier;\n }\n },\n};\n", "export const LogLevel = {\n Debug: \"debug\",\n Info: \"info\",\n Warn: \"warn\",\n Error: \"error\",\n} as const;\nexport type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];\nconst logLevelMap: Record<LogLevel, number> = {\n [LogLevel.Debug]: 1,\n [LogLevel.Info]: 2,\n [LogLevel.Warn]: 3,\n [LogLevel.Error]: 4,\n};\n\nexport interface ILogger {\n /**\n * Logs a debug message.\n * @param message - The message to log\n * @param args - Additional arguments to log\n */\n debug(message: string, ...args: unknown[]): void;\n /**\n * Logs an info message.\n * @param message - The message to log\n * @param args - Additional arguments to log\n */\n info(message: string, ...args: unknown[]): void;\n /**\n * Logs a warning message.\n * @param message - The message to log\n * @param args - Additional arguments to log\n */\n warn(message: string, ...args: unknown[]): void;\n /**\n * Logs an error message.\n * @param message - The message to log\n * @param args - Additional arguments to log\n */\n error(message: string, ...args: unknown[]): void;\n}\n\n/**\n * Configuration for logger initialization.\n */\nexport interface LogConfig {\n /**\n * Minimum log level to output.\n * @default LogLevel.Info\n */\n level?: LogLevel;\n /**\n * Logger implementation to use.\n * @default new ConsoleLogger()\n */\n logger?: ILogger;\n /**\n * Whether logging should be silenced.\n * @default true\n */\n silent?: boolean;\n}\n\n/**\n * Default console-based logger implementation.\n */\nexport class ConsoleLogger implements ILogger {\n debug(message: string, ...args: unknown[]): void {\n console.debug(message, ...args);\n }\n info(message: string, ...args: unknown[]): void {\n console.info(message, ...args);\n }\n warn(message: string, ...args: unknown[]): void {\n console.warn(message, ...args);\n }\n error(message: string, ...args: unknown[]): void {\n console.error(message, ...args);\n }\n}\n\n/**\n * Logger class that provides level-based logging functionality.\n */\nexport class Logger {\n private readonly level: number;\n private readonly logger: ILogger;\n private readonly silent: boolean;\n\n /**\n * Creates a new logger instance.\n * @param config - Logger configuration\n */\n constructor(config: Required<LogConfig>) {\n this.level = logLevelMap[config.level];\n this.logger = config.logger;\n this.silent = config.silent;\n }\n\n /**\n * Checks if a log level should be output based on configuration.\n * @param level - The log level to check\n * @returns True if the level should be logged\n */\n public shouldLog(level: LogLevel): boolean {\n return !this.silent && this.level <= logLevelMap[level];\n }\n\n /**\n * Checks if debug logging is enabled.\n * @returns True if debug logs should be output\n */\n public isDebug(): boolean {\n return this.shouldLog(LogLevel.Debug);\n }\n\n /**\n * Logs a debug message if debug logging is enabled.\n * @param message - The message to log\n * @param args - Additional arguments to log\n */\n public debug(message: string, ...args: unknown[]): void {\n if (this.isDebug()) {\n this.logger.debug(message, ...args);\n }\n }\n\n /**\n * Checks if info logging is enabled.\n * @returns True if info logs should be output\n */\n public isInfo(): boolean {\n return this.shouldLog(LogLevel.Info);\n }\n\n /**\n * Logs an info message if info logging is enabled.\n * @param message - The message to log\n * @param args - Additional arguments to log\n */\n public info(message: string, ...args: unknown[]): void {\n if (this.isInfo()) {\n this.logger.info(message, ...args);\n }\n }\n\n /**\n * Checks if warning logging is enabled.\n * @returns True if warning logs should be output\n */\n public isWarn(): boolean {\n return this.shouldLog(LogLevel.Warn);\n }\n\n /**\n * Logs a warning message if warning logging is enabled.\n * @param message - The message to log\n * @param args - Additional arguments to log\n */\n public warn(message: string, ...args: unknown[]): void {\n if (this.isWarn()) {\n this.logger.warn(message, ...args);\n }\n }\n\n /**\n * Checks if error logging is enabled.\n * @returns True if error logs should be output\n */\n public isError(): boolean {\n return this.shouldLog(LogLevel.Error);\n }\n\n /**\n * Logs an error message if error logging is enabled.\n * @param message - The message to log\n * @param args - Additional arguments to log\n */\n public error(message: string, ...args: unknown[]): void {\n if (this.isError()) {\n this.logger.error(message, ...args);\n }\n }\n}\n\nexport function createLogger(config?: LogConfig | Logger): Logger {\n if (config == null) {\n return defaultLogger;\n }\n if (config instanceof Logger) {\n return config;\n }\n config = config ?? {};\n config.level ??= LogLevel.Info;\n config.logger ??= new ConsoleLogger();\n config.silent ??= true;\n return new Logger(config as Required<LogConfig>);\n}\n\nconst defaultLogger: Logger = new Logger({\n level: LogLevel.Info,\n logger: new ConsoleLogger(),\n silent: true,\n});\n", "type ArrayFormat = \"indices\" | \"repeat\" | \"comma\";\n\ninterface QueryStringOptions {\n arrayFormat?: ArrayFormat;\n encode?: boolean;\n}\n\nconst defaultQsOptions: Required<QueryStringOptions> = {\n arrayFormat: \"indices\",\n encode: true,\n} as const;\n\nfunction encodeValue(value: unknown, shouldEncode: boolean): string {\n if (value === undefined) {\n return \"\";\n }\n if (value === null) {\n return \"\";\n }\n const stringValue = String(value);\n return shouldEncode ? encodeURIComponent(stringValue) : stringValue;\n}\n\nfunction stringifyObject(obj: Record<string, unknown>, prefix = \"\", options: Required<QueryStringOptions>): string[] {\n const parts: string[] = [];\n\n for (const [key, value] of Object.entries(obj)) {\n const fullKey = prefix ? `${prefix}[${key}]` : key;\n\n if (value == null) {\n continue;\n }\n\n if (Array.isArray(value)) {\n if (value.length === 0) {\n continue;\n }\n const effectiveFormat = options.arrayFormat;\n if (effectiveFormat === \"comma\") {\n const encodedKey = options.encode ? encodeURIComponent(fullKey) : fullKey;\n const encodedValues = value\n .filter((item) => item !== undefined && item !== null)\n .map((item) => encodeValue(item, options.encode));\n if (encodedValues.length > 0) {\n parts.push(`${encodedKey}=${encodedValues.join(\",\")}`);\n }\n } else {\n for (let i = 0; i < value.length; i++) {\n const item = value[i];\n if (item == null) {\n continue;\n }\n if (typeof item === \"object\" && !Array.isArray(item) && item !== null) {\n const arrayKey = effectiveFormat === \"indices\" ? `${fullKey}[${i}]` : fullKey;\n parts.push(...stringifyObject(item as Record<string, unknown>, arrayKey, options));\n } else {\n const arrayKey = effectiveFormat === \"indices\" ? `${fullKey}[${i}]` : fullKey;\n const encodedKey = options.encode ? encodeURIComponent(arrayKey) : arrayKey;\n parts.push(`${encodedKey}=${encodeValue(item, options.encode)}`);\n }\n }\n }\n } else if (typeof value === \"object\" && value !== null) {\n if (Object.keys(value as Record<string, unknown>).length === 0) {\n continue;\n }\n parts.push(...stringifyObject(value as Record<string, unknown>, fullKey, options));\n } else {\n const encodedKey = options.encode ? encodeURIComponent(fullKey) : fullKey;\n parts.push(`${encodedKey}=${encodeValue(value, options.encode)}`);\n }\n }\n\n return parts;\n}\n\nexport function toQueryString(obj: unknown, options?: QueryStringOptions): string {\n if (obj == null || typeof obj !== \"object\") {\n return \"\";\n }\n\n const parts = stringifyObject(obj as Record<string, unknown>, \"\", {\n ...defaultQsOptions,\n ...options,\n });\n return parts.join(\"&\");\n}\n", "import { toQueryString } from \"../url/qs.js\";\n\nexport function createRequestUrl(baseUrl: string, queryParameters?: Record<string, unknown>): string {\n const queryString = toQueryString(queryParameters, { arrayFormat: \"repeat\" });\n return queryString ? `${baseUrl}?${queryString}` : baseUrl;\n}\n", "export type BinaryResponse = {\n /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */\n bodyUsed: Response[\"bodyUsed\"];\n /**\n * Returns a ReadableStream of the response body.\n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/body)\n */\n stream: () => Response[\"body\"];\n /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */\n arrayBuffer: () => ReturnType<Response[\"arrayBuffer\"]>;\n /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/blob) */\n blob: () => ReturnType<Response[\"blob\"]>;\n /**\n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bytes)\n * Some versions of the Fetch API may not support this method.\n */\n bytes?(): Promise<Uint8Array>;\n};\n\nexport function getBinaryResponse(response: Response): BinaryResponse {\n const binaryResponse: BinaryResponse = {\n get bodyUsed() {\n return response.bodyUsed;\n },\n stream: () => response.body,\n arrayBuffer: response.arrayBuffer.bind(response),\n blob: response.blob.bind(response),\n };\n if (\"bytes\" in response && typeof response.bytes === \"function\") {\n binaryResponse.bytes = response.bytes.bind(response);\n }\n\n return binaryResponse;\n}\n", "import { fromJson } from \"../json.js\";\nimport { getBinaryResponse } from \"./BinaryResponse.js\";\n\n// Pins the upstream Response so undici's FinalizationRegistry can't GC it and cancel the body stream.\nfunction retainResponse(target: object, response: Response): void {\n Object.defineProperty(target, \"__fern_response_ref\", {\n value: response,\n enumerable: false,\n configurable: true,\n writable: false,\n });\n}\n\nexport type ResponseBodyError = {\n ok: false;\n error: { reason: \"non-json\"; statusCode: number; rawBody: string } | { reason: \"body-is-null\"; statusCode: number };\n};\n\nconst responseBodyErrors = new WeakSet<object>();\n\nfunction responseBodyError(error: ResponseBodyError[\"error\"]): ResponseBodyError {\n const record: ResponseBodyError = { ok: false, error };\n responseBodyErrors.add(record);\n return record;\n}\n\n/**\n * Returns true when `value` is a failure record created by `getResponseBody` (for example malformed JSON),\n * as opposed to a parsed JSON body that happens to have the same shape.\n */\nexport function isResponseBodyError(value: unknown): value is ResponseBodyError {\n return typeof value === \"object\" && value != null && responseBodyErrors.has(value);\n}\n\nexport async function getResponseBody(response: Response, responseType?: string): Promise<unknown> {\n switch (responseType) {\n case \"binary-response\":\n return getBinaryResponse(response);\n case \"blob\":\n return await response.blob();\n case \"arrayBuffer\":\n return await response.arrayBuffer();\n case \"sse\":\n if (response.body == null) {\n return responseBodyError({\n reason: \"body-is-null\",\n statusCode: response.status,\n });\n }\n retainResponse(response.body, response);\n return response.body;\n case \"streaming\":\n if (response.body == null) {\n return responseBodyError({\n reason: \"body-is-null\",\n statusCode: response.status,\n });\n }\n\n retainResponse(response.body, response);\n return response.body;\n\n case \"text\":\n return await response.text();\n }\n\n // if responseType is \"json\" or not specified, try to parse as JSON\n const text = await response.text();\n if (text.length > 0) {\n try {\n const responseBody = fromJson(text);\n return responseBody;\n } catch (_err) {\n return responseBodyError({\n reason: \"non-json\",\n statusCode: response.status,\n rawBody: text,\n });\n }\n }\n return undefined;\n}\n", "import { fromJson } from \"../json.js\";\nimport { getResponseBody, isResponseBodyError } from \"./getResponseBody.js\";\n\n/** Parses a JSON error body, falling back to the raw text so the status and body are never lost. */\nfunction parseJsonErrorBody(text: string): unknown {\n if (text.length === 0) {\n return undefined;\n }\n try {\n return fromJson(text);\n } catch {\n return text;\n }\n}\n\nexport async function getErrorResponseBody(response: Response): Promise<unknown> {\n let contentType = response.headers.get(\"Content-Type\")?.toLowerCase();\n if (contentType == null || contentType.length === 0) {\n const body = await getResponseBody(response);\n if (isResponseBodyError(body)) {\n return body.error.reason === \"non-json\" ? body.error.rawBody : undefined;\n }\n return body;\n }\n\n if (contentType.indexOf(\";\") !== -1) {\n contentType = contentType.split(\";\")[0]?.trim() ?? \"\";\n }\n switch (contentType) {\n case \"application/hal+json\":\n case \"application/json\":\n case \"application/ld+json\":\n case \"application/problem+json\":\n case \"application/vnd.api+json\":\n case \"text/json\":\n return parseJsonErrorBody(await response.text());\n default:\n if (contentType.startsWith(\"application/vnd.\") && contentType.endsWith(\"+json\")) {\n return parseJsonErrorBody(await response.text());\n }\n\n // Fallback to plain text if content type is not recognized\n // Even if no body is present, the response will be an empty string\n return await response.text();\n }\n}\n", "export async function getFetchFn(): Promise<typeof fetch> {\n return fetch;\n}\n", "import { toJson } from \"../json.js\";\nimport { toQueryString } from \"../url/qs.js\";\n\nexport declare namespace GetRequestBody {\n interface Args {\n body: unknown;\n type: \"json\" | \"file\" | \"bytes\" | \"form\" | \"other\";\n }\n}\n\nexport async function getRequestBody({ body, type }: GetRequestBody.Args): Promise<BodyInit | undefined> {\n if (type === \"form\") {\n return toQueryString(body, { arrayFormat: \"repeat\", encode: true });\n }\n if (type.includes(\"json\")) {\n return toJson(body);\n } else {\n return body as BodyInit;\n }\n}\n", "let Headers: typeof globalThis.Headers;\n\nif (typeof globalThis.Headers !== \"undefined\") {\n Headers = globalThis.Headers;\n} else {\n Headers = class Headers implements Headers {\n private headers: Map<string, string[]>;\n\n constructor(init?: HeadersInit) {\n this.headers = new Map();\n\n if (init) {\n if (init instanceof Headers) {\n init.forEach((value, key) => this.append(key, value));\n } else if (Array.isArray(init)) {\n for (const [key, value] of init) {\n if (typeof key === \"string\" && typeof value === \"string\") {\n this.append(key, value);\n } else {\n throw new TypeError(\"Each header entry must be a [string, string] tuple\");\n }\n }\n } else {\n for (const [key, value] of Object.entries(init)) {\n if (typeof value === \"string\") {\n this.append(key, value);\n } else {\n throw new TypeError(\"Header values must be strings\");\n }\n }\n }\n }\n }\n\n append(name: string, value: string): void {\n const key = name.toLowerCase();\n const existing = this.headers.get(key) || [];\n this.headers.set(key, [...existing, value]);\n }\n\n delete(name: string): void {\n const key = name.toLowerCase();\n this.headers.delete(key);\n }\n\n get(name: string): string | null {\n const key = name.toLowerCase();\n const values = this.headers.get(key);\n return values ? values.join(\", \") : null;\n }\n\n has(name: string): boolean {\n const key = name.toLowerCase();\n return this.headers.has(key);\n }\n\n set(name: string, value: string): void {\n const key = name.toLowerCase();\n this.headers.set(key, [value]);\n }\n\n forEach(callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: unknown): void {\n const boundCallback = thisArg ? callbackfn.bind(thisArg) : callbackfn;\n this.headers.forEach((values, key) => boundCallback(values.join(\", \"), key, this));\n }\n\n getSetCookie(): string[] {\n return this.headers.get(\"set-cookie\") || [];\n }\n\n *entries(): IterableIterator<[string, string]> {\n for (const [key, values] of this.headers.entries()) {\n yield [key, values.join(\", \")];\n }\n }\n\n *keys(): IterableIterator<string> {\n yield* this.headers.keys();\n }\n\n *values(): IterableIterator<string> {\n for (const values of this.headers.values()) {\n yield values.join(\", \");\n }\n }\n\n [Symbol.iterator](): IterableIterator<[string, string]> {\n return this.entries();\n }\n };\n}\n\nexport { Headers };\n", "export const TIMEOUT = \"timeout\";\n\nexport function getTimeoutSignal(timeoutMs: number): { signal: AbortSignal; abortId: ReturnType<typeof setTimeout> } {\n const controller = new AbortController();\n const abortId = setTimeout(() => controller.abort(TIMEOUT), timeoutMs);\n return { signal: controller.signal, abortId };\n}\n\nexport function anySignal(...args: AbortSignal[] | [AbortSignal[]]): AbortSignal {\n const signals = (args.length === 1 && Array.isArray(args[0]) ? args[0] : args) as AbortSignal[];\n\n const controller = new AbortController();\n\n for (const signal of signals) {\n if (signal.aborted) {\n controller.abort((signal as any)?.reason);\n return controller.signal;\n }\n\n signal.addEventListener(\"abort\", () => controller.abort((signal as any)?.reason), {\n signal: controller.signal,\n });\n\n // Re-check after adding listener: the signal may have aborted\n // between the initial `signal.aborted` check and the `addEventListener`\n // call above. If it did, the abort event was already dispatched and\n // the listener will never fire \u2014 we must manually abort.\n if (signal.aborted) {\n controller.abort((signal as any)?.reason);\n return controller.signal;\n }\n }\n\n return controller.signal;\n}\n", "import { anySignal, getTimeoutSignal, TIMEOUT } from \"./signals.js\";\n\n/**\n * Cached result of checking whether the current runtime supports\n * the `cache` option in `Request`. Some runtimes (e.g. Cloudflare Workers)\n * throw a TypeError when this option is used.\n */\nlet _cacheNoStoreSupported: boolean | undefined;\nexport function isCacheNoStoreSupported(): boolean {\n if (_cacheNoStoreSupported != null) {\n return _cacheNoStoreSupported;\n }\n try {\n new Request(\"http://localhost\", { cache: \"no-store\" });\n _cacheNoStoreSupported = true;\n } catch {\n _cacheNoStoreSupported = false;\n }\n return _cacheNoStoreSupported;\n}\n\n/**\n * Reset the cached result of `isCacheNoStoreSupported`. Exposed for testing only.\n */\nexport function resetCacheNoStoreSupported(): void {\n _cacheNoStoreSupported = undefined;\n}\n\nconst responseTimeouts = new WeakMap<Response, ReturnType<typeof setTimeout>>();\n\n/**\n * Clears the timeout that `makeRequest` kept running (with `keepTimeoutUntilBodyRead`) so that it also\n * covered reading the response body.\n */\nexport function clearResponseTimeout(response: Response): void {\n const timeoutId = responseTimeouts.get(response);\n if (timeoutId != null) {\n clearTimeout(timeoutId);\n responseTimeouts.delete(response);\n }\n}\n\nexport const makeRequest = async (\n fetchFn: (url: string, init: RequestInit) => Promise<Response>,\n url: string,\n method: string,\n headers: Headers | Record<string, string>,\n requestBody: BodyInit | undefined,\n timeoutMs?: number,\n abortSignal?: AbortSignal,\n withCredentials?: boolean,\n duplex?: \"half\",\n disableCache?: boolean,\n keepTimeoutUntilBodyRead?: boolean,\n): Promise<Response> => {\n const signals: AbortSignal[] = [];\n\n let timeoutAbortId: ReturnType<typeof setTimeout> | undefined;\n let timeoutSignal: AbortSignal | undefined;\n if (timeoutMs != null) {\n const { signal, abortId } = getTimeoutSignal(timeoutMs);\n timeoutAbortId = abortId;\n timeoutSignal = signal;\n signals.push(signal);\n }\n\n if (abortSignal != null) {\n signals.push(abortSignal);\n }\n const newSignals = anySignal(signals);\n let response: Response;\n try {\n response = await fetchFn(url, {\n method: method,\n headers,\n body: requestBody,\n signal: newSignals,\n credentials: withCredentials ? \"include\" : undefined,\n // @ts-ignore\n duplex,\n ...(disableCache && isCacheNoStoreSupported() ? { cache: \"no-store\" as RequestCache } : {}),\n });\n } catch (error) {\n if (timeoutAbortId != null) {\n clearTimeout(timeoutAbortId);\n }\n // Some runtimes (e.g. Node 18) reject with their own error instead of the abort reason.\n if (timeoutSignal?.aborted && !abortSignal?.aborted) {\n throw TIMEOUT;\n }\n throw error;\n }\n\n if (timeoutAbortId != null) {\n if (keepTimeoutUntilBodyRead) {\n responseTimeouts.set(response, timeoutAbortId);\n } else {\n clearTimeout(timeoutAbortId);\n }\n }\n\n return response;\n};\n", "import { Headers } from \"./Headers.js\";\n\n/**\n * The raw response from the fetch call excluding the body.\n */\nexport type RawResponse = Omit<\n {\n [K in keyof Response as Response[K] extends Function ? never : K]: Response[K]; // strips out functions\n },\n \"ok\" | \"body\" | \"bodyUsed\"\n>; // strips out body and bodyUsed\n\n/**\n * A raw response indicating that the request was aborted.\n */\nexport const abortRawResponse: RawResponse = {\n headers: new Headers(),\n redirected: false,\n status: 499,\n statusText: \"Client Closed Request\",\n type: \"error\",\n url: \"\",\n} as const;\n\n/**\n * A raw response indicating an unknown error.\n */\nexport const unknownRawResponse: RawResponse = {\n headers: new Headers(),\n redirected: false,\n status: 0,\n statusText: \"Unknown Error\",\n type: \"error\",\n url: \"\",\n} as const;\n\n/**\n * Converts a `RawResponse` object into a `RawResponse` by extracting its properties,\n * excluding the `body` and `bodyUsed` fields.\n *\n * @param response - The `RawResponse` object to convert.\n * @returns A `RawResponse` object containing the extracted properties of the input response.\n */\nexport function toRawResponse(response: Response): RawResponse {\n return {\n headers: response.headers,\n redirected: response.redirected,\n status: response.status,\n statusText: response.statusText,\n type: response.type,\n url: response.url,\n };\n}\n\n/**\n * Creates a `RawResponse` from a standard `Response` object.\n */\nexport interface WithRawResponse<T> {\n readonly data: T;\n readonly rawResponse: RawResponse;\n}\n", "export const SENSITIVE_QUERY_PARAMS: Set<string> = new Set([\n \"api_key\",\n \"api-key\",\n \"apikey\",\n \"token\",\n \"access_token\",\n \"access-token\",\n \"auth_token\",\n \"auth-token\",\n \"password\",\n \"passwd\",\n \"secret\",\n \"api_secret\",\n \"api-secret\",\n \"apisecret\",\n \"key\",\n \"session\",\n \"session_id\",\n \"session-id\",\n]);\n\nexport function redactUrl(url: string): string {\n const protocolIndex = url.indexOf(\"://\");\n if (protocolIndex === -1) return url;\n\n const afterProtocol = protocolIndex + 3;\n\n // Find the first delimiter that marks the end of the authority section\n const pathStart = url.indexOf(\"/\", afterProtocol);\n let queryStart = url.indexOf(\"?\", afterProtocol);\n let fragmentStart = url.indexOf(\"#\", afterProtocol);\n\n const firstDelimiter = Math.min(\n pathStart === -1 ? url.length : pathStart,\n queryStart === -1 ? url.length : queryStart,\n fragmentStart === -1 ? url.length : fragmentStart,\n );\n\n // Find the LAST @ before the delimiter (handles multiple @ in credentials)\n let atIndex = -1;\n for (let i = afterProtocol; i < firstDelimiter; i++) {\n if (url[i] === \"@\") {\n atIndex = i;\n }\n }\n\n if (atIndex !== -1) {\n url = `${url.slice(0, afterProtocol)}[REDACTED]@${url.slice(atIndex + 1)}`;\n }\n\n // Recalculate queryStart since url might have changed\n queryStart = url.indexOf(\"?\");\n if (queryStart === -1) return url;\n\n fragmentStart = url.indexOf(\"#\", queryStart);\n const queryEnd = fragmentStart !== -1 ? fragmentStart : url.length;\n const queryString = url.slice(queryStart + 1, queryEnd);\n\n if (queryString.length === 0) return url;\n\n // FAST PATH: Quick check if any sensitive keywords present\n // Using indexOf is faster than regex for simple substring matching\n const lower = queryString.toLowerCase();\n const hasSensitive =\n lower.includes(\"token\") ||\n lower.includes(\"key\") ||\n lower.includes(\"password\") ||\n lower.includes(\"passwd\") ||\n lower.includes(\"secret\") ||\n lower.includes(\"session\") ||\n lower.includes(\"auth\");\n\n if (!hasSensitive) {\n return url;\n }\n\n // SLOW PATH: Parse and redact\n const redactedParams: string[] = [];\n const params = queryString.split(\"&\");\n\n for (const param of params) {\n const equalIndex = param.indexOf(\"=\");\n if (equalIndex === -1) {\n redactedParams.push(param);\n continue;\n }\n\n const key = param.slice(0, equalIndex);\n let shouldRedact = SENSITIVE_QUERY_PARAMS.has(key.toLowerCase());\n\n if (!shouldRedact && key.includes(\"%\")) {\n try {\n const decodedKey = decodeURIComponent(key);\n shouldRedact = SENSITIVE_QUERY_PARAMS.has(decodedKey.toLowerCase());\n } catch {}\n }\n\n redactedParams.push(shouldRedact ? `${key}=[REDACTED]` : param);\n }\n\n return url.slice(0, queryStart + 1) + redactedParams.join(\"&\") + url.slice(queryEnd);\n}\n", "const INITIAL_RETRY_DELAY = 1000; // in milliseconds\nconst MAX_RETRY_DELAY = 60000; // in milliseconds\nconst DEFAULT_MAX_RETRIES = 2;\nconst JITTER_FACTOR = 0.2; // 20% random jitter\n\nfunction isRetryableStatusCode(statusCode: number): boolean {\n return [408, 429].includes(statusCode) || statusCode >= 500;\n}\n\nfunction addPositiveJitter(delay: number): number {\n const jitterMultiplier = 1 + Math.random() * JITTER_FACTOR;\n return delay * jitterMultiplier;\n}\n\nfunction addSymmetricJitter(delay: number): number {\n const jitterMultiplier = 1 + (Math.random() - 0.5) * JITTER_FACTOR;\n return delay * jitterMultiplier;\n}\n\nfunction getRetryDelayFromHeaders(response: Response, retryAttempt: number): number {\n const retryAfter = response.headers.get(\"Retry-After\");\n if (retryAfter) {\n const retryAfterSeconds = parseInt(retryAfter, 10);\n if (!Number.isNaN(retryAfterSeconds) && retryAfterSeconds > 0) {\n return Math.min(retryAfterSeconds * 1000, MAX_RETRY_DELAY);\n }\n\n const retryAfterDate = new Date(retryAfter);\n if (!Number.isNaN(retryAfterDate.getTime())) {\n const delay = retryAfterDate.getTime() - Date.now();\n if (delay > 0) {\n return Math.min(Math.max(delay, 0), MAX_RETRY_DELAY);\n }\n }\n }\n\n const rateLimitReset = response.headers.get(\"X-RateLimit-Reset\");\n if (rateLimitReset) {\n const resetTime = parseInt(rateLimitReset, 10);\n if (!Number.isNaN(resetTime)) {\n const delay = resetTime * 1000 - Date.now();\n if (delay > 0) {\n return addPositiveJitter(Math.min(delay, MAX_RETRY_DELAY));\n }\n }\n }\n\n return addSymmetricJitter(Math.min(INITIAL_RETRY_DELAY * 2 ** retryAttempt, MAX_RETRY_DELAY));\n}\n\n/**\n * Waits `ms` milliseconds, or rejects as soon as `abortSignal` aborts. The timer and\n * the abort listener are always removed, so a cancelled wait never keeps the process alive.\n */\nfunction sleep(ms: number, abortSignal: AbortSignal | undefined): Promise<void> {\n return new Promise((resolve, reject) => {\n if (abortSignal?.aborted) {\n reject(abortSignal.reason);\n return;\n }\n const onAbort = () => {\n clearTimeout(timeoutId);\n reject(abortSignal?.reason);\n };\n const timeoutId = setTimeout(() => {\n abortSignal?.removeEventListener(\"abort\", onAbort);\n resolve();\n }, ms);\n abortSignal?.addEventListener(\"abort\", onAbort, { once: true });\n });\n}\n\nexport async function requestWithRetries(\n requestFn: () => Promise<Response>,\n maxRetries: number = DEFAULT_MAX_RETRIES,\n abortSignal?: AbortSignal,\n): Promise<Response> {\n let response: Response = await requestFn();\n\n for (let i = 0; i < maxRetries; ++i) {\n if (isRetryableStatusCode(response.status)) {\n const delay = getRetryDelayFromHeaders(response, i);\n\n await sleep(delay, abortSignal);\n response = await requestFn();\n } else {\n break;\n }\n }\n return response!;\n}\n", "import { toJson } from \"../json.js\";\nimport { createLogger, type LogConfig, type Logger } from \"../logging/logger.js\";\nimport type { APIResponse } from \"./APIResponse.js\";\nimport { createRequestUrl } from \"./createRequestUrl.js\";\nimport type { EndpointMetadata } from \"./EndpointMetadata.js\";\nimport { EndpointSupplier } from \"./EndpointSupplier.js\";\nimport { getErrorResponseBody } from \"./getErrorResponseBody.js\";\nimport { getFetchFn } from \"./getFetchFn.js\";\nimport { getRequestBody } from \"./getRequestBody.js\";\nimport { getResponseBody, isResponseBodyError } from \"./getResponseBody.js\";\nimport { Headers } from \"./Headers.js\";\nimport { clearResponseTimeout, makeRequest } from \"./makeRequest.js\";\nimport { abortRawResponse, toRawResponse, unknownRawResponse } from \"./RawResponse.js\";\nimport { redactUrl, SENSITIVE_QUERY_PARAMS } from \"./redactUrl.js\";\nimport { requestWithRetries } from \"./requestWithRetries.js\";\nimport { TIMEOUT } from \"./signals.js\";\n\nexport type FetchFunction = <R = unknown>(args: Fetcher.Args) => Promise<APIResponse<R, Fetcher.Error>>;\n\nexport declare namespace Fetcher {\n export interface Args {\n url: string;\n method: string;\n contentType?: string;\n headers?: Record<string, unknown>;\n /**\n * @deprecated Prefer `queryString` (produced by `core.url.queryBuilder()`).\n * Retained for backwards compatibility with custom fetchers and callers that\n * still construct request args with a query-parameter object.\n */\n queryParameters?: Record<string, unknown>;\n queryString?: string;\n body?: unknown;\n timeoutMs?: number;\n maxRetries?: number;\n withCredentials?: boolean;\n abortSignal?: AbortSignal;\n requestType?: \"json\" | \"file\" | \"bytes\" | \"form\" | \"other\";\n responseType?: \"json\" | \"blob\" | \"sse\" | \"streaming\" | \"text\" | \"arrayBuffer\" | \"binary-response\";\n duplex?: \"half\";\n endpointMetadata?: EndpointMetadata;\n fetchFn?: typeof fetch;\n logging?: LogConfig | Logger;\n }\n\n export type Error = FailedStatusCodeError | NonJsonError | BodyIsNullError | TimeoutError | UnknownError;\n\n export interface FailedStatusCodeError {\n reason: \"status-code\";\n statusCode: number;\n body: unknown;\n }\n\n export interface NonJsonError {\n reason: \"non-json\";\n statusCode: number;\n rawBody: string;\n }\n\n export interface BodyIsNullError {\n reason: \"body-is-null\";\n statusCode: number;\n }\n\n export interface TimeoutError {\n reason: \"timeout\";\n cause?: unknown;\n }\n\n export interface UnknownError {\n reason: \"unknown\";\n errorMessage: string;\n cause?: unknown;\n }\n}\n\nconst SENSITIVE_HEADERS = new Set([\n \"authorization\",\n \"www-authenticate\",\n \"x-api-key\",\n \"api-key\",\n \"apikey\",\n \"x-api-token\",\n \"x-auth-token\",\n \"auth-token\",\n \"cookie\",\n \"set-cookie\",\n \"proxy-authorization\",\n \"proxy-authenticate\",\n \"x-csrf-token\",\n \"x-xsrf-token\",\n \"x-session-token\",\n \"x-access-token\",\n]);\n\nfunction redactHeaders(headers: Headers | Record<string, string>): Record<string, string> {\n const filtered: Record<string, string> = {};\n for (const [key, value] of headers instanceof Headers ? headers.entries() : Object.entries(headers)) {\n if (SENSITIVE_HEADERS.has(key.toLowerCase())) {\n filtered[key] = \"[REDACTED]\";\n } else {\n filtered[key] = value;\n }\n }\n return filtered;\n}\n\nfunction redactQueryParameters(\n queryParameters: Record<string, unknown> | undefined,\n): Record<string, unknown> | undefined {\n if (queryParameters == null) {\n return undefined;\n }\n const redacted: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(queryParameters)) {\n redacted[key] = SENSITIVE_QUERY_PARAMS.has(key.toLowerCase()) ? \"[REDACTED]\" : value;\n }\n return redacted;\n}\n\nasync function getHeaders(args: Fetcher.Args): Promise<Headers> {\n const newHeaders: Headers = new Headers();\n\n newHeaders.set(\n \"Accept\",\n args.responseType === \"json\"\n ? \"application/json\"\n : args.responseType === \"text\"\n ? \"text/plain\"\n : args.responseType === \"sse\"\n ? \"text/event-stream\"\n : \"*/*\",\n );\n if (args.body !== undefined && args.contentType != null) {\n newHeaders.set(\"Content-Type\", args.contentType);\n }\n\n if (args.headers == null) {\n return newHeaders;\n }\n\n for (const [key, value] of Object.entries(args.headers)) {\n const result = await EndpointSupplier.get(value, { endpointMetadata: args.endpointMetadata ?? {} });\n if (typeof result === \"string\") {\n newHeaders.set(key, result);\n continue;\n }\n if (result == null) {\n continue;\n }\n newHeaders.set(key, `${result}`);\n }\n return newHeaders;\n}\n\nfunction isJsonContentType(contentType: string | null): boolean {\n const mediaType = contentType?.split(\";\")[0]?.trim().toLowerCase() ?? \"\";\n return mediaType === \"application/json\" || mediaType === \"text/json\" || mediaType.endsWith(\"+json\");\n}\n\nexport async function fetcherImpl<R = unknown>(args: Fetcher.Args): Promise<APIResponse<R, Fetcher.Error>> {\n let url = args.url;\n if (args.queryString != null && args.queryString.length > 0) {\n url = `${url}?${args.queryString}`;\n } else {\n url = createRequestUrl(args.url, args.queryParameters);\n }\n const requestBody: BodyInit | undefined = await getRequestBody({\n body: args.body,\n type: args.requestType ?? \"other\",\n });\n const fetchFn = args.fetchFn ?? (await getFetchFn());\n const headers = await getHeaders(args);\n const logger = createLogger(args.logging);\n\n if (logger.isDebug()) {\n const metadata = {\n method: args.method,\n url: redactUrl(url),\n headers: redactHeaders(headers),\n queryParameters: redactQueryParameters(args.queryParameters),\n hasBody: requestBody != null,\n };\n logger.debug(\"Making HTTP request\", metadata);\n }\n\n // Bodies that are read in full here stay covered by the timeout; streamed bodies are read by the caller.\n const keepTimeoutUntilBodyRead =\n args.responseType !== \"streaming\" && args.responseType !== \"sse\" && args.responseType !== \"binary-response\";\n const attemptResponses: Response[] = [];\n try {\n const response = await requestWithRetries(\n async () => {\n // A retry means the previous attempt is over; stop its timer now rather than at the end.\n for (const previousResponse of attemptResponses) {\n clearResponseTimeout(previousResponse);\n }\n const attemptResponse = await makeRequest(\n fetchFn,\n url,\n args.method,\n headers,\n requestBody,\n args.timeoutMs,\n args.abortSignal,\n args.withCredentials,\n args.duplex,\n args.responseType === \"streaming\" || args.responseType === \"sse\",\n keepTimeoutUntilBodyRead,\n );\n attemptResponses.push(attemptResponse);\n return attemptResponse;\n },\n args.maxRetries,\n args.abortSignal,\n );\n\n if (response.status >= 200 && response.status < 400) {\n if (logger.isDebug()) {\n const metadata = {\n method: args.method,\n url: redactUrl(url),\n statusCode: response.status,\n responseHeaders: redactHeaders(response.headers),\n };\n logger.debug(\"HTTP request succeeded\", metadata);\n }\n const body = await getResponseBody(response, args.responseType);\n // Only a body the server labelled as JSON is an error here; void endpoints may return plain text.\n if (\n isResponseBodyError(body) &&\n body.error.reason === \"non-json\" &&\n isJsonContentType(response.headers.get(\"Content-Type\"))\n ) {\n return {\n ok: false,\n error: body.error,\n rawResponse: toRawResponse(response),\n };\n }\n return {\n ok: true,\n body: body as R,\n headers: response.headers,\n rawResponse: toRawResponse(response),\n };\n } else {\n if (logger.isError()) {\n const metadata = {\n method: args.method,\n url: redactUrl(url),\n statusCode: response.status,\n responseHeaders: redactHeaders(Object.fromEntries(response.headers.entries())),\n };\n logger.error(\"HTTP request failed with error status\", metadata);\n }\n return {\n ok: false,\n error: {\n reason: \"status-code\",\n statusCode: response.status,\n body: await getErrorResponseBody(response),\n },\n rawResponse: toRawResponse(response),\n };\n }\n } catch (error) {\n if (args.abortSignal?.aborted) {\n if (logger.isError()) {\n const metadata = {\n method: args.method,\n url: redactUrl(url),\n };\n logger.error(\"HTTP request was aborted\", metadata);\n }\n return {\n ok: false,\n error: {\n reason: \"unknown\",\n errorMessage: \"The user aborted a request\",\n cause: error,\n },\n rawResponse: abortRawResponse,\n };\n } else if (error === TIMEOUT || (error instanceof Error && error.name === \"AbortError\")) {\n if (logger.isError()) {\n const metadata = {\n method: args.method,\n url: redactUrl(url),\n timeoutMs: args.timeoutMs,\n };\n logger.error(\"HTTP request timed out\", metadata);\n }\n return {\n ok: false,\n error: {\n reason: \"timeout\",\n cause: error,\n },\n rawResponse: abortRawResponse,\n };\n } else if (error instanceof Error) {\n if (logger.isError()) {\n const metadata = {\n method: args.method,\n url: redactUrl(url),\n errorMessage: error.message,\n };\n logger.error(\"HTTP request failed with error\", metadata);\n }\n return {\n ok: false,\n error: {\n reason: \"unknown\",\n errorMessage: error.message,\n cause: error,\n },\n rawResponse: unknownRawResponse,\n };\n }\n\n if (logger.isError()) {\n const metadata = {\n method: args.method,\n url: redactUrl(url),\n error: toJson(error),\n };\n logger.error(\"HTTP request failed with unknown error\", metadata);\n }\n return {\n ok: false,\n error: {\n reason: \"unknown\",\n errorMessage: toJson(error),\n cause: error,\n },\n rawResponse: unknownRawResponse,\n };\n } finally {\n for (const attemptResponse of attemptResponses) {\n clearResponseTimeout(attemptResponse);\n }\n }\n}\n\nexport const fetcher: FetchFunction = fetcherImpl;\n", "import type { WithRawResponse } from \"./RawResponse.js\";\n\n/**\n * A promise that returns the parsed response and lets you retrieve the raw response too.\n */\nexport class HttpResponsePromise<T> extends Promise<T> {\n private innerPromise: Promise<WithRawResponse<T>>;\n private unwrappedPromise: Promise<T> | undefined;\n\n private constructor(promise: Promise<WithRawResponse<T>>) {\n // Initialize with a no-op to avoid premature parsing\n super((resolve) => {\n resolve(undefined as unknown as T);\n });\n this.innerPromise = promise;\n }\n\n /**\n * Creates an `HttpResponsePromise` from a function that returns a promise.\n *\n * @param fn - A function that returns a promise resolving to a `WithRawResponse` object.\n * @param args - Arguments to pass to the function.\n * @returns An `HttpResponsePromise` instance.\n */\n public static fromFunction<F extends (...args: never[]) => Promise<WithRawResponse<T>>, T>(\n fn: F,\n ...args: Parameters<F>\n ): HttpResponsePromise<T> {\n return new HttpResponsePromise<T>(fn(...args));\n }\n\n /**\n * Creates a function that returns an `HttpResponsePromise` from a function that returns a promise.\n *\n * @param fn - A function that returns a promise resolving to a `WithRawResponse` object.\n * @returns A function that returns an `HttpResponsePromise` instance.\n */\n public static interceptFunction<\n F extends (...args: never[]) => Promise<WithRawResponse<T>>,\n T = Awaited<ReturnType<F>>[\"data\"],\n >(fn: F): (...args: Parameters<F>) => HttpResponsePromise<T> {\n return (...args: Parameters<F>): HttpResponsePromise<T> => {\n return HttpResponsePromise.fromPromise<T>(fn(...args));\n };\n }\n\n /**\n * Creates an `HttpResponsePromise` from an existing promise.\n *\n * @param promise - A promise resolving to a `WithRawResponse` object.\n * @returns An `HttpResponsePromise` instance.\n */\n public static fromPromise<T>(promise: Promise<WithRawResponse<T>>): HttpResponsePromise<T> {\n return new HttpResponsePromise<T>(promise);\n }\n\n /**\n * Creates an `HttpResponsePromise` from an executor function.\n *\n * @param executor - A function that takes resolve and reject callbacks to create a promise.\n * @returns An `HttpResponsePromise` instance.\n */\n public static fromExecutor<T>(\n executor: (resolve: (value: WithRawResponse<T>) => void, reject: (reason?: unknown) => void) => void,\n ): HttpResponsePromise<T> {\n const promise = new Promise<WithRawResponse<T>>(executor);\n return new HttpResponsePromise<T>(promise);\n }\n\n /**\n * Creates an `HttpResponsePromise` from a resolved result.\n *\n * @param result - A `WithRawResponse` object to resolve immediately.\n * @returns An `HttpResponsePromise` instance.\n */\n public static fromResult<T>(result: WithRawResponse<T>): HttpResponsePromise<T> {\n const promise = Promise.resolve(result);\n return new HttpResponsePromise<T>(promise);\n }\n\n private unwrap(): Promise<T> {\n if (!this.unwrappedPromise) {\n this.unwrappedPromise = this.innerPromise.then(({ data }) => data);\n }\n return this.unwrappedPromise;\n }\n\n /** @inheritdoc */\n public override then<TResult1 = T, TResult2 = never>(\n onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,\n onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null,\n ): Promise<TResult1 | TResult2> {\n return this.unwrap().then(onfulfilled, onrejected);\n }\n\n /** @inheritdoc */\n public override catch<TResult = never>(\n onrejected?: ((reason: unknown) => TResult | PromiseLike<TResult>) | null,\n ): Promise<T | TResult> {\n return this.unwrap().catch(onrejected);\n }\n\n /** @inheritdoc */\n public override finally(onfinally?: (() => void) | null): Promise<T> {\n return this.unwrap().finally(onfinally);\n }\n\n /**\n * Retrieves the data and raw response.\n *\n * @returns A promise resolving to a `WithRawResponse` object.\n */\n public async withRawResponse(): Promise<WithRawResponse<T>> {\n return await this.innerPromise;\n }\n}\n", "export function join(base: string, ...segments: string[]): string {\n if (!base) {\n return \"\";\n }\n\n if (segments.length === 0) {\n return base;\n }\n\n if (base.includes(\"://\")) {\n let url: URL;\n try {\n url = new URL(base);\n } catch {\n return joinPath(base, ...segments);\n }\n\n const lastSegment = segments[segments.length - 1];\n const shouldPreserveTrailingSlash = lastSegment?.endsWith(\"/\");\n\n for (const segment of segments) {\n const cleanSegment = trimSlashes(segment);\n if (cleanSegment) {\n url.pathname = joinPathSegments(url.pathname, cleanSegment);\n }\n }\n\n if (shouldPreserveTrailingSlash && !url.pathname.endsWith(\"/\")) {\n url.pathname += \"/\";\n }\n\n return url.toString();\n }\n\n return joinPath(base, ...segments);\n}\n\nfunction joinPath(base: string, ...segments: string[]): string {\n if (segments.length === 0) {\n return base;\n }\n\n let result = base;\n\n const lastSegment = segments[segments.length - 1];\n const shouldPreserveTrailingSlash = lastSegment?.endsWith(\"/\");\n\n for (const segment of segments) {\n const cleanSegment = trimSlashes(segment);\n if (cleanSegment) {\n result = joinPathSegments(result, cleanSegment);\n }\n }\n\n if (shouldPreserveTrailingSlash && !result.endsWith(\"/\")) {\n result += \"/\";\n }\n\n return result;\n}\n\nfunction joinPathSegments(left: string, right: string): string {\n if (left.endsWith(\"/\")) {\n return left + right;\n }\n return `${left}/${right}`;\n}\n\nfunction trimSlashes(str: string): string {\n if (!str) return str;\n\n let start = 0;\n let end = str.length;\n\n if (str.startsWith(\"/\")) start = 1;\n if (str.endsWith(\"/\")) end = str.length - 1;\n\n return start === 0 && end === str.length ? str : str.slice(start, end);\n}\n", "export type Supplier<T> = T | Promise<T> | (() => T | Promise<T>);\n\nexport const Supplier = {\n get: async <T>(supplier: Supplier<T>): Promise<T> => {\n if (typeof supplier === \"function\") {\n return (supplier as () => T)();\n } else {\n return supplier;\n }\n },\n};\n", "import { createLogger, type LogConfig, type Logger } from \"../logging/logger.js\";\nimport { join } from \"../url/join.js\";\nimport { EndpointSupplier } from \"./EndpointSupplier.js\";\nimport { getFetchFn } from \"./getFetchFn.js\";\nimport { makeRequest } from \"./makeRequest.js\";\nimport { redactUrl } from \"./redactUrl.js\";\nimport { requestWithRetries } from \"./requestWithRetries.js\";\nimport { Supplier } from \"./Supplier.js\";\nimport { TIMEOUT } from \"./signals.js\";\n\nexport declare namespace PassthroughRequest {\n /**\n * Per-request options that can override the SDK client defaults.\n */\n export interface RequestOptions {\n /** Override the default timeout for this request (in seconds). */\n timeoutInSeconds?: number;\n /** Override the default number of retries for this request. */\n maxRetries?: number;\n /** Additional headers to include in this request. */\n headers?: Record<string, string>;\n /** Abort signal for this request. */\n abortSignal?: AbortSignal;\n }\n\n /**\n * SDK client configuration used by the passthrough fetch method.\n */\n export interface ClientOptions {\n /** The base URL or environment for the client. */\n environment?: Supplier<string>;\n /** Override the base URL. */\n baseUrl?: Supplier<string>;\n /** Default headers to include in requests. */\n headers?: Record<string, unknown>;\n /** Default maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** Default number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A custom fetch function. */\n fetch?: typeof fetch;\n /** Logging configuration. */\n logging?: LogConfig | Logger;\n /** A function that returns auth headers. */\n getAuthHeaders?: () => Promise<Record<string, string>>;\n }\n}\n\n/**\n * Makes a passthrough HTTP request using the SDK's configuration (auth, retry, logging, etc.)\n * while mimicking the standard `fetch` API.\n *\n * @param input - The URL, path, or Request object. If a relative path, it will be resolved against the configured base URL.\n * @param init - Standard RequestInit options (method, headers, body, signal, etc.)\n * @param clientOptions - SDK client options (auth, default headers, logging, etc.)\n * @param requestOptions - Per-request overrides (timeout, retries, extra headers, abort signal).\n * @returns A standard Response object.\n */\nexport async function makePassthroughRequest(\n input: Request | string | URL,\n init: RequestInit | undefined,\n clientOptions: PassthroughRequest.ClientOptions,\n requestOptions?: PassthroughRequest.RequestOptions,\n): Promise<Response> {\n const logger = createLogger(clientOptions.logging);\n\n // Extract URL and default init properties from Request object if provided\n let url: string;\n let effectiveInit: RequestInit | undefined = init;\n if (input instanceof Request) {\n url = input.url;\n // If no explicit init provided, extract properties from the Request object\n if (init == null) {\n effectiveInit = {\n method: input.method,\n headers: Object.fromEntries(input.headers.entries()),\n body: input.body,\n signal: input.signal,\n credentials: input.credentials,\n cache: input.cache as RequestCache,\n redirect: input.redirect,\n referrer: input.referrer,\n integrity: input.integrity,\n mode: input.mode,\n };\n }\n } else {\n url = input instanceof URL ? input.toString() : input;\n }\n\n // Resolve the base URL\n const baseUrl =\n (clientOptions.baseUrl != null ? await Supplier.get(clientOptions.baseUrl) : undefined) ??\n (clientOptions.environment != null ? await Supplier.get(clientOptions.environment) : undefined);\n\n // Determine the full URL\n let fullUrl: string;\n if (url.startsWith(\"http://\") || url.startsWith(\"https://\")) {\n fullUrl = url;\n } else if (baseUrl != null) {\n fullUrl = join(baseUrl, url);\n } else {\n fullUrl = url;\n }\n\n // Merge headers: SDK default headers -> auth headers -> user-provided headers\n const mergedHeaders: Record<string, string> = {};\n\n // Apply SDK default headers (resolve suppliers)\n if (clientOptions.headers != null) {\n for (const [key, value] of Object.entries(clientOptions.headers)) {\n const resolved = await EndpointSupplier.get(value, { endpointMetadata: {} });\n if (resolved != null) {\n mergedHeaders[key.toLowerCase()] = `${resolved}`;\n }\n }\n }\n\n // Apply auth headers, but only when the resolved URL targets the configured base URL.\n // This prevents the SDK's credentials from leaking to an unrelated host when a caller\n // passes an absolute cross-origin URL into the passthrough fetch escape hatch.\n if (clientOptions.getAuthHeaders != null && targetsBaseUrl(fullUrl, baseUrl)) {\n const authHeaders = await clientOptions.getAuthHeaders();\n for (const [key, value] of Object.entries(authHeaders)) {\n mergedHeaders[key.toLowerCase()] = value;\n }\n }\n\n // Apply user-provided headers from init\n if (effectiveInit?.headers != null) {\n const initHeaders =\n effectiveInit.headers instanceof Headers\n ? Object.fromEntries(effectiveInit.headers.entries())\n : Array.isArray(effectiveInit.headers)\n ? Object.fromEntries(effectiveInit.headers)\n : effectiveInit.headers;\n for (const [key, value] of Object.entries(initHeaders)) {\n if (value != null) {\n mergedHeaders[key.toLowerCase()] = value;\n }\n }\n }\n\n // Apply per-request option headers (highest priority)\n if (requestOptions?.headers != null) {\n for (const [key, value] of Object.entries(requestOptions.headers)) {\n mergedHeaders[key.toLowerCase()] = value;\n }\n }\n\n const method = effectiveInit?.method ?? \"GET\";\n const body = effectiveInit?.body;\n const timeoutInSeconds = requestOptions?.timeoutInSeconds ?? clientOptions.timeoutInSeconds;\n const timeoutMs = timeoutInSeconds != null ? timeoutInSeconds * 1000 : undefined;\n const maxRetries = requestOptions?.maxRetries ?? clientOptions.maxRetries;\n const abortSignal = requestOptions?.abortSignal ?? effectiveInit?.signal ?? undefined;\n const fetchFn = clientOptions.fetch ?? (await getFetchFn());\n\n if (logger.isDebug()) {\n logger.debug(\"Making passthrough HTTP request\", {\n method,\n url: redactUrl(fullUrl),\n hasBody: body != null,\n });\n }\n\n let response: Response;\n try {\n response = await requestWithRetries(\n async () =>\n makeRequest(\n fetchFn,\n fullUrl,\n method,\n mergedHeaders,\n body ?? undefined,\n timeoutMs,\n abortSignal,\n effectiveInit?.credentials === \"include\",\n undefined, // duplex\n false, // disableCache\n ),\n maxRetries,\n abortSignal,\n );\n } catch (error) {\n // Match `fetch`: a timeout rejects with an Error named \"TimeoutError\", not the bare abort reason.\n if (error === TIMEOUT) {\n throw createTimeoutError();\n }\n throw error;\n }\n\n if (logger.isDebug()) {\n logger.debug(\"Passthrough HTTP request completed\", {\n method,\n url: redactUrl(fullUrl),\n statusCode: response.status,\n });\n }\n\n return response;\n}\n\nfunction createTimeoutError(): Error {\n const error = new Error(\"The request timed out.\");\n error.name = \"TimeoutError\";\n return error;\n}\n\n/**\n * Returns true when the resolved request URL points at the same origin as the\n * configured base URL. Relative paths are always joined onto the base URL, so\n * they resolve to the base origin and return true. Absolute URLs only match when\n * their origin equals the base origin. When there is no base URL to compare\n * against, or either value is not a parseable absolute URL, this returns false so\n * auth headers are not attached.\n */\nfunction targetsBaseUrl(fullUrl: string, baseUrl: string | undefined): boolean {\n if (baseUrl == null) {\n return false;\n }\n try {\n return new URL(fullUrl).origin === new URL(baseUrl).origin;\n } catch {\n return false;\n }\n}\n", "import type { Uploadable } from \"./types.js\";\n\nexport async function toBinaryUploadRequest(\n file: Uploadable,\n): Promise<{ body: Uploadable.FileLike; headers?: Record<string, string> }> {\n const { data, filename, contentLength, contentType } = await getFileWithMetadata(file);\n const request = {\n body: data,\n headers: {} as Record<string, string>,\n };\n if (filename) {\n request.headers[\"Content-Disposition\"] = `attachment; filename=\"${filename}\"`;\n }\n if (contentType) {\n request.headers[\"Content-Type\"] = contentType;\n }\n if (contentLength != null) {\n request.headers[\"Content-Length\"] = contentLength.toString();\n }\n return request;\n}\n\nexport async function toMultipartDataPart(\n file: Uploadable,\n): Promise<{ data: Uploadable.FileLike; filename?: string; contentType?: string }> {\n const { data, filename, contentType } = await getFileWithMetadata(file, {\n noSniffFileSize: true,\n });\n return {\n data,\n filename,\n contentType,\n };\n}\n\nasync function getFileWithMetadata(\n file: Uploadable,\n { noSniffFileSize }: { noSniffFileSize?: boolean } = {},\n): Promise<Uploadable.WithMetadata> {\n if (file == null) {\n throw new Error(\n `Expected file to be a Blob, Buffer, ReadableStream, or an object with a \"path\" or \"data\" property, but received ${file === null ? \"null\" : \"undefined\"}.`,\n );\n }\n if (isFileLike(file)) {\n return getFileWithMetadata(\n {\n data: file,\n },\n { noSniffFileSize },\n );\n }\n\n if (\"path\" in file) {\n const fs = await import(\"fs\");\n if (!fs?.createReadStream) {\n throw new Error(\"File path uploads are not supported in this environment.\");\n }\n const data = fs.createReadStream(file.path);\n const contentLength =\n file.contentLength ?? (noSniffFileSize === true ? undefined : await tryGetFileSizeFromPath(file.path));\n const filename = file.filename ?? getNameFromPath(file.path);\n return {\n data,\n filename,\n contentType: file.contentType,\n contentLength,\n };\n }\n if (\"data\" in file) {\n const data = file.data;\n const contentLength =\n file.contentLength ??\n (await tryGetContentLengthFromFileLike(data, {\n noSniffFileSize,\n }));\n const filename = file.filename ?? tryGetNameFromFileLike(data);\n return {\n data,\n filename,\n contentType: file.contentType ?? tryGetContentTypeFromFileLike(data),\n contentLength,\n };\n }\n\n throw new Error(`Invalid FileUpload of type ${typeof file}: ${JSON.stringify(file)}`);\n}\n\nfunction isFileLike(value: unknown): value is Uploadable.FileLike {\n return (\n isBuffer(value) ||\n isArrayBufferView(value) ||\n isArrayBuffer(value) ||\n isUint8Array(value) ||\n isBlob(value) ||\n isFile(value) ||\n isStreamLike(value) ||\n isReadableStream(value)\n );\n}\n\nasync function tryGetFileSizeFromPath(path: string): Promise<number | undefined> {\n try {\n const fs = await import(\"fs\");\n if (!fs?.promises?.stat) {\n return undefined;\n }\n const fileStat = await fs.promises.stat(path);\n return fileStat.size;\n } catch (_fallbackError) {\n return undefined;\n }\n}\n\nfunction tryGetNameFromFileLike(data: Uploadable.FileLike): string | undefined {\n if (isNamedValue(data)) {\n return data.name;\n }\n if (isPathedValue(data)) {\n return getNameFromPath(data.path.toString());\n }\n return undefined;\n}\n\nasync function tryGetContentLengthFromFileLike(\n data: Uploadable.FileLike,\n { noSniffFileSize }: { noSniffFileSize?: boolean } = {},\n): Promise<number | undefined> {\n if (isBuffer(data)) {\n return data.length;\n }\n if (isArrayBufferView(data)) {\n return data.byteLength;\n }\n if (isArrayBuffer(data)) {\n return data.byteLength;\n }\n if (isBlob(data)) {\n return data.size;\n }\n if (isFile(data)) {\n return data.size;\n }\n if (noSniffFileSize === true) {\n return undefined;\n }\n if (isPathedValue(data)) {\n return await tryGetFileSizeFromPath(data.path.toString());\n }\n return undefined;\n}\n\nfunction tryGetContentTypeFromFileLike(data: Uploadable.FileLike): string | undefined {\n if (isBlob(data)) {\n return data.type;\n }\n if (isFile(data)) {\n return data.type;\n }\n\n return undefined;\n}\n\nfunction getNameFromPath(path: string): string | undefined {\n const lastForwardSlash = path.lastIndexOf(\"/\");\n const lastBackSlash = path.lastIndexOf(\"\\\\\");\n const lastSlashIndex = Math.max(lastForwardSlash, lastBackSlash);\n return lastSlashIndex >= 0 ? path.substring(lastSlashIndex + 1) : path;\n}\n\ntype NamedValue = {\n name: string;\n} & unknown;\n\ntype PathedValue = {\n path: string | { toString(): string };\n} & unknown;\n\ntype StreamLike = {\n read?: () => unknown;\n pipe?: (dest: unknown) => unknown;\n} & unknown;\n\nfunction isNamedValue(value: unknown): value is NamedValue {\n return typeof value === \"object\" && value != null && \"name\" in value;\n}\n\nfunction isPathedValue(value: unknown): value is PathedValue {\n return typeof value === \"object\" && value != null && \"path\" in value;\n}\n\nfunction isStreamLike(value: unknown): value is StreamLike {\n return typeof value === \"object\" && value != null && (\"read\" in value || \"pipe\" in value);\n}\n\nfunction isReadableStream(value: unknown): value is ReadableStream {\n return typeof value === \"object\" && value != null && \"getReader\" in value;\n}\n\nfunction isBuffer(value: unknown): value is Buffer {\n return typeof Buffer !== \"undefined\" && Buffer.isBuffer && Buffer.isBuffer(value);\n}\n\nfunction isArrayBufferView(value: unknown): value is ArrayBufferView {\n return typeof ArrayBuffer !== \"undefined\" && ArrayBuffer.isView(value);\n}\n\nfunction isArrayBuffer(value: unknown): value is ArrayBuffer {\n return typeof ArrayBuffer !== \"undefined\" && value instanceof ArrayBuffer;\n}\n\nfunction isUint8Array(value: unknown): value is Uint8Array {\n return typeof Uint8Array !== \"undefined\" && value instanceof Uint8Array;\n}\n\nfunction isBlob(value: unknown): value is Blob {\n return typeof Blob !== \"undefined\" && value instanceof Blob;\n}\n\nfunction isFile(value: unknown): value is File {\n return typeof File !== \"undefined\" && value instanceof File;\n}\n", "interface DenoGlobal {\n version: {\n deno: string;\n };\n build?: {\n os?: string;\n arch?: string;\n };\n}\n\ninterface BunGlobal {\n version: string;\n}\n\ndeclare const Deno: DenoGlobal | undefined;\ndeclare const Bun: BunGlobal | undefined;\ndeclare const EdgeRuntime: string | undefined;\ndeclare const self: typeof globalThis.self & {\n importScripts?: unknown;\n};\n\n/**\n * A constant that indicates which environment and version the SDK is running in.\n */\nexport const RUNTIME: Runtime = evaluateRuntime();\n\nexport interface Runtime {\n type: \"browser\" | \"web-worker\" | \"deno\" | \"bun\" | \"node\" | \"react-native\" | \"unknown\" | \"workerd\" | \"edge-runtime\";\n version?: string;\n parsedVersion?: number;\n /**\n * The operating system the SDK is running on, when it can be determined\n * (e.g. \"linux\", \"darwin\", \"win32\" on server runtimes). Undefined in\n * environments where the OS is not observable (e.g. browsers).\n */\n os?: string;\n /**\n * The CPU architecture the SDK is running on, when it can be determined\n * (e.g. \"x64\", \"arm64\" on server runtimes). Undefined in environments where\n * the architecture is not observable (e.g. browsers).\n */\n arch?: string;\n}\n\nfunction evaluateRuntime(): Runtime {\n /**\n * A constant that indicates whether the environment the code is running is a Web Browser.\n */\n const isBrowser = typeof window !== \"undefined\" && typeof window.document !== \"undefined\";\n if (isBrowser) {\n return {\n type: \"browser\",\n version: window.navigator.userAgent,\n };\n }\n\n /**\n * A constant that indicates whether the environment the code is running is Cloudflare.\n * https://developers.cloudflare.com/workers/runtime-apis/web-standards/#navigatoruseragent\n */\n const isCloudflare = typeof globalThis !== \"undefined\" && globalThis?.navigator?.userAgent === \"Cloudflare-Workers\";\n if (isCloudflare) {\n return {\n type: \"workerd\",\n };\n }\n\n /**\n * A constant that indicates whether the environment the code is running is Edge Runtime.\n * https://vercel.com/docs/functions/runtimes/edge-runtime#check-if-you're-running-on-the-edge-runtime\n */\n const isEdgeRuntime = typeof EdgeRuntime === \"string\";\n if (isEdgeRuntime) {\n return {\n type: \"edge-runtime\",\n };\n }\n\n /**\n * A constant that indicates whether the environment the code is running is a Web Worker.\n */\n const isWebWorker =\n typeof self === \"object\" &&\n typeof self?.importScripts === \"function\" &&\n (self.constructor?.name === \"DedicatedWorkerGlobalScope\" ||\n self.constructor?.name === \"ServiceWorkerGlobalScope\" ||\n self.constructor?.name === \"SharedWorkerGlobalScope\");\n if (isWebWorker) {\n return {\n type: \"web-worker\",\n };\n }\n\n /**\n * A constant that indicates whether the environment the code is running is Deno.\n * FYI Deno spoofs process.versions.node, see https://deno.land/std@0.177.0/node/process.ts?s=versions\n */\n const isDeno =\n typeof Deno !== \"undefined\" && typeof Deno.version !== \"undefined\" && typeof Deno.version.deno !== \"undefined\";\n if (isDeno) {\n return {\n type: \"deno\",\n version: Deno.version.deno,\n os: Deno.build?.os,\n arch: Deno.build?.arch,\n };\n }\n\n /**\n * A constant that indicates whether the environment the code is running is Bun.sh.\n */\n const isBun = typeof Bun !== \"undefined\" && typeof Bun.version !== \"undefined\";\n if (isBun) {\n return {\n type: \"bun\",\n version: Bun.version,\n os: typeof process !== \"undefined\" ? process.platform : undefined,\n arch: typeof process !== \"undefined\" ? process.arch : undefined,\n };\n }\n\n /**\n * A constant that indicates whether the environment the code is running is in React-Native.\n * This check should come before Node.js detection since React Native may have a process polyfill.\n * https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js\n */\n const isReactNative = typeof navigator !== \"undefined\" && navigator?.product === \"ReactNative\";\n if (isReactNative) {\n return {\n type: \"react-native\",\n };\n }\n\n /**\n * A constant that indicates whether the environment the code is running is Node.JS.\n *\n * We assign `process` to a local variable first to avoid being flagged by\n * bundlers that perform static analysis on `process.versions` (e.g. Next.js\n * Edge Runtime warns about Node.js APIs even when they are guarded).\n */\n const _process = typeof process !== \"undefined\" ? process : undefined;\n const isNode = typeof _process !== \"undefined\" && typeof _process.versions?.node === \"string\";\n if (isNode) {\n return {\n type: \"node\",\n version: _process.versions.node,\n parsedVersion: Number(_process.versions.node.split(\".\")[0]),\n os: _process.platform,\n arch: _process.arch,\n };\n }\n\n return {\n type: \"unknown\",\n };\n}\n\n/**\n * Display names for the language runtimes whose version is meaningful to encode\n * in a User-Agent. Environments where a version string is not useful (e.g.\n * browsers, where `version` is the full navigator UA) are intentionally mapped\n * to `undefined` so they are omitted from the User-Agent.\n */\nconst RUNTIME_DISPLAY_NAMES: Record<Runtime[\"type\"], string | undefined> = {\n node: \"Node\",\n deno: \"Deno\",\n bun: \"Bun\",\n browser: undefined,\n \"web-worker\": undefined,\n \"react-native\": undefined,\n workerd: undefined,\n \"edge-runtime\": undefined,\n unknown: undefined,\n};\n\n/**\n * CPU architecture aliases that all refer to 64-bit x86. They are normalized to\n * the single canonical token `x86_64` so the User-Agent architecture label is\n * consistent regardless of which runtime reports it (Node reports `x64`, others\n * report `amd64` or `x86_64`).\n */\nconst X86_64_ARCH_ALIASES = new Set([\"x64\", \"amd64\", \"x86_64\"]);\n\n/**\n * Normalizes a CPU architecture token, collapsing the 64-bit x86 aliases\n * (`x64`, `amd64`, `x86_64`) to `x86_64`. Other architectures are returned\n * unchanged.\n */\nfunction normalizeArch(arch: string | undefined): string | undefined {\n if (arch == null) {\n return arch;\n }\n return X86_64_ARCH_ALIASES.has(arch.toLowerCase()) ? \"x86_64\" : arch;\n}\n\n/**\n * Percent-encodes the `@` and `/` characters in an npm package name so the\n * User-Agent product token stays within the RFC 7230 token grammar. The\n * original scoped package name can be recovered by URL-decoding (e.g.\n * `@dummy/sdk` becomes `%40dummy%2Fsdk`).\n */\nfunction encodeProductName(sdkName: string): string {\n return sdkName.replace(/@/g, \"%40\").replace(/\\//g, \"%2F\");\n}\n\n/**\n * Builds a structured User-Agent string of the form\n * `{sdkName}/{sdkVersion} ({os}; {arch}) {runtime}/{runtimeVersion}`\n * where the platform group and runtime segment are omitted gracefully when the\n * underlying values cannot be determined (e.g. in a browser).\n */\nexport function getUserAgent(sdkName: string, sdkVersion: string): string {\n let userAgent = `${encodeProductName(sdkName)}/${sdkVersion}`;\n\n const platform = [RUNTIME.os, normalizeArch(RUNTIME.arch)].filter(\n (part): part is string => part != null && part.length > 0,\n );\n if (platform.length > 0) {\n userAgent += ` (${platform.join(\"; \")})`;\n }\n\n const runtimeName = RUNTIME_DISPLAY_NAMES[RUNTIME.type];\n if (runtimeName != null) {\n userAgent += ` ${runtimeName}`;\n if (RUNTIME.version != null && RUNTIME.version.length > 0) {\n userAgent += `/${RUNTIME.version}`;\n }\n }\n\n return userAgent;\n}\n", "import { toMultipartDataPart, type Uploadable } from \"../../core/file/index.js\";\nimport { toJson } from \"../../core/json.js\";\nimport { RUNTIME } from \"../runtime/index.js\";\n\ninterface FormDataRequest<Body> {\n body: Body;\n headers: Record<string, string>;\n duplex?: \"half\";\n}\n\nexport async function newFormData(): Promise<FormDataWrapper> {\n return new FormDataWrapper();\n}\n\nexport class FormDataWrapper {\n private fd: FormData = new FormData();\n\n public async setup(): Promise<void> {\n // noop\n }\n\n public append(key: string, value: unknown): void {\n this.fd.append(key, String(value));\n }\n\n public async appendFile(key: string, value: Uploadable): Promise<void> {\n if (value == null) {\n throw new Error(\n `File upload for \"${key}\" received ${value === null ? \"null\" : \"undefined\"}. The generated code should not call appendFile with null/undefined \u2014 check that optional file fields are guarded before this call.`,\n );\n }\n const { data, filename, contentType } = await toMultipartDataPart(value);\n const blob = await convertToBlob(data, contentType);\n if (filename) {\n this.fd.append(key, blob, filename);\n } else {\n this.fd.append(key, blob);\n }\n }\n\n public getRequest(): FormDataRequest<FormData> {\n return {\n body: this.fd,\n headers: {},\n duplex: \"half\" as const,\n };\n }\n}\n\ntype StreamLike = {\n read?: () => unknown;\n pipe?: (dest: unknown) => unknown;\n} & unknown;\n\nfunction isStreamLike(value: unknown): value is StreamLike {\n return typeof value === \"object\" && value != null && (\"read\" in value || \"pipe\" in value);\n}\n\nfunction isReadableStream(value: unknown): value is ReadableStream {\n return typeof value === \"object\" && value != null && \"getReader\" in value;\n}\n\nfunction isBuffer(value: unknown): value is Buffer {\n return typeof Buffer !== \"undefined\" && Buffer.isBuffer && Buffer.isBuffer(value);\n}\n\nfunction isArrayBufferView(value: unknown): value is ArrayBufferView {\n return ArrayBuffer.isView(value);\n}\n\nasync function streamToBuffer(stream: unknown): Promise<Buffer> {\n if (RUNTIME.type === \"node\") {\n const { Readable } = await import(\"stream\");\n\n if (stream instanceof Readable) {\n const chunks: Buffer[] = [];\n for await (const chunk of stream) {\n chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));\n }\n return Buffer.concat(chunks);\n }\n }\n\n if (isReadableStream(stream)) {\n const reader = stream.getReader();\n const chunks: Uint8Array[] = [];\n\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n chunks.push(value);\n }\n } finally {\n reader.releaseLock();\n }\n\n const totalLength = chunks.reduce((sum, chunk) => sum + chunk.length, 0);\n const result = new Uint8Array(totalLength);\n let offset = 0;\n for (const chunk of chunks) {\n result.set(chunk, offset);\n offset += chunk.length;\n }\n\n return Buffer.from(result);\n }\n\n throw new Error(\n `Unsupported stream type: ${typeof stream}. Expected Node.js Readable stream or Web ReadableStream.`,\n );\n}\n\nasync function convertToBlob(value: unknown, contentType?: string): Promise<Blob> {\n if (isStreamLike(value) || isReadableStream(value)) {\n const buffer = await streamToBuffer(value);\n return new Blob([buffer as BlobPart], { type: contentType });\n }\n\n if (value instanceof Blob) {\n return value;\n }\n\n if (isBuffer(value)) {\n return new Blob([value as BlobPart], { type: contentType });\n }\n\n if (value instanceof ArrayBuffer) {\n return new Blob([value], { type: contentType });\n }\n\n if (isArrayBufferView(value)) {\n return new Blob([value as BlobPart], { type: contentType });\n }\n\n if (typeof value === \"string\") {\n return new Blob([value], { type: contentType });\n }\n\n if (typeof value === \"object\" && value !== null) {\n return new Blob([toJson(value)], { type: contentType ?? \"application/json\" });\n }\n\n return new Blob([String(value)], { type: contentType });\n}\n", "export * from \"./logger.js\";\n", "import type { HttpResponsePromise, RawResponse } from \"../fetcher/index.js\";\n\n/**\n * A page of results from a paginated API.\n *\n * @template T The type of the items in the page.\n * @template R The type of the API response.\n */\nexport class Page<T, R = unknown> implements AsyncIterable<T> {\n public data: T[];\n public rawResponse: RawResponse;\n public response: R;\n\n private _hasNextPage: (response: R) => boolean;\n private getItems: (response: R) => T[];\n private loadNextPage: (response: R) => HttpResponsePromise<R>;\n\n constructor({\n response,\n rawResponse,\n hasNextPage,\n getItems,\n loadPage,\n }: {\n response: R;\n rawResponse: RawResponse;\n hasNextPage: (response: R) => boolean;\n getItems: (response: R) => T[];\n loadPage: (response: R) => HttpResponsePromise<R>;\n }) {\n this.response = response;\n this.rawResponse = rawResponse;\n this.data = getItems(response);\n this._hasNextPage = hasNextPage;\n this.getItems = getItems;\n this.loadNextPage = loadPage;\n }\n\n /**\n * Retrieves the next page\n * @returns this\n */\n public async getNextPage(): Promise<this> {\n const { data, rawResponse } = await this.loadNextPage(this.response).withRawResponse();\n this.response = data;\n this.rawResponse = rawResponse;\n this.data = this.getItems(this.response);\n return this;\n }\n\n /**\n * @returns whether there is a next page to load\n */\n public hasNextPage(): boolean {\n return this._hasNextPage(this.response);\n }\n\n private async *iterMessages(): AsyncGenerator<T, void> {\n for (const item of this.data) {\n yield item;\n }\n\n while (this.hasNextPage()) {\n await this.getNextPage();\n for (const item of this.data) {\n yield item;\n }\n }\n }\n\n async *[Symbol.asyncIterator](): AsyncIterator<T, void, unknown> {\n for await (const message of this.iterMessages()) {\n yield message;\n }\n }\n}\n", "import { fromJson } from \"../json.js\";\nimport { RUNTIME } from \"../runtime/index.js\";\n\nexport declare namespace Stream {\n interface Args {\n /**\n * The HTTP response stream to read from.\n */\n\n stream: ReadableStream;\n\n /**\n * The event shape to use for parsing the stream data.\n */\n eventShape: JsonEvent | SseEvent;\n /**\n * An abort signal to stop the stream.\n */\n signal?: AbortSignal;\n /**\n * Whether transparent mid-stream reconnection is enabled on resumable\n * SSE endpoints. Defaults to true. Has no effect on non-resumable endpoints.\n */\n reconnectionEnabled?: boolean;\n /**\n * Maximum number of consecutive failed reconnect attempts on resumable SSE\n * endpoints before giving up. The counter resets to zero each time a\n * reconnected stream successfully yields at least one event (i.e. makes\n * progress). Has no effect on non-resumable endpoints.\n */\n maxReconnectionAttempts?: number;\n /**\n * A function that re-issues the HTTP request with the Last-Event-ID header\n * and returns the new response body stream. Required for reconnection to work.\n */\n\n reconnect?: (lastEventId: string) => Promise<ReadableStream>;\n }\n\n interface JsonEvent {\n type: \"json\";\n messageTerminator: string;\n }\n\n interface SseEvent {\n type: \"sse\";\n streamTerminator?: string;\n eventDiscriminator?: string;\n /** Event names whose union variant wraps the `data:` payload as `{ <eventDiscriminator>, data }`. */\n envelopeEvents?: string[];\n resumable?: boolean;\n }\n}\n\nexport interface ServerSentEvent<T> {\n data: T;\n id?: string;\n retry?: number;\n event?: string;\n}\n\nconst DATA_PREFIX = \"data:\";\nconst EVENT_PREFIX = \"event:\";\nconst ID_PREFIX = \"id:\";\nconst RETRY_PREFIX = \"retry:\";\n\nconst DEFAULT_MAX_RECONNECTION_ATTEMPTS = 5;\nconst DEFAULT_RECONNECT_DELAY_MS = 1_000;\nconst MAX_RECONNECT_DELAY_MS = 30_000;\n\nexport class Stream<T> implements AsyncIterable<T> {\n private stream: ReadableStream;\n\n private parse: (val: unknown) => Promise<T>;\n /**\n * The prefix to use for each message. For example,\n * for SSE, the prefix is \"data: \".\n */\n private prefix: string | undefined;\n private messageTerminator: string;\n private streamTerminator: string | undefined;\n private eventDiscriminator: string | undefined;\n private envelopeEvents: Set<string> | undefined;\n private resumable: boolean;\n private reconnectionEnabled: boolean;\n private maxReconnectionAttempts: number;\n\n private reconnect: ((lastEventId: string) => Promise<ReadableStream>) | undefined;\n\n private controller: AbortController = new AbortController();\n private decoder: TextDecoder | undefined;\n private externalSignal: AbortSignal | undefined;\n private onExternalAbort: (() => void) | undefined;\n\n constructor({\n stream,\n parse,\n eventShape,\n signal,\n reconnectionEnabled,\n maxReconnectionAttempts,\n reconnect,\n }: Stream.Args & { parse: (val: unknown) => Promise<T> }) {\n this.stream = stream;\n this.parse = parse;\n if (eventShape.type === \"sse\") {\n this.prefix = DATA_PREFIX;\n this.messageTerminator = \"\\n\";\n this.streamTerminator = eventShape.streamTerminator;\n this.eventDiscriminator = eventShape.eventDiscriminator;\n this.envelopeEvents = eventShape.envelopeEvents != null ? new Set(eventShape.envelopeEvents) : undefined;\n this.resumable = eventShape.resumable ?? false;\n } else {\n this.messageTerminator = eventShape.messageTerminator;\n this.resumable = false;\n }\n this.reconnectionEnabled = reconnectionEnabled ?? true;\n this.maxReconnectionAttempts = maxReconnectionAttempts ?? DEFAULT_MAX_RECONNECTION_ATTEMPTS;\n this.reconnect = reconnect;\n if (signal != null) {\n this.externalSignal = signal;\n this.onExternalAbort = () => this.controller.abort();\n signal.addEventListener(\"abort\", this.onExternalAbort, { once: true });\n }\n\n // Initialize shared TextDecoder\n if (typeof TextDecoder !== \"undefined\") {\n this.decoder = new TextDecoder(\"utf-8\");\n }\n }\n\n private async *iterMessages(): AsyncGenerator<ServerSentEvent<T>, void> {\n if (this.eventDiscriminator != null) {\n yield* this.iterSseEvents();\n } else {\n yield* this.iterDataMessages();\n }\n }\n\n private async *iterDataMessages(): AsyncGenerator<ServerSentEvent<T>, void> {\n let reconnectAttempts = 0;\n let currentStream = this.stream;\n let lastId: string | undefined;\n // The id of the most recently *dispatched* event. Per the WHATWG\n // EventSource spec, the \"last event ID\" is only committed when an event\n // is dispatched, not when the `id:` line is parsed. Reconnecting with a\n // parsed-but-undispatched id would skip an event that was never yielded\n // (e.g. if the connection drops after `id:` but before the event's\n // terminating blank line), so reconnection uses lastDispatchedId.\n let lastDispatchedId: string | undefined;\n let lastRetry: number | undefined;\n\n while (true) {\n const stream = readableStreamAsyncIterable<any>(currentStream);\n let buf = \"\";\n let dataValue: string | undefined;\n\n for await (const chunk of stream) {\n buf += this.decodeChunk(chunk);\n\n let terminatorIndex: number;\n while ((terminatorIndex = buf.indexOf(this.messageTerminator)) >= 0) {\n const line = buf.slice(0, terminatorIndex);\n buf = buf.slice(terminatorIndex + this.messageTerminator.length);\n\n if (!line.trim()) {\n if (this.prefix != null && dataValue != null) {\n if (this.streamTerminator != null && dataValue.includes(this.streamTerminator)) {\n return;\n }\n const data = await this.parse(fromJson(dataValue));\n yield { data, id: lastId, retry: lastRetry, event: undefined };\n lastDispatchedId = lastId;\n reconnectAttempts = 0;\n dataValue = undefined;\n }\n continue;\n }\n\n if (line.startsWith(ID_PREFIX)) {\n const idValue = line.slice(ID_PREFIX.length).trim();\n if (!idValue.includes(\"\\0\")) {\n lastId = idValue;\n }\n continue;\n }\n if (line.startsWith(RETRY_PREFIX)) {\n const retryValue = line.slice(RETRY_PREFIX.length).trim();\n const parsed = parseInt(retryValue, 10);\n if (!Number.isNaN(parsed) && String(parsed) === retryValue) {\n lastRetry = parsed;\n }\n continue;\n }\n\n if (this.prefix != null) {\n const prefixIndex = line.indexOf(this.prefix);\n if (prefixIndex === -1) {\n continue;\n }\n const val = line.slice(prefixIndex + this.prefix.length).trim();\n dataValue = dataValue != null ? `${dataValue}\\n${val}` : val;\n } else {\n if (this.streamTerminator != null && line.includes(this.streamTerminator)) {\n return;\n }\n const data = await this.parse(fromJson(line));\n yield { data, id: lastId, retry: lastRetry, event: undefined };\n lastDispatchedId = lastId;\n reconnectAttempts = 0;\n }\n }\n }\n\n if (this.prefix != null && dataValue != null) {\n if (this.streamTerminator != null && dataValue.includes(this.streamTerminator)) {\n return;\n }\n const data = await this.parse(fromJson(dataValue));\n yield { data, id: lastId, retry: lastRetry, event: undefined };\n lastDispatchedId = lastId;\n reconnectAttempts = 0;\n }\n\n if (!this.shouldReconnect(lastDispatchedId, reconnectAttempts)) {\n return;\n }\n\n reconnectAttempts++;\n await this.delayReconnect(lastRetry);\n if (this.controller.signal.aborted) {\n return;\n }\n // Re-check after async delay; needed for TypeScript narrowing.\n const reconnectFn = this.reconnect;\n if (reconnectFn == null || lastDispatchedId == null) {\n return;\n }\n try {\n const reconnected = await reconnectFn(lastDispatchedId);\n if (reconnected == null) {\n currentStream = this.createEmptyStream();\n continue;\n }\n currentStream = reconnected;\n } catch {\n // Failed reconnect (e.g. HTTP error); assign an empty stream\n // so the next iteration is a safe no-op before shouldReconnect.\n currentStream = this.createEmptyStream();\n }\n }\n }\n\n private async *iterSseEvents(): AsyncGenerator<ServerSentEvent<T>, void> {\n let reconnectAttempts = 0;\n let currentStream = this.stream;\n let lastId: string | undefined;\n // See iterDataMessages: reconnection uses the last *dispatched* id (per\n // the EventSource spec), not the last *parsed* id, to avoid skipping an\n // event that was never yielded when a drop lands mid-event.\n let lastDispatchedId: string | undefined;\n let lastRetry: number | undefined;\n\n while (true) {\n const stream = readableStreamAsyncIterable<any>(currentStream);\n let buf = \"\";\n let eventType: string | undefined;\n let dataValue: string | undefined;\n\n for await (const chunk of stream) {\n buf += this.decodeChunk(chunk);\n\n let terminatorIndex: number;\n while ((terminatorIndex = buf.indexOf(\"\\n\")) >= 0) {\n const line = buf.slice(0, terminatorIndex).replace(/\\r$/, \"\");\n buf = buf.slice(terminatorIndex + 1);\n\n if (!line.trim()) {\n if (dataValue != null) {\n const data = await this.dispatchSseEvent(dataValue, eventType);\n if (data == null) {\n return;\n }\n yield { data, id: lastId, retry: lastRetry, event: eventType };\n lastDispatchedId = lastId;\n reconnectAttempts = 0;\n }\n eventType = undefined;\n dataValue = undefined;\n continue;\n }\n\n if (line.startsWith(EVENT_PREFIX)) {\n eventType = line.slice(EVENT_PREFIX.length).trim();\n } else if (line.startsWith(DATA_PREFIX)) {\n const val = line.slice(DATA_PREFIX.length).trim();\n dataValue = dataValue != null ? `${dataValue}\\n${val}` : val;\n } else if (line.startsWith(ID_PREFIX)) {\n const idValue = line.slice(ID_PREFIX.length).trim();\n if (!idValue.includes(\"\\0\")) {\n lastId = idValue;\n }\n } else if (line.startsWith(RETRY_PREFIX)) {\n const retryValue = line.slice(RETRY_PREFIX.length).trim();\n const parsed = parseInt(retryValue, 10);\n if (!Number.isNaN(parsed) && String(parsed) === retryValue) {\n lastRetry = parsed;\n }\n }\n }\n }\n\n if (dataValue != null) {\n const data = await this.dispatchSseEvent(dataValue, eventType);\n if (data != null) {\n yield { data, id: lastId, retry: lastRetry, event: eventType };\n lastDispatchedId = lastId;\n reconnectAttempts = 0;\n }\n }\n\n if (!this.shouldReconnect(lastDispatchedId, reconnectAttempts)) {\n return;\n }\n\n reconnectAttempts++;\n await this.delayReconnect(lastRetry);\n if (this.controller.signal.aborted) {\n return;\n }\n // Re-check after async delay; needed for TypeScript narrowing.\n const reconnectFn = this.reconnect;\n if (reconnectFn == null || lastDispatchedId == null) {\n return;\n }\n try {\n const reconnected = await reconnectFn(lastDispatchedId);\n if (reconnected == null) {\n currentStream = this.createEmptyStream();\n continue;\n }\n currentStream = reconnected;\n } catch {\n // Failed reconnect (e.g. HTTP error); assign an empty stream\n // so the next iteration is a safe no-op before shouldReconnect.\n currentStream = this.createEmptyStream();\n }\n }\n }\n\n /**\n * Parses and returns a single SSE event, or returns null if the event is a stream terminator.\n */\n private async dispatchSseEvent(dataValue: string, eventType: string | undefined): Promise<T | null> {\n if (this.streamTerminator != null && dataValue.includes(this.streamTerminator)) {\n return null;\n }\n return this.parse(this.injectDiscriminator(fromJson(dataValue), eventType));\n }\n\n /**\n * Determines whether a reconnection attempt should be made.\n */\n private shouldReconnect(lastId: string | undefined, reconnectAttempts: number): boolean {\n if (!this.resumable) {\n return false;\n }\n if (this.streamTerminator == null) {\n // Without a terminator the client cannot distinguish a completed\n // stream from a dropped connection, so reconnection is disabled.\n return false;\n }\n // NOTE: When a terminator IS configured but the server never sends it\n // (e.g. it drops the connection after emitting events every time),\n // maxReconnectionAttempts is a per-consecutive-failure cap \u2014 each\n // yielded event resets the counter. This matches EventSource semantics\n // but means such a server can cause unbounded reconnections. Callers\n // concerned about this should impose a wall-clock budget externally.\n if (!this.reconnectionEnabled) {\n return false;\n }\n if (this.reconnect == null) {\n return false;\n }\n if (lastId == null || lastId === \"\") {\n return false;\n }\n if (reconnectAttempts >= this.maxReconnectionAttempts) {\n return false;\n }\n if (this.controller.signal.aborted) {\n return false;\n }\n return true;\n }\n\n /**\n * Delays before reconnecting, using a server-sent retry directive if provided\n * (clamped to MAX_RECONNECT_DELAY_MS), otherwise falling back to\n * DEFAULT_RECONNECT_DELAY_MS. The delay is abortable: if the stream's abort\n * signal fires during the wait, the promise resolves immediately.\n */\n private async delayReconnect(lastRetry: number | undefined): Promise<void> {\n const base = lastRetry != null && lastRetry > 0 ? lastRetry : DEFAULT_RECONNECT_DELAY_MS;\n const delay = Math.min(base, MAX_RECONNECT_DELAY_MS);\n const signal = this.controller.signal;\n if (signal.aborted) {\n return;\n }\n await new Promise<void>((resolve) => {\n const timer = setTimeout(() => {\n signal.removeEventListener(\"abort\", onAbort);\n resolve();\n }, delay);\n const onAbort = (): void => {\n clearTimeout(timer);\n resolve();\n };\n signal.addEventListener(\"abort\", onAbort, { once: true });\n });\n }\n\n private createEmptyStream(): ReadableStream {\n return new ReadableStream({\n start(controller) {\n controller.close();\n },\n });\n }\n\n private removeAbortListener(): void {\n if (this.externalSignal != null && this.onExternalAbort != null) {\n this.externalSignal.removeEventListener(\"abort\", this.onExternalAbort);\n this.onExternalAbort = undefined;\n }\n }\n\n public withMetadata(): AsyncIterable<ServerSentEvent<T>> {\n const self = this;\n return {\n async *[Symbol.asyncIterator]() {\n try {\n yield* self.iterMessages();\n } finally {\n self.removeAbortListener();\n }\n },\n };\n }\n\n private injectDiscriminator(parsed: unknown, eventType: string | undefined): unknown {\n if (this.eventDiscriminator == null || eventType == null) {\n return parsed;\n }\n if (this.envelopeEvents?.has(eventType)) {\n return { [this.eventDiscriminator]: eventType, data: parsed };\n }\n if (parsed == null || typeof parsed !== \"object\" || Array.isArray(parsed)) {\n return parsed;\n }\n const obj = parsed as Record<string, unknown>;\n if (this.eventDiscriminator in obj) {\n return parsed;\n }\n return { [this.eventDiscriminator]: eventType, ...obj };\n }\n\n async *[Symbol.asyncIterator](): AsyncIterator<T, void, unknown> {\n try {\n for await (const event of this.iterMessages()) {\n yield event.data;\n }\n } finally {\n this.removeAbortListener();\n }\n }\n\n private decodeChunk(chunk: any): string {\n let decoded = \"\";\n // If TextDecoder is available, use the streaming decoder instance\n if (this.decoder != null) {\n decoded += this.decoder.decode(chunk, { stream: true });\n }\n // Buffer is present in Node.js environment\n else if (RUNTIME.type === \"node\" && typeof chunk !== \"undefined\") {\n decoded += Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);\n }\n return decoded;\n }\n}\n\n/**\n * Browser polyfill for ReadableStream\n */\n// biome-ignore lint/suspicious/noExplicitAny: allow explicit any\nexport function readableStreamAsyncIterable<T>(stream: any): AsyncIterableIterator<T> {\n if (stream[Symbol.asyncIterator]) {\n return stream;\n }\n\n const reader = stream.getReader();\n return {\n async next() {\n try {\n const result = await reader.read();\n if (result?.done) {\n reader.releaseLock();\n } // release lock when stream becomes closed\n return result;\n } catch (e) {\n reader.releaseLock(); // release lock when stream becomes errored\n throw e;\n }\n },\n async return() {\n const cancelPromise = reader.cancel();\n reader.releaseLock();\n await cancelPromise;\n return { done: true, value: undefined };\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n };\n}\n", "export { encodePathParam } from \"./encodePathParam.js\";\nexport { join } from \"./join.js\";\nexport { queryBuilder } from \"./QueryStringBuilder.js\";\nexport { toQueryString } from \"./qs.js\";\n", "export function encodePathParam(\n param: unknown,\n InvalidPathParameterError?: new (args: { message: string }) => Error,\n): string {\n if (param === null) {\n return \"null\";\n }\n const typeofParam = typeof param;\n switch (typeofParam) {\n case \"undefined\":\n return \"undefined\";\n case \"string\":\n case \"number\":\n case \"boolean\":\n break;\n default:\n param = String(param);\n break;\n }\n const encoded = encodeURIComponent(param as string | number | boolean);\n // \".\" and \"..\" are dot segments: URL resolution would remove them and send the request to a different path.\n if (encoded === \".\" || encoded === \"..\") {\n const message = `Invalid path parameter \"${encoded}\": \".\" and \"..\" are not allowed because they change the request path.`;\n throw InvalidPathParameterError != null ? new InvalidPathParameterError({ message }) : new Error(message);\n }\n return encoded;\n}\n", "import { toQueryString } from \"./qs.js\";\n\n/**\n * Creates a fluent builder for constructing URL query strings.\n *\n * Each `.add()` call serializes its value immediately (like C#'s builder),\n * so no format tracking is needed \u2014 the style is applied at add-time.\n *\n * Usage (generated code):\n *\n * const qs = core.url.queryBuilder()\n * .add(\"limit\", limit)\n * .add(\"tags\", tags, { style: \"comma\" }) // explode: false\n * .mergeAdditional(requestOptions?.queryParams)\n * .build();\n */\nexport function queryBuilder(): QueryStringBuilder {\n return new QueryStringBuilder();\n}\n\nclass QueryStringBuilder {\n private parts: Map<string, string> = new Map();\n\n /**\n * Adds a query parameter, serializing it immediately.\n *\n * By default arrays use \"repeat\" format (`key=a&key=b`).\n * Pass `{ style: \"comma\" }` for OpenAPI `explode: false` parameters\n * to get comma-separated values (`key=a,b,c`).\n *\n * Null / undefined values are silently skipped.\n */\n add(key: string, value: unknown, options?: { style?: \"comma\" }): this {\n if (value === undefined || value === null) {\n return this;\n }\n const serialized = toQueryString(\n { [key]: value },\n { arrayFormat: options?.style === \"comma\" ? \"comma\" : \"repeat\" },\n );\n if (serialized.length > 0) {\n this.parts.set(key, serialized);\n }\n return this;\n }\n\n /**\n * Adds multiple query parameters at once from a record.\n * All parameters use the default \"repeat\" array format.\n * Null / undefined values are silently skipped.\n */\n addMany(params: Record<string, unknown>): this {\n if (params != null) {\n for (const [key, value] of Object.entries(params)) {\n this.add(key, value);\n }\n }\n return this;\n }\n\n /**\n * Merges additional query parameters supplied at call-time via\n * `requestOptions.queryParams`. Overrides existing keys (last-write-wins).\n */\n mergeAdditional(additionalParams?: Record<string, unknown>): this {\n if (additionalParams != null) {\n for (const [key, value] of Object.entries(additionalParams)) {\n if (value === undefined || value === null) {\n continue;\n }\n const serialized = toQueryString({ [key]: value }, { arrayFormat: \"repeat\" });\n if (serialized.length > 0) {\n this.parts.set(key, serialized);\n }\n }\n }\n return this;\n }\n\n /**\n * Returns the assembled query string (without the leading `?`).\n * Returns an empty string when no parameters were added.\n */\n build(): string {\n return [...this.parts.values()].join(\"&\");\n }\n}\n", "/**\n * Returns a copy of object with the value at path set. If a portion of path doesn\u2019t exist it\u2019s created.\n * Each object along path is shallow-copied, so the original object (and any nested objects it\n * shares with the copy) is never modified. This is inspired by Lodash's set function, but is\n * simplified to accommodate our use case. For more details, see https://lodash.com/docs/4.17.15#set.\n *\n * @param object The object to copy.\n * @param path The path of the property to set.\n * @param value The value to set.\n * @return Returns the updated copy of object.\n */\nexport function setObjectProperty<T extends object>(object: T, path: string, value: any): T {\n if (object == null) {\n return object;\n }\n\n const keys: string[] = path.split(\".\");\n if (keys.length === 0) {\n // Invalid path; do nothing.\n return object;\n }\n\n const result: Record<string, any> = { ...object };\n let current: Record<string, any> = result;\n for (let i = 0; i < keys.length - 1; i++) {\n const key = keys[i];\n if (key == null) {\n // Unreachable.\n continue;\n }\n const next = current[key];\n if (Array.isArray(next)) {\n current[key] = [...next];\n } else {\n current[key] = next != null && typeof next === \"object\" ? { ...next } : {};\n }\n current = current[key] as Record<string, any>;\n }\n\n const lastKey = keys[keys.length - 1];\n if (lastKey == null) {\n // Unreachable.\n return result as T;\n }\n\n current[lastKey] = value;\n return result as T;\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport * as core from \"../core/index.js\";\nimport * as errors from \"../errors/index.js\";\n\nconst TOKEN_PARAM = \"token\" as const;\n\nexport class BearerAuthProvider implements core.AuthProvider {\n private readonly options: BearerAuthProvider.Options;\n\n constructor(options: BearerAuthProvider.Options) {\n this.options = options;\n }\n\n public static canCreate(options: Partial<BearerAuthProvider.Options>): boolean {\n return options?.[TOKEN_PARAM] != null;\n }\n\n public async getAuthRequest({\n endpointMetadata,\n }: {\n endpointMetadata?: core.EndpointMetadata;\n } = {}): Promise<core.AuthRequest> {\n const token = await core.Supplier.get(this.options[TOKEN_PARAM]);\n if (token == null) {\n throw new errors.SmoothAgentApiError({\n message: BearerAuthProvider.AUTH_CONFIG_ERROR_MESSAGE,\n });\n }\n\n return {\n headers: { Authorization: `Bearer ${token}` },\n };\n }\n}\n\nexport namespace BearerAuthProvider {\n export const AUTH_SCHEME = \"ApiKeyAuth\" as const;\n export const AUTH_CONFIG_ERROR_MESSAGE: string =\n `Please provide '${TOKEN_PARAM}' when initializing the client` as const;\n export type Options = AuthOptions;\n export type AuthOptions = { [TOKEN_PARAM]: core.Supplier<core.BearerToken> };\n\n export function createInstance(options: Options): core.AuthProvider {\n return new BearerAuthProvider(options);\n }\n}\n", "export function mergeHeaders(...headersArray: (Record<string, unknown> | null | undefined)[]): Record<string, unknown> {\n const result: Record<string, unknown> = {};\n\n for (const [key, value] of headersArray\n .filter((headers) => headers != null)\n .flatMap((headers) => Object.entries(headers))) {\n const insensitiveKey = key.toLowerCase();\n if (value != null) {\n result[insensitiveKey] = value;\n } else if (insensitiveKey in result) {\n delete result[insensitiveKey];\n }\n }\n\n return result;\n}\n\nexport function mergeOnlyDefinedHeaders(\n ...headersArray: (Record<string, unknown> | null | undefined)[]\n): Record<string, unknown> {\n const result: Record<string, unknown> = {};\n\n for (const [key, value] of headersArray\n .filter((headers) => headers != null)\n .flatMap((headers) => Object.entries(headers))) {\n const insensitiveKey = key.toLowerCase();\n if (value != null) {\n result[insensitiveKey] = value;\n }\n }\n\n return result;\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport { BearerAuthProvider } from \"./auth/BearerAuthProvider.js\";\nimport { mergeHeaders } from \"./core/headers.js\";\nimport * as core from \"./core/index.js\";\nimport type * as environments from \"./environments.js\";\n\nexport type AuthOption =\n | false\n | core.AuthProvider[\"getAuthRequest\"]\n | core.AuthProvider\n | BearerAuthProvider.AuthOptions;\n\nexport type BaseClientOptions = {\n environment?: core.Supplier<environments.SmoothAgentApiEnvironment | string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n /** Additional headers to include in requests. */\n headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;\n /** The default maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The default number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** Provide a custom fetch implementation. Useful for platforms that don't have a built-in fetch or need a custom implementation. */\n fetch?: typeof fetch;\n /** Configure logging for the client. */\n logging?: core.logging.LogConfig | core.logging.Logger;\n /** Default options for SSE stream reconnection behavior. Has no effect on non-resumable endpoints. */\n stream?: { reconnectionEnabled?: boolean; maxReconnectionAttempts?: number };\n /** Override auth. Pass false to disable, a function returning auth headers, an AuthProvider, or auth options. */\n auth?: AuthOption;\n} & BearerAuthProvider.AuthOptions;\n\nexport interface BaseRequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** A dictionary containing additional parameters to spread into the request's body. */\n additionalBodyParameters?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;\n /** Options for SSE stream reconnection behavior. Has no effect on non-resumable endpoints. */\n stream?: { reconnectionEnabled?: boolean; maxReconnectionAttempts?: number };\n}\n\nexport type NormalizedClientOptions<T extends BaseClientOptions = BaseClientOptions> = T & {\n logging: core.logging.Logger;\n authProvider?: core.AuthProvider;\n};\n\nexport type NormalizedClientOptionsWithAuth<T extends BaseClientOptions = BaseClientOptions> =\n NormalizedClientOptions<T> & {\n authProvider: core.AuthProvider;\n };\n\nexport function normalizeClientOptions<T extends BaseClientOptions = BaseClientOptions>(\n options: T,\n): NormalizedClientOptions<T> {\n const headers = mergeHeaders(\n {\n \"X-Fern-Language\": \"JavaScript\",\n \"X-Fern-Runtime\": core.RUNTIME.type,\n \"X-Fern-Runtime-Version\": core.RUNTIME.version,\n },\n options?.headers,\n );\n\n return {\n ...options,\n logging: core.logging.createLogger(options?.logging),\n headers,\n } as NormalizedClientOptions<T>;\n}\n\nexport function normalizeClientOptionsWithAuth<T extends BaseClientOptions = BaseClientOptions>(\n options: T,\n): NormalizedClientOptionsWithAuth<T> {\n const normalized = normalizeClientOptions(options) as NormalizedClientOptionsWithAuth<T>;\n\n if (options.auth === false) {\n normalized.authProvider = new core.NoOpAuthProvider();\n return normalized;\n }\n if (options.auth != null) {\n if (typeof options.auth === \"function\") {\n normalized.authProvider = { getAuthRequest: options.auth };\n return normalized;\n }\n if (core.isAuthProvider(options.auth)) {\n normalized.authProvider = options.auth;\n return normalized;\n }\n Object.assign(normalized, options.auth);\n }\n\n const normalizedWithNoOpAuthProvider = withNoOpAuthProvider(normalized);\n normalized.authProvider ??= new BearerAuthProvider(normalizedWithNoOpAuthProvider);\n return normalized;\n}\n\nfunction withNoOpAuthProvider<T extends BaseClientOptions = BaseClientOptions>(\n options: NormalizedClientOptions<T>,\n): NormalizedClientOptionsWithAuth<T> {\n return {\n ...options,\n authProvider: new core.NoOpAuthProvider(),\n };\n}\n", "/**\n * Spreads caller-supplied `additionalBodyParameters` (from `requestOptions.additionalBodyParameters`)\n * on top of the request body. Caller-supplied properties win over the endpoint body. When no\n * additional body parameters are provided, the original body is returned unchanged so serialization\n * is unaffected.\n *\n * The merge only applies to plain-object (JSON object) bodies. When the body is `null`/`undefined`\n * the additional parameters become the body; when the body is an array or a primitive JSON value it\n * is returned unchanged, since object properties cannot be spread into it. This mirrors the Python\n * SDK, which only merges additional body parameters into mapping bodies.\n */\nexport function mergeAdditionalBodyParameters(\n body: unknown,\n additionalBodyParameters: Record<string, unknown> | undefined,\n): unknown {\n if (additionalBodyParameters == null) {\n return body;\n }\n if (body == null) {\n return { ...additionalBodyParameters };\n }\n if (typeof body === \"object\" && !Array.isArray(body)) {\n return { ...body, ...additionalBodyParameters };\n }\n return body;\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nexport const SmoothAgentApiEnvironment = {\n Default: \"https://smoothagent-v3-api.uaibuilder.workers.dev/v3\",\n} as const;\n\nexport type SmoothAgentApiEnvironment = typeof SmoothAgentApiEnvironment.Default;\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type * as core from \"../core/index.js\";\nimport * as errors from \"./index.js\";\n\nexport function handleNonStatusCodeError(\n error: core.Fetcher.Error,\n rawResponse: core.RawResponse,\n method: string,\n path: string,\n): never {\n switch (error.reason) {\n case \"non-json\":\n throw new errors.SmoothAgentApiError({\n statusCode: error.statusCode,\n body: error.rawBody,\n rawResponse: rawResponse,\n });\n case \"body-is-null\":\n throw new errors.SmoothAgentApiError({\n statusCode: error.statusCode,\n rawResponse: rawResponse,\n });\n case \"timeout\":\n throw new errors.SmoothAgentApiTimeoutError(`Timeout exceeded when calling ${method} ${path}.`, {\n cause: error.cause,\n });\n case \"unknown\":\n throw new errors.SmoothAgentApiError({\n message: error.errorMessage,\n rawResponse: rawResponse,\n cause: error.cause,\n });\n default:\n throw new errors.SmoothAgentApiError({\n message: \"Unknown error\",\n rawResponse: rawResponse,\n });\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type { BaseClientOptions, BaseRequestOptions } from \"../../../../BaseClient.js\";\nimport { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from \"../../../../BaseClient.js\";\nimport { mergeHeaders } from \"../../../../core/headers.js\";\nimport * as core from \"../../../../core/index.js\";\nimport { mergeAdditionalBodyParameters } from \"../../../../core/requestBody.js\";\nimport * as environments from \"../../../../environments.js\";\nimport { handleNonStatusCodeError } from \"../../../../errors/handleNonStatusCodeError.js\";\nimport * as errors from \"../../../../errors/index.js\";\nimport * as SmoothAgentApi from \"../../../index.js\";\n\nexport declare namespace AccountClient {\n export type Options = BaseClientOptions;\n\n export interface RequestOptions extends BaseRequestOptions {}\n}\n\nexport class AccountClient {\n protected readonly _options: NormalizedClientOptionsWithAuth<AccountClient.Options>;\n\n constructor(options: AccountClient.Options) {\n this._options = normalizeClientOptionsWithAuth(options);\n }\n\n /**\n * Renomear a organiza\u00E7\u00E3o: chave de CONTA, ou a sess\u00E3o do dashboard com papel owner/admin (o `member` leva 403\n * `{reason: \"role_forbidden\"}`). Chave de workspace/restrita = 403 `only_account_key`.\n *\n * @param {SmoothAgentApi.AccountUpdateRequest} request\n * @param {AccountClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.account.update({\n * name: \"name\"\n * })\n */\n public update(\n request: SmoothAgentApi.AccountUpdateRequest,\n requestOptions?: AccountClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.AccountUpdateResponse> {\n return core.HttpResponsePromise.fromPromise(this.__update(request, requestOptions));\n }\n\n private async __update(\n request: SmoothAgentApi.AccountUpdateRequest,\n requestOptions?: AccountClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.AccountUpdateResponse>> {\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n \"account\",\n ),\n method: \"PATCH\",\n headers: _headers,\n contentType: \"application/json\",\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n requestType: \"json\",\n body: mergeAdditionalBodyParameters(request, requestOptions?.additionalBodyParameters),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.AccountUpdateResponse, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"PATCH\", \"/account\");\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type { BaseClientOptions, BaseRequestOptions } from \"../../../../BaseClient.js\";\nimport { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from \"../../../../BaseClient.js\";\nimport { mergeHeaders, mergeOnlyDefinedHeaders } from \"../../../../core/headers.js\";\nimport * as core from \"../../../../core/index.js\";\nimport { mergeAdditionalBodyParameters } from \"../../../../core/requestBody.js\";\nimport * as environments from \"../../../../environments.js\";\nimport { handleNonStatusCodeError } from \"../../../../errors/handleNonStatusCodeError.js\";\nimport * as errors from \"../../../../errors/index.js\";\nimport * as SmoothAgentApi from \"../../../index.js\";\n\nexport declare namespace AgentsClient {\n export type Options = BaseClientOptions;\n\n export interface RequestOptions extends BaseRequestOptions {}\n}\n\nexport class AgentsClient {\n protected readonly _options: NormalizedClientOptionsWithAuth<AgentsClient.Options>;\n\n constructor(options: AgentsClient.Options) {\n this._options = normalizeClientOptionsWithAuth(options);\n }\n\n /**\n * Chave: todos do workspace (ou o recorte da chave restrita). Usu\u00E1rio: os que pode usar (`AgentPublic`).\n *\n * @param {SmoothAgentApi.AgentsListRequest} request\n * @param {AgentsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.agents.list()\n */\n public async list(\n request: SmoothAgentApi.AgentsListRequest = {},\n requestOptions?: AgentsClient.RequestOptions,\n ): Promise<core.Page<SmoothAgentApi.AgentsListResponse.Data.Item, SmoothAgentApi.AgentsListResponse>> {\n const list = core.HttpResponsePromise.interceptFunction(\n async (\n request: SmoothAgentApi.AgentsListRequest,\n ): Promise<core.WithRawResponse<SmoothAgentApi.AgentsListResponse>> => {\n const { limit, cursor, \"SmoothAgent-Workspace\": smoothAgentWorkspace } = request;\n const _queryParams: Record<string, unknown> = {\n limit,\n cursor,\n };\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-Workspace\": smoothAgentWorkspace }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n \"agents\",\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url\n .queryBuilder()\n .addMany(_queryParams)\n .add(\"limit\", _queryParams.limit, { style: \"comma\" })\n .add(\"cursor\", _queryParams.cursor, { style: \"comma\" })\n .mergeAdditional(requestOptions?.queryParams)\n .build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return {\n data: _response.body as SmoothAgentApi.AgentsListResponse,\n rawResponse: _response.rawResponse,\n };\n }\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/agents\");\n },\n );\n const dataWithRawResponse = await list(request).withRawResponse();\n return new core.Page<SmoothAgentApi.AgentsListResponse.Data.Item, SmoothAgentApi.AgentsListResponse>({\n response: dataWithRawResponse.data,\n rawResponse: dataWithRawResponse.rawResponse,\n hasNextPage: (response) =>\n response?.nextCursor != null &&\n !(typeof response?.nextCursor === \"string\" && response?.nextCursor === \"\"),\n getItems: (response) => response?.data ?? [],\n loadPage: (response) => {\n return list(core.setObjectProperty(request, \"cursor\", response?.nextCursor));\n },\n });\n }\n\n /**\n * @param {SmoothAgentApi.AgentConfig} request\n * @param {AgentsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.agents.create({\n * name: \"name\"\n * })\n */\n public create(\n request: SmoothAgentApi.AgentConfig,\n requestOptions?: AgentsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.Agent> {\n return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));\n }\n\n private async __create(\n request: SmoothAgentApi.AgentConfig,\n requestOptions?: AgentsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.Agent>> {\n const { \"SmoothAgent-Workspace\": smoothAgentWorkspace, \"Idempotency-Key\": idempotencyKey, ..._body } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n \"SmoothAgent-Workspace\": smoothAgentWorkspace,\n \"Idempotency-Key\": idempotencyKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n \"agents\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n requestType: \"json\",\n body: mergeAdditionalBodyParameters(_body, requestOptions?.additionalBodyParameters),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.Agent, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"POST\", \"/agents\");\n }\n\n /**\n * @param {SmoothAgentApi.AgentsGetRequest} request\n * @param {AgentsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.agents.get({\n * id: \"id\"\n * })\n */\n public get(\n request: SmoothAgentApi.AgentsGetRequest,\n requestOptions?: AgentsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.AgentsGetResponse> {\n return core.HttpResponsePromise.fromPromise(this.__get(request, requestOptions));\n }\n\n private async __get(\n request: SmoothAgentApi.AgentsGetRequest,\n requestOptions?: AgentsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.AgentsGetResponse>> {\n const { id } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `agents/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.AgentsGetResponse, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/agents/{id}\");\n }\n\n /**\n * @param {SmoothAgentApi.AgentsDeleteRequest} request\n * @param {AgentsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.agents.delete({\n * id: \"id\"\n * })\n */\n public delete(\n request: SmoothAgentApi.AgentsDeleteRequest,\n requestOptions?: AgentsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.Deleted> {\n return core.HttpResponsePromise.fromPromise(this.__delete(request, requestOptions));\n }\n\n private async __delete(\n request: SmoothAgentApi.AgentsDeleteRequest,\n requestOptions?: AgentsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.Deleted>> {\n const { id } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `agents/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.Deleted, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"DELETE\", \"/agents/{id}\");\n }\n\n /**\n * Merge-patch. Cada chat vivo do agente passa a usar a revis\u00E3o nova no PR\u00D3XIMO turno dele\n * (`config_changed`), sem esfriar a box. S\u00F3 mudar `box` (camadas/tamanho) pede box nova, recriada\n * quando ociosa. Nunca derruba run vivo nem toca chat de outro agente.\n *\n * @param {SmoothAgentApi.AgentConfigMergePatchUpdate} request\n * @param {AgentsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.agents.update({\n * id: \"id\"\n * })\n */\n public update(\n request: SmoothAgentApi.AgentConfigMergePatchUpdate,\n requestOptions?: AgentsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.Agent> {\n return core.HttpResponsePromise.fromPromise(this.__update(request, requestOptions));\n }\n\n private async __update(\n request: SmoothAgentApi.AgentConfigMergePatchUpdate,\n requestOptions?: AgentsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.Agent>> {\n const { id, \"If-Match\": ifMatch, ..._body } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"If-Match\": ifMatch }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `agents/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}`,\n ),\n method: \"PATCH\",\n headers: _headers,\n contentType: \"application/merge-patch+json\",\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n requestType: \"json\",\n body: mergeAdditionalBodyParameters(_body, requestOptions?.additionalBodyParameters),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.Agent, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"PATCH\", \"/agents/{id}\");\n }\n\n /**\n * Embed. SEM credencial = o lado p\u00FAblico (nome, tema, origens), pra p\u00E1gina de embed se desenhar e\n * conferir a origem. Com chave = tamb\u00E9m o c\u00F3digo pronto com a SDK do usu\u00E1rio (paridade v2 `embedCode`);\n * com `userId` (precisa de `tokens:write` e grant), j\u00E1 vem um token daquele usu\u00E1rio (dispositivo\n * `embed`, 30 d). Token de usu\u00E1rio = 403.\n *\n * @param {SmoothAgentApi.AgentsEmbedRequest} request\n * @param {AgentsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.agents.embed({\n * id: \"id\"\n * })\n */\n public embed(\n request: SmoothAgentApi.AgentsEmbedRequest,\n requestOptions?: AgentsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.AgentsEmbedResponse> {\n return core.HttpResponsePromise.fromPromise(this.__embed(request, requestOptions));\n }\n\n private async __embed(\n request: SmoothAgentApi.AgentsEmbedRequest,\n requestOptions?: AgentsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.AgentsEmbedResponse>> {\n const { id, userId } = request;\n const _queryParams: Record<string, unknown> = {\n userId,\n };\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `agents/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/embed`,\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url\n .queryBuilder()\n .addMany(_queryParams)\n .add(\"userId\", _queryParams.userId, { style: \"comma\" })\n .mergeAdditional(requestOptions?.queryParams)\n .build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.AgentsEmbedResponse, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/agents/{id}/embed\");\n }\n\n /**\n * Box nova pro agente: cada box com chat dele \u00E9 recriada quando OCIOSA (nunca no meio de um run).\n *\n * @param {SmoothAgentApi.AgentsRecycleRequest} request\n * @param {AgentsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.agents.recycle({\n * id: \"id\"\n * })\n */\n public recycle(\n request: SmoothAgentApi.AgentsRecycleRequest,\n requestOptions?: AgentsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.AgentsRecycleResponse> {\n return core.HttpResponsePromise.fromPromise(this.__recycle(request, requestOptions));\n }\n\n private async __recycle(\n request: SmoothAgentApi.AgentsRecycleRequest,\n requestOptions?: AgentsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.AgentsRecycleResponse>> {\n const { id, \"Idempotency-Key\": idempotencyKey } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"Idempotency-Key\": idempotencyKey }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `agents/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/recycle`,\n ),\n method: \"POST\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.AgentsRecycleResponse, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"POST\", \"/agents/{id}/recycle\");\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type { BaseClientOptions, BaseRequestOptions } from \"../../../../BaseClient.js\";\nimport { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from \"../../../../BaseClient.js\";\nimport { mergeHeaders, mergeOnlyDefinedHeaders } from \"../../../../core/headers.js\";\nimport * as core from \"../../../../core/index.js\";\nimport { mergeAdditionalBodyParameters } from \"../../../../core/requestBody.js\";\nimport * as environments from \"../../../../environments.js\";\nimport { handleNonStatusCodeError } from \"../../../../errors/handleNonStatusCodeError.js\";\nimport * as errors from \"../../../../errors/index.js\";\nimport * as SmoothAgentApi from \"../../../index.js\";\n\nexport declare namespace BillingClient {\n export type Options = BaseClientOptions;\n\n export interface RequestOptions extends BaseRequestOptions {}\n}\n\nexport class BillingClient {\n protected readonly _options: NormalizedClientOptionsWithAuth<BillingClient.Options>;\n\n constructor(options: BillingClient.Options) {\n this._options = normalizeClientOptionsWithAuth(options);\n }\n\n /**\n * O pre\u00E7o do workspace no m\u00EAs (`YYYY-MM`). Linha `infra: own` (m\u00E1quina local, Detona do cliente) n\u00E3o\n * entra. Chave com recorte de agentes precisa mandar `agentId`.\n *\n * @param {SmoothAgentApi.BillingGetRequest} request\n * @param {BillingClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.billing.get({\n * period: \"period\"\n * })\n */\n public get(\n request: SmoothAgentApi.BillingGetRequest,\n requestOptions?: BillingClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.BillingStatement> {\n return core.HttpResponsePromise.fromPromise(this.__get(request, requestOptions));\n }\n\n private async __get(\n request: SmoothAgentApi.BillingGetRequest,\n requestOptions?: BillingClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.BillingStatement>> {\n const { period, agentId, \"SmoothAgent-Workspace\": smoothAgentWorkspace } = request;\n const _queryParams: Record<string, unknown> = {\n period,\n agentId,\n };\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-Workspace\": smoothAgentWorkspace }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n \"billing\",\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url\n .queryBuilder()\n .addMany(_queryParams)\n .add(\"period\", _queryParams.period, { style: \"comma\" })\n .add(\"agentId\", _queryParams.agentId, { style: \"comma\" })\n .mergeAdditional(requestOptions?.queryParams)\n .build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.BillingStatement, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/billing\");\n }\n\n /**\n * O billing \u00E9 da CONTA: s\u00F3 chave de CONTA (de workspace/restrita = 403 `only_account_key`); pela sess\u00E3o do dashboard,\n * s\u00F3 owner/admin (member = 403 `role_forbidden`). Sem Stripe configurado: 500 `internal {reason: billing_not_configured}`\n * (nunca URL falsa).\n *\n * @param {SmoothAgentApi.BillingCheckoutRequest} request\n * @param {BillingClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.billing.checkout({\n * plan: \"plan\"\n * })\n */\n public checkout(\n request: SmoothAgentApi.BillingCheckoutRequest,\n requestOptions?: BillingClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.BillingCheckoutResponse> {\n return core.HttpResponsePromise.fromPromise(this.__checkout(request, requestOptions));\n }\n\n private async __checkout(\n request: SmoothAgentApi.BillingCheckoutRequest,\n requestOptions?: BillingClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.BillingCheckoutResponse>> {\n const { \"Idempotency-Key\": idempotencyKey, ..._body } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"Idempotency-Key\": idempotencyKey }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n \"billing/checkout\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n requestType: \"json\",\n body: mergeAdditionalBodyParameters(_body, requestOptions?.additionalBodyParameters),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return {\n data: _response.body as SmoothAgentApi.BillingCheckoutResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"POST\", \"/billing/checkout\");\n }\n\n /**\n * As mesmas regras do checkout (s\u00F3 chave de conta; member n\u00E3o).\n *\n * @param {SmoothAgentApi.BillingPortalRequest} request\n * @param {BillingClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.billing.portal()\n */\n public portal(\n request: SmoothAgentApi.BillingPortalRequest = {},\n requestOptions?: BillingClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.BillingPortalResponse> {\n return core.HttpResponsePromise.fromPromise(this.__portal(request, requestOptions));\n }\n\n private async __portal(\n request: SmoothAgentApi.BillingPortalRequest = {},\n requestOptions?: BillingClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.BillingPortalResponse>> {\n const { \"Idempotency-Key\": idempotencyKey, ..._body } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"Idempotency-Key\": idempotencyKey }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n \"billing/portal\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n requestType: \"json\",\n body: mergeAdditionalBodyParameters(_body, requestOptions?.additionalBodyParameters),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.BillingPortalResponse, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"POST\", \"/billing/portal\");\n }\n\n /**\n * @param {SmoothAgentApi.UsageGetRequest} request\n * @param {BillingClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.billing.usageGet({\n * from: \"2024-01-15T09:30:00Z\",\n * to: \"2024-01-15T09:30:00Z\"\n * })\n */\n public usageGet(\n request: SmoothAgentApi.UsageGetRequest,\n requestOptions?: BillingClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.UsageGetResponse> {\n return core.HttpResponsePromise.fromPromise(this.__usageGet(request, requestOptions));\n }\n\n private async __usageGet(\n request: SmoothAgentApi.UsageGetRequest,\n requestOptions?: BillingClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.UsageGetResponse>> {\n const { from: from_, to, groupBy, agentId, \"SmoothAgent-Workspace\": smoothAgentWorkspace } = request;\n const _queryParams: Record<string, unknown> = {\n from: from_,\n to,\n groupBy: groupBy != null ? groupBy : undefined,\n agentId,\n };\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-Workspace\": smoothAgentWorkspace }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n \"usage\",\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url\n .queryBuilder()\n .addMany(_queryParams)\n .add(\"from\", _queryParams.from, { style: \"comma\" })\n .add(\"to\", _queryParams.to, { style: \"comma\" })\n .add(\"groupBy\", _queryParams.groupBy, { style: \"comma\" })\n .add(\"agentId\", _queryParams.agentId, { style: \"comma\" })\n .mergeAdditional(requestOptions?.queryParams)\n .build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.UsageGetResponse, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/usage\");\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type { BaseClientOptions, BaseRequestOptions } from \"../../../../BaseClient.js\";\nimport { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from \"../../../../BaseClient.js\";\nimport { mergeHeaders, mergeOnlyDefinedHeaders } from \"../../../../core/headers.js\";\nimport * as core from \"../../../../core/index.js\";\nimport { mergeAdditionalBodyParameters } from \"../../../../core/requestBody.js\";\nimport * as environments from \"../../../../environments.js\";\nimport { handleNonStatusCodeError } from \"../../../../errors/handleNonStatusCodeError.js\";\nimport * as errors from \"../../../../errors/index.js\";\nimport * as SmoothAgentApi from \"../../../index.js\";\n\nexport declare namespace ChatsClient {\n export type Options = BaseClientOptions;\n\n export interface RequestOptions extends BaseRequestOptions {}\n}\n\nexport class ChatsClient {\n protected readonly _options: NormalizedClientOptionsWithAuth<ChatsClient.Options>;\n\n constructor(options: ChatsClient.Options) {\n this._options = normalizeClientOptionsWithAuth(options);\n }\n\n /**\n * Ordenada por `updatedAt` desc (a lateral). Usu\u00E1rio: s\u00F3 os dele em agentes que ainda pode usar.\n *\n * @param {SmoothAgentApi.ChatsListRequest} request\n * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.chats.list()\n */\n public async list(\n request: SmoothAgentApi.ChatsListRequest = {},\n requestOptions?: ChatsClient.RequestOptions,\n ): Promise<core.Page<SmoothAgentApi.Chat, SmoothAgentApi.ChatsListResponse>> {\n const list = core.HttpResponsePromise.interceptFunction(\n async (\n request: SmoothAgentApi.ChatsListRequest,\n ): Promise<core.WithRawResponse<SmoothAgentApi.ChatsListResponse>> => {\n const {\n limit,\n cursor,\n agentId,\n userId,\n state,\n \"SmoothAgent-Workspace\": smoothAgentWorkspace,\n \"SmoothAgent-As-User\": smoothAgentAsUser,\n } = request;\n const _queryParams: Record<string, unknown> = {\n limit,\n cursor,\n agentId,\n userId,\n state,\n };\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n \"SmoothAgent-Workspace\": smoothAgentWorkspace,\n \"SmoothAgent-As-User\": smoothAgentAsUser,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n \"chats\",\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url\n .queryBuilder()\n .addMany(_queryParams)\n .add(\"limit\", _queryParams.limit, { style: \"comma\" })\n .add(\"cursor\", _queryParams.cursor, { style: \"comma\" })\n .add(\"agentId\", _queryParams.agentId, { style: \"comma\" })\n .add(\"userId\", _queryParams.userId, { style: \"comma\" })\n .add(\"state\", _queryParams.state, { style: \"comma\" })\n .mergeAdditional(requestOptions?.queryParams)\n .build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return {\n data: _response.body as SmoothAgentApi.ChatsListResponse,\n rawResponse: _response.rawResponse,\n };\n }\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/chats\");\n },\n );\n const dataWithRawResponse = await list(request).withRawResponse();\n return new core.Page<SmoothAgentApi.Chat, SmoothAgentApi.ChatsListResponse>({\n response: dataWithRawResponse.data,\n rawResponse: dataWithRawResponse.rawResponse,\n hasNextPage: (response) =>\n response?.nextCursor != null &&\n !(typeof response?.nextCursor === \"string\" && response?.nextCursor === \"\"),\n getItems: (response) => response?.data ?? [],\n loadPage: (response) => {\n return list(core.setObjectProperty(request, \"cursor\", response?.nextCursor));\n },\n });\n }\n\n /**\n * @param {SmoothAgentApi.CreateChat} request\n * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.chats.create({\n * agentId: \"agentId\"\n * })\n */\n public create(\n request: SmoothAgentApi.CreateChat,\n requestOptions?: ChatsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.Chat> {\n return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));\n }\n\n private async __create(\n request: SmoothAgentApi.CreateChat,\n requestOptions?: ChatsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.Chat>> {\n const {\n \"SmoothAgent-Workspace\": smoothAgentWorkspace,\n \"SmoothAgent-As-User\": smoothAgentAsUser,\n \"Idempotency-Key\": idempotencyKey,\n ..._body\n } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n \"SmoothAgent-Workspace\": smoothAgentWorkspace,\n \"SmoothAgent-As-User\": smoothAgentAsUser,\n \"Idempotency-Key\": idempotencyKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n \"chats\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n requestType: \"json\",\n body: mergeAdditionalBodyParameters(_body, requestOptions?.additionalBodyParameters),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.Chat, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"POST\", \"/chats\");\n }\n\n /**\n * @param {SmoothAgentApi.ChatsGetRequest} request\n * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.chats.get({\n * id: \"id\"\n * })\n */\n public get(\n request: SmoothAgentApi.ChatsGetRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.Chat> {\n return core.HttpResponsePromise.fromPromise(this.__get(request, requestOptions));\n }\n\n private async __get(\n request: SmoothAgentApi.ChatsGetRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.Chat>> {\n const { id, \"SmoothAgent-As-User\": smoothAgentAsUser } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `chats/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.Chat, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/chats/{id}\");\n }\n\n /**\n * Apaga o chat, o log e a box pr\u00F3pria (a inst\u00E2ncia s\u00F3 \u00E9 destru\u00EDda aqui).O chat some NA HORA (404 em toda rota, inclusive o `/live`; o socket aberto recebe `bye`). A limpeza da box pr\u00F3pria\n * (Detona) segue em segundo plano \u2014 `cleanup: pending` \u2014 e um cron repete at\u00E9 destruir (com teto e alerta).\n *\n * @param {SmoothAgentApi.ChatsDeleteRequest} request\n * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.chats.delete({\n * id: \"id\"\n * })\n */\n public delete(\n request: SmoothAgentApi.ChatsDeleteRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.ChatDeleted> {\n return core.HttpResponsePromise.fromPromise(this.__delete(request, requestOptions));\n }\n\n private async __delete(\n request: SmoothAgentApi.ChatsDeleteRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.ChatDeleted>> {\n const { id, \"SmoothAgent-As-User\": smoothAgentAsUser } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `chats/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.ChatDeleted, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"DELETE\", \"/chats/{id}\");\n }\n\n /**\n * @param {SmoothAgentApi.ChatsUpdateRequest} request\n * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.chats.update({\n * id: \"id\"\n * })\n */\n public update(\n request: SmoothAgentApi.ChatsUpdateRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.Chat> {\n return core.HttpResponsePromise.fromPromise(this.__update(request, requestOptions));\n }\n\n private async __update(\n request: SmoothAgentApi.ChatsUpdateRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.Chat>> {\n const { id, \"SmoothAgent-As-User\": smoothAgentAsUser, ..._body } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `chats/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}`,\n ),\n method: \"PATCH\",\n headers: _headers,\n contentType: \"application/json\",\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n requestType: \"json\",\n body: mergeAdditionalBodyParameters(_body, requestOptions?.additionalBodyParameters),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.Chat, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"PATCH\", \"/chats/{id}\");\n }\n\n /**\n * `forbidden {reason:'grant'}` sem acesso ao agente novo; `provider_not_connected` se o\n * modelo/provedor novo n\u00E3o tem credencial; `invalid_request {param:'model'|'effort'}` fora das\n * op\u00E7\u00F5es. O grant \u00E9 rechecado na hora de efetivar (troca agendada + grant revogado =\n * `agent.switch_failed`).\n *\n * @param {SmoothAgentApi.SwitchAgent} request\n * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.chats.switchAgent({\n * id: \"id\",\n * agentId: \"agentId\"\n * })\n */\n public switchAgent(\n request: SmoothAgentApi.SwitchAgent,\n requestOptions?: ChatsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.SwitchResult> {\n return core.HttpResponsePromise.fromPromise(this.__switchAgent(request, requestOptions));\n }\n\n private async __switchAgent(\n request: SmoothAgentApi.SwitchAgent,\n requestOptions?: ChatsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.SwitchResult>> {\n const { id, \"SmoothAgent-As-User\": smoothAgentAsUser, \"Idempotency-Key\": idempotencyKey, ..._body } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser, \"Idempotency-Key\": idempotencyKey }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `chats/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/agent`,\n ),\n method: \"PUT\",\n headers: _headers,\n contentType: \"application/json\",\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n requestType: \"json\",\n body: mergeAdditionalBodyParameters(_body, requestOptions?.additionalBodyParameters),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.SwitchResult, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"PUT\", \"/chats/{id}/agent\");\n }\n\n /**\n * Cancela a troca pendente: vira uma troca pro agente ATUAL, que a fila trata como \"limpa a pendente, n\u00E3o\n * aplica nada\" (sem `agent.switched`, sem handoff). Sem pendente = nada muda. `ref` opcional =\n * idempot\u00EAncia (vira o `switchId`).\n *\n * @param {SmoothAgentApi.CancelSwitchChatsRequest} request\n * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.chats.cancelSwitch({\n * id: \"id\"\n * })\n */\n public cancelSwitch(\n request: SmoothAgentApi.CancelSwitchChatsRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.Chat> {\n return core.HttpResponsePromise.fromPromise(this.__cancelSwitch(request, requestOptions));\n }\n\n private async __cancelSwitch(\n request: SmoothAgentApi.CancelSwitchChatsRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.Chat>> {\n const { id, ref, \"SmoothAgent-As-User\": smoothAgentAsUser } = request;\n const _queryParams: Record<string, unknown> = {\n ref,\n };\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `chats/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/agent/scheduled`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryString: core.url\n .queryBuilder()\n .addMany(_queryParams)\n .add(\"ref\", _queryParams.ref, { style: \"comma\" })\n .mergeAdditional(requestOptions?.queryParams)\n .build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.Chat, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(\n _response.error,\n _response.rawResponse,\n \"DELETE\",\n \"/chats/{id}/agent/scheduled\",\n );\n }\n\n /**\n * @param {SmoothAgentApi.GetContextChatsRequest} request\n * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.chats.getContext({\n * id: \"id\"\n * })\n */\n public getContext(\n request: SmoothAgentApi.GetContextChatsRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.ChatContext> {\n return core.HttpResponsePromise.fromPromise(this.__getContext(request, requestOptions));\n }\n\n private async __getContext(\n request: SmoothAgentApi.GetContextChatsRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.ChatContext>> {\n const { id, \"SmoothAgent-As-User\": smoothAgentAsUser } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `chats/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/context`,\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.ChatContext, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/chats/{id}/context\");\n }\n\n /**\n * SSE s\u00F3-leitura (`after` = cursor). O WebSocket (com comandos) \u00E9 `/live`, do `realtime`.\n */\n public events(\n request: SmoothAgentApi.ChatsEventsRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): core.HttpResponsePromise<core.Stream<SmoothAgentApi.EventsEvent>> {\n return core.HttpResponsePromise.fromPromise(this.__events(request, requestOptions));\n }\n\n private async __events(\n request: SmoothAgentApi.ChatsEventsRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): Promise<core.WithRawResponse<core.Stream<SmoothAgentApi.EventsEvent>>> {\n const { id, after, \"SmoothAgent-As-User\": smoothAgentAsUser, accept } = request;\n const _queryParams: Record<string, unknown> = {\n after,\n };\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser, accept: accept }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher<ReadableStream>({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `chats/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/events`,\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url\n .queryBuilder()\n .addMany(_queryParams)\n .add(\"after\", _queryParams.after, { style: \"comma\" })\n .mergeAdditional(requestOptions?.queryParams)\n .build(),\n responseType: \"sse\",\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return {\n data: new core.Stream({\n stream: _response.body,\n parse: (data) => data as any,\n signal: requestOptions?.abortSignal,\n eventShape: {\n type: \"sse\",\n },\n }),\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/chats/{id}/events\");\n }\n\n /**\n * O buraco em JSON: eventos `(after, until]`.\n *\n * @param {SmoothAgentApi.EventsRangeChatsRequest} request\n * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.chats.eventsRange({\n * id: \"id\",\n * after: 1000000\n * })\n */\n public eventsRange(\n request: SmoothAgentApi.EventsRangeChatsRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.EventRange> {\n return core.HttpResponsePromise.fromPromise(this.__eventsRange(request, requestOptions));\n }\n\n private async __eventsRange(\n request: SmoothAgentApi.EventsRangeChatsRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.EventRange>> {\n const { id, after, until, limit, \"SmoothAgent-As-User\": smoothAgentAsUser } = request;\n const _queryParams: Record<string, unknown> = {\n after,\n until,\n limit,\n };\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `chats/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/events/range`,\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url\n .queryBuilder()\n .addMany(_queryParams)\n .add(\"after\", _queryParams.after, { style: \"comma\" })\n .add(\"until\", _queryParams.until, { style: \"comma\" })\n .add(\"limit\", _queryParams.limit, { style: \"comma\" })\n .mergeAdditional(requestOptions?.queryParams)\n .build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.EventRange, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/chats/{id}/events/range\");\n }\n\n /**\n * `path` relativo ao diret\u00F3rio de trabalho do chat (sem `..`); ausente = a raiz.\n *\n * @param {SmoothAgentApi.ChatBoxListFilesRequest} request\n * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.chats.chatBoxListFiles({\n * id: \"id\"\n * })\n */\n public chatBoxListFiles(\n request: SmoothAgentApi.ChatBoxListFilesRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.BoxFileList> {\n return core.HttpResponsePromise.fromPromise(this.__chatBoxListFiles(request, requestOptions));\n }\n\n private async __chatBoxListFiles(\n request: SmoothAgentApi.ChatBoxListFilesRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.BoxFileList>> {\n const { id, path, \"SmoothAgent-As-User\": smoothAgentAsUser } = request;\n const _queryParams: Record<string, unknown> = {\n path,\n };\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `chats/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/files`,\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url\n .queryBuilder()\n .addMany(_queryParams)\n .add(\"path\", _queryParams.path, { style: \"comma\" })\n .mergeAdditional(requestOptions?.queryParams)\n .build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.BoxFileList, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/chats/{id}/files\");\n }\n\n /**\n * @param {SmoothAgentApi.ChatBoxReadFileRequest} request\n * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.chats.chatBoxReadFile({\n * id: \"id\",\n * path: \"path\"\n * })\n */\n public chatBoxReadFile(\n request: SmoothAgentApi.ChatBoxReadFileRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.BoxFileContent> {\n return core.HttpResponsePromise.fromPromise(this.__chatBoxReadFile(request, requestOptions));\n }\n\n private async __chatBoxReadFile(\n request: SmoothAgentApi.ChatBoxReadFileRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.BoxFileContent>> {\n const { id, path, \"SmoothAgent-As-User\": smoothAgentAsUser } = request;\n const _queryParams: Record<string, unknown> = {\n path,\n };\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `chats/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/files/content`,\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url\n .queryBuilder()\n .addMany(_queryParams)\n .add(\"path\", _queryParams.path, { style: \"comma\" })\n .mergeAdditional(requestOptions?.queryParams)\n .build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.BoxFileContent, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/chats/{id}/files/content\");\n }\n\n /**\n * Hist\u00F3rico paginado por itens fechados. Cursores = n\u00FAmero do evento:\n * `before=N` (rolar pra cima), `after=N` (pra baixo / tapar buraco), `around=<msg_\u2026|N>`\n * (abrir numa mensagem, metade pra cada lado), `anchor=end` (pular pro fim). `limit` 1\u2013200,\n * padr\u00E3o 50. Mais de um \u00E2ncora = `invalid_request`.\n *\n * @param {SmoothAgentApi.ChatsHistoryRequest} request\n * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.chats.history({\n * id: \"id\"\n * })\n */\n public history(\n request: SmoothAgentApi.ChatsHistoryRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.HistoryPage> {\n return core.HttpResponsePromise.fromPromise(this.__history(request, requestOptions));\n }\n\n private async __history(\n request: SmoothAgentApi.ChatsHistoryRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.HistoryPage>> {\n const { id, before, after, around, anchor, limit, \"SmoothAgent-As-User\": smoothAgentAsUser } = request;\n const _queryParams: Record<string, unknown> = {\n before,\n after,\n around,\n anchor: anchor != null ? anchor : undefined,\n limit,\n };\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `chats/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/history`,\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url\n .queryBuilder()\n .addMany(_queryParams)\n .add(\"before\", _queryParams.before, { style: \"comma\" })\n .add(\"after\", _queryParams.after, { style: \"comma\" })\n .add(\"around\", _queryParams.around, { style: \"comma\" })\n .add(\"anchor\", _queryParams.anchor, { style: \"comma\" })\n .add(\"limit\", _queryParams.limit, { style: \"comma\" })\n .mergeAdditional(requestOptions?.queryParams)\n .build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.HistoryPage, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/chats/{id}/history\");\n }\n\n /**\n * Janelas de uso da CREDENCIAL QUE RODA ESTE CHAT (a do agente ou a do usu\u00E1rio \u2014 a tela n\u00E3o\n * precisa saber qual). Mesmo formato de `/me/providers/{p}/limits`.\n *\n * @param {SmoothAgentApi.ChatsLimitsRequest} request\n * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.chats.limits({\n * id: \"id\"\n * })\n */\n public limits(\n request: SmoothAgentApi.ChatsLimitsRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.ProviderLimits> {\n return core.HttpResponsePromise.fromPromise(this.__limits(request, requestOptions));\n }\n\n private async __limits(\n request: SmoothAgentApi.ChatsLimitsRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.ProviderLimits>> {\n const { id, \"SmoothAgent-As-User\": smoothAgentAsUser } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `chats/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/limits`,\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.ProviderLimits, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/chats/{id}/limits\");\n }\n\n /**\n * @param {SmoothAgentApi.SendMessage} request\n * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.chats.send({\n * id: \"id\",\n * content: \"content\"\n * })\n */\n public send(\n request: SmoothAgentApi.SendMessage,\n requestOptions?: ChatsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.ChatsSendResponse> {\n return core.HttpResponsePromise.fromPromise(this.__send(request, requestOptions));\n }\n\n private async __send(\n request: SmoothAgentApi.SendMessage,\n requestOptions?: ChatsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.ChatsSendResponse>> {\n const { id, \"SmoothAgent-As-User\": smoothAgentAsUser, \"Idempotency-Key\": idempotencyKey, ..._body } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser, \"Idempotency-Key\": idempotencyKey }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `chats/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/messages`,\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n requestType: \"json\",\n body: mergeAdditionalBodyParameters(_body, requestOptions?.additionalBodyParameters),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.ChatsSendResponse, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"POST\", \"/chats/{id}/messages\");\n }\n\n /**\n * Chat num computador (m\u00E1quina `local`) desligado = 409 `machine_offline`, qualquer `whenOffline`: nada fica pendente em sil\u00EAncio.\n *\n * @param {SmoothAgentApi.ChatsMessageRequest} request\n * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.chats.message({\n * id: \"id\",\n * messageId: \"messageId\"\n * })\n */\n public message(\n request: SmoothAgentApi.ChatsMessageRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.MessageReceipt> {\n return core.HttpResponsePromise.fromPromise(this.__message(request, requestOptions));\n }\n\n private async __message(\n request: SmoothAgentApi.ChatsMessageRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.MessageReceipt>> {\n const { id, messageId, \"SmoothAgent-As-User\": smoothAgentAsUser } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `chats/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/messages/${core.url.encodePathParam(messageId, errors.SmoothAgentApiError)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.MessageReceipt, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(\n _response.error,\n _response.rawResponse,\n \"GET\",\n \"/chats/{id}/messages/{messageId}\",\n );\n }\n\n /**\n * Reenvia uma mensagem que voltou `notDelivered` (mesmo `messageId`; repetir \u00E9 inofensivo).\n *\n * @param {SmoothAgentApi.ChatsResendRequest} request\n * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.chats.resend({\n * id: \"id\",\n * messageId: \"messageId\"\n * })\n */\n public resend(\n request: SmoothAgentApi.ChatsResendRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.ChatsResendResponse> {\n return core.HttpResponsePromise.fromPromise(this.__resend(request, requestOptions));\n }\n\n private async __resend(\n request: SmoothAgentApi.ChatsResendRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.ChatsResendResponse>> {\n const { id, messageId, \"SmoothAgent-As-User\": smoothAgentAsUser, \"Idempotency-Key\": idempotencyKey } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser, \"Idempotency-Key\": idempotencyKey }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `chats/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/messages/${core.url.encodePathParam(messageId, errors.SmoothAgentApiError)}/resend`,\n ),\n method: \"POST\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.ChatsResendResponse, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(\n _response.error,\n _response.rawResponse,\n \"POST\",\n \"/chats/{id}/messages/{messageId}/resend\",\n );\n }\n\n /**\n * Pendentes, fila, notDelivered, STOP pendente, troca agendada \u2014 e a `version`.\n *\n * @param {SmoothAgentApi.ChatsQueueRequest} request\n * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.chats.queue({\n * id: \"id\"\n * })\n */\n public queue(\n request: SmoothAgentApi.ChatsQueueRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.EventsInboxState> {\n return core.HttpResponsePromise.fromPromise(this.__queue(request, requestOptions));\n }\n\n private async __queue(\n request: SmoothAgentApi.ChatsQueueRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.EventsInboxState>> {\n const { id, \"SmoothAgent-As-User\": smoothAgentAsUser } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `chats/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/queue`,\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.EventsInboxState, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/chats/{id}/queue\");\n }\n\n /**\n * @param {SmoothAgentApi.ReorderQueueChatsRequest} request\n * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.chats.reorderQueue({\n * id: \"id\",\n * baseVersion: 1,\n * order: [\"order\"]\n * })\n */\n public reorderQueue(\n request: SmoothAgentApi.ReorderQueueChatsRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.QueueResult> {\n return core.HttpResponsePromise.fromPromise(this.__reorderQueue(request, requestOptions));\n }\n\n private async __reorderQueue(\n request: SmoothAgentApi.ReorderQueueChatsRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.QueueResult>> {\n const { id, \"SmoothAgent-As-User\": smoothAgentAsUser, \"Idempotency-Key\": idempotencyKey, ..._body } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser, \"Idempotency-Key\": idempotencyKey }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `chats/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/queue/order`,\n ),\n method: \"PUT\",\n headers: _headers,\n contentType: \"application/json\",\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n requestType: \"json\",\n body: mergeAdditionalBodyParameters(_body, requestOptions?.additionalBodyParameters),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.QueueResult, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"PUT\", \"/chats/{id}/queue/order\");\n }\n\n /**\n * @param {SmoothAgentApi.RemoveQueuedChatsRequest} request\n * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.chats.removeQueued({\n * id: \"id\",\n * messageId: \"messageId\",\n * baseVersion: 1\n * })\n */\n public removeQueued(\n request: SmoothAgentApi.RemoveQueuedChatsRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.QueueResult> {\n return core.HttpResponsePromise.fromPromise(this.__removeQueued(request, requestOptions));\n }\n\n private async __removeQueued(\n request: SmoothAgentApi.RemoveQueuedChatsRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.QueueResult>> {\n const { id, messageId, baseVersion, \"SmoothAgent-As-User\": smoothAgentAsUser } = request;\n const _queryParams: Record<string, unknown> = {\n baseVersion,\n };\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `chats/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/queue/${core.url.encodePathParam(messageId, errors.SmoothAgentApiError)}`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryString: core.url\n .queryBuilder()\n .addMany(_queryParams)\n .add(\"baseVersion\", _queryParams.baseVersion, { style: \"comma\" })\n .mergeAdditional(requestOptions?.queryParams)\n .build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.QueueResult, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(\n _response.error,\n _response.rawResponse,\n \"DELETE\",\n \"/chats/{id}/queue/{messageId}\",\n );\n }\n\n /**\n * @param {SmoothAgentApi.EditQueuedChatsRequest} request\n * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.chats.editQueued({\n * id: \"id\",\n * messageId: \"messageId\",\n * baseVersion: 1,\n * content: \"content\"\n * })\n */\n public editQueued(\n request: SmoothAgentApi.EditQueuedChatsRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.QueueResult> {\n return core.HttpResponsePromise.fromPromise(this.__editQueued(request, requestOptions));\n }\n\n private async __editQueued(\n request: SmoothAgentApi.EditQueuedChatsRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.QueueResult>> {\n const { id, messageId, \"SmoothAgent-As-User\": smoothAgentAsUser, ..._body } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `chats/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/queue/${core.url.encodePathParam(messageId, errors.SmoothAgentApiError)}`,\n ),\n method: \"PATCH\",\n headers: _headers,\n contentType: \"application/json\",\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n requestType: \"json\",\n body: mergeAdditionalBodyParameters(_body, requestOptions?.additionalBodyParameters),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.QueueResult, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(\n _response.error,\n _response.rawResponse,\n \"PATCH\",\n \"/chats/{id}/queue/{messageId}\",\n );\n }\n\n /**\n * Promove a steer (ou come\u00E7a, se o agente parou).\n *\n * @param {SmoothAgentApi.SendNowChatsRequest} request\n * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.chats.sendNow({\n * id: \"id\",\n * messageId: \"messageId\",\n * baseVersion: 1\n * })\n */\n public sendNow(\n request: SmoothAgentApi.SendNowChatsRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.QueueResult> {\n return core.HttpResponsePromise.fromPromise(this.__sendNow(request, requestOptions));\n }\n\n private async __sendNow(\n request: SmoothAgentApi.SendNowChatsRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.QueueResult>> {\n const {\n id,\n messageId,\n \"SmoothAgent-As-User\": smoothAgentAsUser,\n \"Idempotency-Key\": idempotencyKey,\n ..._body\n } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser, \"Idempotency-Key\": idempotencyKey }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `chats/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/queue/${core.url.encodePathParam(messageId, errors.SmoothAgentApiError)}/send-now`,\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n requestType: \"json\",\n body: mergeAdditionalBodyParameters(_body, requestOptions?.additionalBodyParameters),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.QueueResult, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(\n _response.error,\n _response.rawResponse,\n \"POST\",\n \"/chats/{id}/queue/{messageId}/send-now\",\n );\n }\n\n /**\n * Sess\u00E3o nova do provedor (o recycle do chat); `clearHistory` tamb\u00E9m esconde o hist\u00F3rico at\u00E9 aqui.\n *\n * @param {SmoothAgentApi.ChatsResetRequest} request\n * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.chats.reset({\n * id: \"id\"\n * })\n */\n public reset(\n request: SmoothAgentApi.ChatsResetRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.Chat> {\n return core.HttpResponsePromise.fromPromise(this.__reset(request, requestOptions));\n }\n\n private async __reset(\n request: SmoothAgentApi.ChatsResetRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.Chat>> {\n const { id, \"SmoothAgent-As-User\": smoothAgentAsUser, \"Idempotency-Key\": idempotencyKey, ..._body } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser, \"Idempotency-Key\": idempotencyKey }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `chats/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/reset`,\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n requestType: \"json\",\n body: mergeAdditionalBodyParameters(_body, requestOptions?.additionalBodyParameters),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.Chat, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"POST\", \"/chats/{id}/reset\");\n }\n\n /**\n * @param {SmoothAgentApi.ChatsRespondRequest} request\n * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.chats.respond({\n * id: \"id\",\n * requestId: \"requestId\",\n * answer: {\n * \"key\": \"value\"\n * }\n * })\n */\n public respond(\n request: SmoothAgentApi.ChatsRespondRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.ChatsRespondResponse> {\n return core.HttpResponsePromise.fromPromise(this.__respond(request, requestOptions));\n }\n\n private async __respond(\n request: SmoothAgentApi.ChatsRespondRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.ChatsRespondResponse>> {\n const { id, \"SmoothAgent-As-User\": smoothAgentAsUser, \"Idempotency-Key\": idempotencyKey, ..._body } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser, \"Idempotency-Key\": idempotencyKey }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `chats/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/respond`,\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n requestType: \"json\",\n body: mergeAdditionalBodyParameters(_body, requestOptions?.additionalBodyParameters),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.ChatsRespondResponse, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"POST\", \"/chats/{id}/respond\");\n }\n\n /**\n * @param {SmoothAgentApi.ChatsRunsRequest} request\n * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.chats.runs({\n * id: \"id\"\n * })\n */\n public async runs(\n request: SmoothAgentApi.ChatsRunsRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): Promise<core.Page<SmoothAgentApi.RunSummary, SmoothAgentApi.ChatsRunsResponse>> {\n const list = core.HttpResponsePromise.interceptFunction(\n async (\n request: SmoothAgentApi.ChatsRunsRequest,\n ): Promise<core.WithRawResponse<SmoothAgentApi.ChatsRunsResponse>> => {\n const { id, limit, cursor, \"SmoothAgent-As-User\": smoothAgentAsUser } = request;\n const _queryParams: Record<string, unknown> = {\n limit,\n cursor,\n };\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `chats/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/runs`,\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url\n .queryBuilder()\n .addMany(_queryParams)\n .add(\"limit\", _queryParams.limit, { style: \"comma\" })\n .add(\"cursor\", _queryParams.cursor, { style: \"comma\" })\n .mergeAdditional(requestOptions?.queryParams)\n .build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return {\n data: _response.body as SmoothAgentApi.ChatsRunsResponse,\n rawResponse: _response.rawResponse,\n };\n }\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/chats/{id}/runs\");\n },\n );\n const dataWithRawResponse = await list(request).withRawResponse();\n return new core.Page<SmoothAgentApi.RunSummary, SmoothAgentApi.ChatsRunsResponse>({\n response: dataWithRawResponse.data,\n rawResponse: dataWithRawResponse.rawResponse,\n hasNextPage: (response) =>\n response?.nextCursor != null &&\n !(typeof response?.nextCursor === \"string\" && response?.nextCursor === \"\"),\n getItems: (response) => response?.data ?? [],\n loadPage: (response) => {\n return list(core.setObjectProperty(request, \"cursor\", response?.nextCursor));\n },\n });\n }\n\n /**\n * @param {SmoothAgentApi.ChatsRunRequest} request\n * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.chats.run({\n * id: \"id\",\n * runId: \"runId\"\n * })\n */\n public run(\n request: SmoothAgentApi.ChatsRunRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.RunSummary> {\n return core.HttpResponsePromise.fromPromise(this.__run(request, requestOptions));\n }\n\n private async __run(\n request: SmoothAgentApi.ChatsRunRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.RunSummary>> {\n const { id, runId, \"SmoothAgent-As-User\": smoothAgentAsUser } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `chats/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/runs/${core.url.encodePathParam(runId, errors.SmoothAgentApiError)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.RunSummary, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/chats/{id}/runs/{runId}\");\n }\n\n /**\n * @param {SmoothAgentApi.ChatsSelectionRequest} request\n * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.chats.selection({\n * id: \"id\"\n * })\n */\n public selection(\n request: SmoothAgentApi.ChatsSelectionRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.ChatSelection> {\n return core.HttpResponsePromise.fromPromise(this.__selection(request, requestOptions));\n }\n\n private async __selection(\n request: SmoothAgentApi.ChatsSelectionRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.ChatSelection>> {\n const { id, \"SmoothAgent-As-User\": smoothAgentAsUser } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `chats/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/selection`,\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.ChatSelection, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/chats/{id}/selection\");\n }\n\n /**\n * O mesmo SnapshotPayload do frame `snapshot` do realtime (`seq, inbox, box?, recentItems?, hasBefore?, state?`):\n * resync sem socket. O formato \u00E9 do protocolo do realtime.\n *\n * @param {SmoothAgentApi.ChatsSnapshotRequest} request\n * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.chats.snapshot({\n * id: \"id\"\n * })\n */\n public snapshot(\n request: SmoothAgentApi.ChatsSnapshotRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): core.HttpResponsePromise<Record<string, unknown>> {\n return core.HttpResponsePromise.fromPromise(this.__snapshot(request, requestOptions));\n }\n\n private async __snapshot(\n request: SmoothAgentApi.ChatsSnapshotRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): Promise<core.WithRawResponse<Record<string, unknown>>> {\n const { id, \"SmoothAgent-As-User\": smoothAgentAsUser } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `chats/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/snapshot`,\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as Record<string, unknown>, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/chats/{id}/snapshot\");\n }\n\n /**\n * @param {SmoothAgentApi.ChatsStopRequest} request\n * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.chats.stop({\n * id: \"id\"\n * })\n */\n public stop(\n request: SmoothAgentApi.ChatsStopRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.ChatsStopResponse> {\n return core.HttpResponsePromise.fromPromise(this.__stop(request, requestOptions));\n }\n\n private async __stop(\n request: SmoothAgentApi.ChatsStopRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.ChatsStopResponse>> {\n const { id, \"SmoothAgent-As-User\": smoothAgentAsUser, \"Idempotency-Key\": idempotencyKey } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser, \"Idempotency-Key\": idempotencyKey }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `chats/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/stop`,\n ),\n method: \"POST\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.ChatsStopResponse, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"POST\", \"/chats/{id}/stop\");\n }\n\n /**\n * @param {SmoothAgentApi.ChatBoxListTasksRequest} request\n * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.chats.chatBoxListTasks({\n * id: \"id\"\n * })\n */\n public chatBoxListTasks(\n request: SmoothAgentApi.ChatBoxListTasksRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.ChatBoxListTasksResponse> {\n return core.HttpResponsePromise.fromPromise(this.__chatBoxListTasks(request, requestOptions));\n }\n\n private async __chatBoxListTasks(\n request: SmoothAgentApi.ChatBoxListTasksRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.ChatBoxListTasksResponse>> {\n const { id, \"SmoothAgent-As-User\": smoothAgentAsUser } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `chats/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/tasks`,\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return {\n data: _response.body as SmoothAgentApi.ChatBoxListTasksResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/chats/{id}/tasks\");\n }\n\n /**\n * @param {SmoothAgentApi.ChatBoxTaskOutputRequest} request\n * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.chats.chatBoxTaskOutput({\n * id: \"id\",\n * taskId: \"taskId\"\n * })\n */\n public chatBoxTaskOutput(\n request: SmoothAgentApi.ChatBoxTaskOutputRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.ChatTaskOutput> {\n return core.HttpResponsePromise.fromPromise(this.__chatBoxTaskOutput(request, requestOptions));\n }\n\n private async __chatBoxTaskOutput(\n request: SmoothAgentApi.ChatBoxTaskOutputRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.ChatTaskOutput>> {\n const { id, taskId, after, \"SmoothAgent-As-User\": smoothAgentAsUser } = request;\n const _queryParams: Record<string, unknown> = {\n after,\n };\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `chats/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/tasks/${core.url.encodePathParam(taskId, errors.SmoothAgentApiError)}/output`,\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url\n .queryBuilder()\n .addMany(_queryParams)\n .add(\"after\", _queryParams.after, { style: \"comma\" })\n .mergeAdditional(requestOptions?.queryParams)\n .build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.ChatTaskOutput, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(\n _response.error,\n _response.rawResponse,\n \"GET\",\n \"/chats/{id}/tasks/{taskId}/output\",\n );\n }\n\n /**\n * Para UMA tarefa (subagente ou processo de fundo) sem matar o turno.\n *\n * @param {SmoothAgentApi.ChatBoxStopTaskRequest} request\n * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.chats.chatBoxStopTask({\n * id: \"id\",\n * taskId: \"taskId\"\n * })\n */\n public chatBoxStopTask(\n request: SmoothAgentApi.ChatBoxStopTaskRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.ChatBoxStopTaskResponse> {\n return core.HttpResponsePromise.fromPromise(this.__chatBoxStopTask(request, requestOptions));\n }\n\n private async __chatBoxStopTask(\n request: SmoothAgentApi.ChatBoxStopTaskRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.ChatBoxStopTaskResponse>> {\n const { id, taskId, \"SmoothAgent-As-User\": smoothAgentAsUser, \"Idempotency-Key\": idempotencyKey } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser, \"Idempotency-Key\": idempotencyKey }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `chats/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/tasks/${core.url.encodePathParam(taskId, errors.SmoothAgentApiError)}/stop`,\n ),\n method: \"POST\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return {\n data: _response.body as SmoothAgentApi.ChatBoxStopTaskResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(\n _response.error,\n _response.rawResponse,\n \"POST\",\n \"/chats/{id}/tasks/{taskId}/stop\",\n );\n }\n\n /**\n * @param {SmoothAgentApi.ChatsUsageRequest} request\n * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.chats.usage({\n * id: \"id\"\n * })\n */\n public usage(\n request: SmoothAgentApi.ChatsUsageRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.ChatUsage> {\n return core.HttpResponsePromise.fromPromise(this.__usage(request, requestOptions));\n }\n\n private async __usage(\n request: SmoothAgentApi.ChatsUsageRequest,\n requestOptions?: ChatsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.ChatUsage>> {\n const { id, \"SmoothAgent-As-User\": smoothAgentAsUser } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `chats/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/usage`,\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.ChatUsage, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/chats/{id}/usage\");\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type { BaseClientOptions, BaseRequestOptions } from \"../../../../BaseClient.js\";\nimport { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from \"../../../../BaseClient.js\";\nimport { mergeHeaders, mergeOnlyDefinedHeaders } from \"../../../../core/headers.js\";\nimport * as core from \"../../../../core/index.js\";\nimport { mergeAdditionalBodyParameters } from \"../../../../core/requestBody.js\";\nimport * as environments from \"../../../../environments.js\";\nimport { handleNonStatusCodeError } from \"../../../../errors/handleNonStatusCodeError.js\";\nimport * as errors from \"../../../../errors/index.js\";\nimport * as SmoothAgentApi from \"../../../index.js\";\n\nexport declare namespace ConnectionsClient {\n export type Options = BaseClientOptions;\n\n export interface RequestOptions extends BaseRequestOptions {}\n}\n\nexport class ConnectionsClient {\n protected readonly _options: NormalizedClientOptionsWithAuth<ConnectionsClient.Options>;\n\n constructor(options: ConnectionsClient.Options) {\n this._options = normalizeClientOptionsWithAuth(options);\n }\n\n /**\n * @param {SmoothAgentApi.ConnectionsListRequest} request\n * @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.connections.list()\n */\n public async list(\n request: SmoothAgentApi.ConnectionsListRequest = {},\n requestOptions?: ConnectionsClient.RequestOptions,\n ): Promise<core.Page<SmoothAgentApi.Connection, SmoothAgentApi.ConnectionsListResponse>> {\n const list = core.HttpResponsePromise.interceptFunction(\n async (\n request: SmoothAgentApi.ConnectionsListRequest,\n ): Promise<core.WithRawResponse<SmoothAgentApi.ConnectionsListResponse>> => {\n const { limit, cursor, \"SmoothAgent-Workspace\": smoothAgentWorkspace } = request;\n const _queryParams: Record<string, unknown> = {\n limit,\n cursor,\n };\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-Workspace\": smoothAgentWorkspace }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n \"connections\",\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url\n .queryBuilder()\n .addMany(_queryParams)\n .add(\"limit\", _queryParams.limit, { style: \"comma\" })\n .add(\"cursor\", _queryParams.cursor, { style: \"comma\" })\n .mergeAdditional(requestOptions?.queryParams)\n .build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return {\n data: _response.body as SmoothAgentApi.ConnectionsListResponse,\n rawResponse: _response.rawResponse,\n };\n }\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/connections\");\n },\n );\n const dataWithRawResponse = await list(request).withRawResponse();\n return new core.Page<SmoothAgentApi.Connection, SmoothAgentApi.ConnectionsListResponse>({\n response: dataWithRawResponse.data,\n rawResponse: dataWithRawResponse.rawResponse,\n hasNextPage: (response) =>\n response?.nextCursor != null &&\n !(typeof response?.nextCursor === \"string\" && response?.nextCursor === \"\"),\n getItems: (response) => response?.data ?? [],\n loadPage: (response) => {\n return list(core.setObjectProperty(request, \"cursor\", response?.nextCursor));\n },\n });\n }\n\n /**\n * @param {SmoothAgentApi.ConnectionsCreateRequest} request\n * @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.connections.create({\n * name: \"name\"\n * })\n */\n public create(\n request: SmoothAgentApi.ConnectionsCreateRequest,\n requestOptions?: ConnectionsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.Connection> {\n return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));\n }\n\n private async __create(\n request: SmoothAgentApi.ConnectionsCreateRequest,\n requestOptions?: ConnectionsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.Connection>> {\n const { \"SmoothAgent-Workspace\": smoothAgentWorkspace, \"Idempotency-Key\": idempotencyKey, ..._body } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n \"SmoothAgent-Workspace\": smoothAgentWorkspace,\n \"Idempotency-Key\": idempotencyKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n \"connections\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n requestType: \"json\",\n body: mergeAdditionalBodyParameters(_body, requestOptions?.additionalBodyParameters),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.Connection, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"POST\", \"/connections\");\n }\n\n /**\n * @param {SmoothAgentApi.ConnectionsGetRequest} request\n * @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.connections.get({\n * id: \"id\"\n * })\n */\n public get(\n request: SmoothAgentApi.ConnectionsGetRequest,\n requestOptions?: ConnectionsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.Connection> {\n return core.HttpResponsePromise.fromPromise(this.__get(request, requestOptions));\n }\n\n private async __get(\n request: SmoothAgentApi.ConnectionsGetRequest,\n requestOptions?: ConnectionsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.Connection>> {\n const { id } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `connections/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.Connection, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/connections/{id}\");\n }\n\n /**\n * @param {SmoothAgentApi.ConnectionsDeleteRequest} request\n * @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.connections.delete({\n * id: \"id\"\n * })\n */\n public delete(\n request: SmoothAgentApi.ConnectionsDeleteRequest,\n requestOptions?: ConnectionsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.Deleted> {\n return core.HttpResponsePromise.fromPromise(this.__delete(request, requestOptions));\n }\n\n private async __delete(\n request: SmoothAgentApi.ConnectionsDeleteRequest,\n requestOptions?: ConnectionsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.Deleted>> {\n const { id } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `connections/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.Deleted, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"DELETE\", \"/connections/{id}\");\n }\n\n /**\n * @param {SmoothAgentApi.ConnectionsRenameRequest} request\n * @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.connections.rename({\n * id: \"id\",\n * name: \"name\"\n * })\n */\n public rename(\n request: SmoothAgentApi.ConnectionsRenameRequest,\n requestOptions?: ConnectionsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.Connection> {\n return core.HttpResponsePromise.fromPromise(this.__rename(request, requestOptions));\n }\n\n private async __rename(\n request: SmoothAgentApi.ConnectionsRenameRequest,\n requestOptions?: ConnectionsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.Connection>> {\n const { id, ..._body } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `connections/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}`,\n ),\n method: \"PATCH\",\n headers: _headers,\n contentType: \"application/json\",\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n requestType: \"json\",\n body: mergeAdditionalBodyParameters(_body, requestOptions?.additionalBodyParameters),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.Connection, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"PATCH\", \"/connections/{id}\");\n }\n\n /**\n * @param {SmoothAgentApi.LoginStatusConnectionsRequest} request\n * @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.connections.loginStatus({\n * id: \"id\",\n * loginId: \"loginId\"\n * })\n */\n public loginStatus(\n request: SmoothAgentApi.LoginStatusConnectionsRequest,\n requestOptions?: ConnectionsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.LoginStatus> {\n return core.HttpResponsePromise.fromPromise(this.__loginStatus(request, requestOptions));\n }\n\n private async __loginStatus(\n request: SmoothAgentApi.LoginStatusConnectionsRequest,\n requestOptions?: ConnectionsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.LoginStatus>> {\n const { id, loginId } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `connections/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/logins/${core.url.encodePathParam(loginId, errors.SmoothAgentApiError)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.LoginStatus, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(\n _response.error,\n _response.rawResponse,\n \"GET\",\n \"/connections/{id}/logins/{loginId}\",\n );\n }\n\n /**\n * @param {SmoothAgentApi.ConnectionsCompleteRequest} request\n * @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.connections.complete({\n * id: \"id\",\n * loginId: \"loginId\",\n * code: \"code\"\n * })\n */\n public complete(\n request: SmoothAgentApi.ConnectionsCompleteRequest,\n requestOptions?: ConnectionsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.Connection> {\n return core.HttpResponsePromise.fromPromise(this.__complete(request, requestOptions));\n }\n\n private async __complete(\n request: SmoothAgentApi.ConnectionsCompleteRequest,\n requestOptions?: ConnectionsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.Connection>> {\n const { id, loginId, \"Idempotency-Key\": idempotencyKey, ..._body } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"Idempotency-Key\": idempotencyKey }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `connections/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/logins/${core.url.encodePathParam(loginId, errors.SmoothAgentApiError)}/complete`,\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n requestType: \"json\",\n body: mergeAdditionalBodyParameters(_body, requestOptions?.additionalBodyParameters),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.Connection, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(\n _response.error,\n _response.rawResponse,\n \"POST\",\n \"/connections/{id}/logins/{loginId}/complete\",\n );\n }\n\n /**\n * @param {SmoothAgentApi.ConnectionsDisconnectRequest} request\n * @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.connections.disconnect({\n * id: \"id\",\n * provider: \"claude\"\n * })\n */\n public disconnect(\n request: SmoothAgentApi.ConnectionsDisconnectRequest,\n requestOptions?: ConnectionsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.Connection> {\n return core.HttpResponsePromise.fromPromise(this.__disconnect(request, requestOptions));\n }\n\n private async __disconnect(\n request: SmoothAgentApi.ConnectionsDisconnectRequest,\n requestOptions?: ConnectionsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.Connection>> {\n const { id, provider, via } = request;\n const _queryParams: Record<string, unknown> = {\n via: via != null ? via : undefined,\n };\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `connections/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/${core.url.encodePathParam(provider, errors.SmoothAgentApiError)}`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryString: core.url\n .queryBuilder()\n .addMany(_queryParams)\n .add(\"via\", _queryParams.via, { style: \"comma\" })\n .mergeAdditional(requestOptions?.queryParams)\n .build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.Connection, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(\n _response.error,\n _response.rawResponse,\n \"DELETE\",\n \"/connections/{id}/{provider}\",\n );\n }\n\n /**\n * Mesmos fluxos do usu\u00E1rio, gravando NA CONEX\u00C3O (o admin do dev conecta a assinatura dele).\n *\n * @param {SmoothAgentApi.ConnectionsConnectRequest} request\n * @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.connections.connect({\n * id: \"id\",\n * provider: \"claude\"\n * })\n */\n public connect(\n request: SmoothAgentApi.ConnectionsConnectRequest,\n requestOptions?: ConnectionsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.ConnectionsConnectResponse> {\n return core.HttpResponsePromise.fromPromise(this.__connect(request, requestOptions));\n }\n\n private async __connect(\n request: SmoothAgentApi.ConnectionsConnectRequest,\n requestOptions?: ConnectionsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.ConnectionsConnectResponse>> {\n const { id, provider, \"Idempotency-Key\": idempotencyKey } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"Idempotency-Key\": idempotencyKey }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `connections/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/${core.url.encodePathParam(provider, errors.SmoothAgentApiError)}/connect`,\n ),\n method: \"POST\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return {\n data: _response.body as SmoothAgentApi.ConnectionsConnectResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(\n _response.error,\n _response.rawResponse,\n \"POST\",\n \"/connections/{id}/{provider}/connect\",\n );\n }\n\n /**\n * @param {SmoothAgentApi.SetKeyConnectionsRequest} request\n * @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.connections.setKey({\n * id: \"id\",\n * provider: \"claude\",\n * key: \"key\"\n * })\n */\n public setKey(\n request: SmoothAgentApi.SetKeyConnectionsRequest,\n requestOptions?: ConnectionsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.Connection> {\n return core.HttpResponsePromise.fromPromise(this.__setKey(request, requestOptions));\n }\n\n private async __setKey(\n request: SmoothAgentApi.SetKeyConnectionsRequest,\n requestOptions?: ConnectionsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.Connection>> {\n const { id, provider, ..._body } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `connections/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/${core.url.encodePathParam(provider, errors.SmoothAgentApiError)}/key`,\n ),\n method: \"PUT\",\n headers: _headers,\n contentType: \"application/json\",\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n requestType: \"json\",\n body: mergeAdditionalBodyParameters(_body, requestOptions?.additionalBodyParameters),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.Connection, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(\n _response.error,\n _response.rawResponse,\n \"PUT\",\n \"/connections/{id}/{provider}/key\",\n );\n }\n\n /**\n * @param {SmoothAgentApi.ConnectionsLimitsRequest} request\n * @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.connections.limits({\n * id: \"id\",\n * provider: \"claude\"\n * })\n */\n public limits(\n request: SmoothAgentApi.ConnectionsLimitsRequest,\n requestOptions?: ConnectionsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.ProviderLimits> {\n return core.HttpResponsePromise.fromPromise(this.__limits(request, requestOptions));\n }\n\n private async __limits(\n request: SmoothAgentApi.ConnectionsLimitsRequest,\n requestOptions?: ConnectionsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.ProviderLimits>> {\n const { id, provider } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `connections/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/${core.url.encodePathParam(provider, errors.SmoothAgentApiError)}/limits`,\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.ProviderLimits, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(\n _response.error,\n _response.rawResponse,\n \"GET\",\n \"/connections/{id}/{provider}/limits\",\n );\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type { BaseClientOptions, BaseRequestOptions } from \"../../../../BaseClient.js\";\nimport { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from \"../../../../BaseClient.js\";\nimport { mergeHeaders, mergeOnlyDefinedHeaders } from \"../../../../core/headers.js\";\nimport * as core from \"../../../../core/index.js\";\nimport { mergeAdditionalBodyParameters } from \"../../../../core/requestBody.js\";\nimport * as environments from \"../../../../environments.js\";\nimport { handleNonStatusCodeError } from \"../../../../errors/handleNonStatusCodeError.js\";\nimport * as errors from \"../../../../errors/index.js\";\nimport * as SmoothAgentApi from \"../../../index.js\";\n\nexport declare namespace FilesClient {\n export type Options = BaseClientOptions;\n\n export interface RequestOptions extends BaseRequestOptions {}\n}\n\nexport class FilesClient {\n protected readonly _options: NormalizedClientOptionsWithAuth<FilesClient.Options>;\n\n constructor(options: FilesClient.Options) {\n this._options = normalizeClientOptionsWithAuth(options);\n }\n\n /**\n * @param {SmoothAgentApi.FilesUploadRequest} request\n * @param {FilesClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * import { createReadStream } from \"fs\";\n * await client.files.upload({\n * file: fs.createReadStream(\"/path/to/your/file\")\n * })\n */\n public upload(\n request: SmoothAgentApi.FilesUploadRequest,\n requestOptions?: FilesClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.FileObject> {\n return core.HttpResponsePromise.fromPromise(this.__upload(request, requestOptions));\n }\n\n private async __upload(\n request: SmoothAgentApi.FilesUploadRequest,\n requestOptions?: FilesClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.FileObject>> {\n const _body = await core.newFormData();\n await _body.appendFile(\"file\", request.file);\n const _maybeEncodedRequest = await _body.getRequest();\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n \"SmoothAgent-Workspace\": request[\"SmoothAgent-Workspace\"],\n \"SmoothAgent-As-User\": request[\"SmoothAgent-As-User\"],\n \"Idempotency-Key\": request[\"Idempotency-Key\"],\n ..._maybeEncodedRequest.headers,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n \"files\",\n ),\n method: \"POST\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n requestType: \"file\",\n duplex: _maybeEncodedRequest.duplex,\n body: _maybeEncodedRequest.body,\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.FileObject, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"POST\", \"/files\");\n }\n\n /**\n * Arquivo grande: devolve a URL assinada (15 min).\n *\n * @param {SmoothAgentApi.CreateUploadFilesRequest} request\n * @param {FilesClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.files.createUpload({\n * filename: \"filename\",\n * mimeType: \"mimeType\",\n * sizeBytes: 1000000\n * })\n */\n public createUpload(\n request: SmoothAgentApi.CreateUploadFilesRequest,\n requestOptions?: FilesClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.CreateUploadFilesResponse> {\n return core.HttpResponsePromise.fromPromise(this.__createUpload(request, requestOptions));\n }\n\n private async __createUpload(\n request: SmoothAgentApi.CreateUploadFilesRequest,\n requestOptions?: FilesClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.CreateUploadFilesResponse>> {\n const {\n \"SmoothAgent-Workspace\": smoothAgentWorkspace,\n \"SmoothAgent-As-User\": smoothAgentAsUser,\n \"Idempotency-Key\": idempotencyKey,\n ..._body\n } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n \"SmoothAgent-Workspace\": smoothAgentWorkspace,\n \"SmoothAgent-As-User\": smoothAgentAsUser,\n \"Idempotency-Key\": idempotencyKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n \"files/uploads\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n requestType: \"json\",\n body: mergeAdditionalBodyParameters(_body, requestOptions?.additionalBodyParameters),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return {\n data: _response.body as SmoothAgentApi.CreateUploadFilesResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"POST\", \"/files/uploads\");\n }\n\n /**\n * @param {SmoothAgentApi.FilesGetRequest} request\n * @param {FilesClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.files.get({\n * id: \"id\"\n * })\n */\n public get(\n request: SmoothAgentApi.FilesGetRequest,\n requestOptions?: FilesClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.FileObject> {\n return core.HttpResponsePromise.fromPromise(this.__get(request, requestOptions));\n }\n\n private async __get(\n request: SmoothAgentApi.FilesGetRequest,\n requestOptions?: FilesClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.FileObject>> {\n const { id } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `files/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.FileObject, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/files/{id}\");\n }\n\n /**\n * @param {SmoothAgentApi.FilesDeleteRequest} request\n * @param {FilesClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.files.delete({\n * id: \"id\"\n * })\n */\n public delete(\n request: SmoothAgentApi.FilesDeleteRequest,\n requestOptions?: FilesClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.Deleted> {\n return core.HttpResponsePromise.fromPromise(this.__delete(request, requestOptions));\n }\n\n private async __delete(\n request: SmoothAgentApi.FilesDeleteRequest,\n requestOptions?: FilesClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.Deleted>> {\n const { id } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `files/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.Deleted, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"DELETE\", \"/files/{id}\");\n }\n\n /**\n * @param {SmoothAgentApi.FilesCompleteRequest} request\n * @param {FilesClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.files.complete({\n * id: \"id\"\n * })\n */\n public complete(\n request: SmoothAgentApi.FilesCompleteRequest,\n requestOptions?: FilesClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.FileObject> {\n return core.HttpResponsePromise.fromPromise(this.__complete(request, requestOptions));\n }\n\n private async __complete(\n request: SmoothAgentApi.FilesCompleteRequest,\n requestOptions?: FilesClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.FileObject>> {\n const { id, \"Idempotency-Key\": idempotencyKey } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"Idempotency-Key\": idempotencyKey }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `files/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/complete`,\n ),\n method: \"POST\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.FileObject, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"POST\", \"/files/{id}/complete\");\n }\n\n /**\n * @param {SmoothAgentApi.FilesContentRequest} request\n * @param {FilesClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.files.content({\n * id: \"id\"\n * })\n */\n public content(\n request: SmoothAgentApi.FilesContentRequest,\n requestOptions?: FilesClient.RequestOptions,\n ): core.HttpResponsePromise<void> {\n return core.HttpResponsePromise.fromPromise(this.__content(request, requestOptions));\n }\n\n private async __content(\n request: SmoothAgentApi.FilesContentRequest,\n requestOptions?: FilesClient.RequestOptions,\n ): Promise<core.WithRawResponse<void>> {\n const { id } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `files/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/content`,\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: undefined, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/files/{id}/content\");\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type { BaseClientOptions, BaseRequestOptions } from \"../../../../BaseClient.js\";\nimport { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from \"../../../../BaseClient.js\";\nimport { mergeHeaders } from \"../../../../core/headers.js\";\nimport * as core from \"../../../../core/index.js\";\nimport * as environments from \"../../../../environments.js\";\nimport { handleNonStatusCodeError } from \"../../../../errors/handleNonStatusCodeError.js\";\nimport * as errors from \"../../../../errors/index.js\";\nimport * as SmoothAgentApi from \"../../../index.js\";\n\nexport declare namespace IdentityClient {\n export type Options = BaseClientOptions;\n\n export interface RequestOptions extends BaseRequestOptions {}\n}\n\nexport class IdentityClient {\n protected readonly _options: NormalizedClientOptionsWithAuth<IdentityClient.Options>;\n\n constructor(options: IdentityClient.Options) {\n this._options = normalizeClientOptionsWithAuth(options);\n }\n\n /**\n * @param {IdentityClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.identity.meWhoami()\n */\n public meWhoami(\n requestOptions?: IdentityClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.MeWhoamiResponse> {\n return core.HttpResponsePromise.fromPromise(this.__meWhoami(requestOptions));\n }\n\n private async __meWhoami(\n requestOptions?: IdentityClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.MeWhoamiResponse>> {\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n \"me\",\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.MeWhoamiResponse, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/me\");\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type { BaseClientOptions, BaseRequestOptions } from \"../../../../BaseClient.js\";\nimport { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from \"../../../../BaseClient.js\";\nimport { mergeHeaders, mergeOnlyDefinedHeaders } from \"../../../../core/headers.js\";\nimport * as core from \"../../../../core/index.js\";\nimport { mergeAdditionalBodyParameters } from \"../../../../core/requestBody.js\";\nimport * as environments from \"../../../../environments.js\";\nimport { handleNonStatusCodeError } from \"../../../../errors/handleNonStatusCodeError.js\";\nimport * as errors from \"../../../../errors/index.js\";\nimport * as SmoothAgentApi from \"../../../index.js\";\n\nexport declare namespace KeysClient {\n export type Options = BaseClientOptions;\n\n export interface RequestOptions extends BaseRequestOptions {}\n}\n\nexport class KeysClient {\n protected readonly _options: NormalizedClientOptionsWithAuth<KeysClient.Options>;\n\n constructor(options: KeysClient.Options) {\n this._options = normalizeClientOptionsWithAuth(options);\n }\n\n /**\n * @param {SmoothAgentApi.ApiKeysListRequest} request\n * @param {KeysClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.keys.apiKeysList()\n */\n public async apiKeysList(\n request: SmoothAgentApi.ApiKeysListRequest = {},\n requestOptions?: KeysClient.RequestOptions,\n ): Promise<core.Page<SmoothAgentApi.ApiKey, SmoothAgentApi.ApiKeysListResponse>> {\n const list = core.HttpResponsePromise.interceptFunction(\n async (\n request: SmoothAgentApi.ApiKeysListRequest,\n ): Promise<core.WithRawResponse<SmoothAgentApi.ApiKeysListResponse>> => {\n const { limit, cursor, workspaceId } = request;\n const _queryParams: Record<string, unknown> = {\n limit,\n cursor,\n workspaceId,\n };\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n \"api-keys\",\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url\n .queryBuilder()\n .addMany(_queryParams)\n .add(\"limit\", _queryParams.limit, { style: \"comma\" })\n .add(\"cursor\", _queryParams.cursor, { style: \"comma\" })\n .add(\"workspaceId\", _queryParams.workspaceId, { style: \"comma\" })\n .mergeAdditional(requestOptions?.queryParams)\n .build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return {\n data: _response.body as SmoothAgentApi.ApiKeysListResponse,\n rawResponse: _response.rawResponse,\n };\n }\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/api-keys\");\n },\n );\n const dataWithRawResponse = await list(request).withRawResponse();\n return new core.Page<SmoothAgentApi.ApiKey, SmoothAgentApi.ApiKeysListResponse>({\n response: dataWithRawResponse.data,\n rawResponse: dataWithRawResponse.rawResponse,\n hasNextPage: (response) =>\n response?.nextCursor != null &&\n !(typeof response?.nextCursor === \"string\" && response?.nextCursor === \"\"),\n getItems: (response) => response?.data ?? [],\n loadPage: (response) => {\n return list(core.setObjectProperty(request, \"cursor\", response?.nextCursor));\n },\n });\n }\n\n /**\n * @param {SmoothAgentApi.CreateApiKey} request\n * @param {KeysClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.keys.apiKeysCreate({\n * name: \"name\"\n * })\n */\n public apiKeysCreate(\n request: SmoothAgentApi.CreateApiKey,\n requestOptions?: KeysClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.ApiKeyWithSecret> {\n return core.HttpResponsePromise.fromPromise(this.__apiKeysCreate(request, requestOptions));\n }\n\n private async __apiKeysCreate(\n request: SmoothAgentApi.CreateApiKey,\n requestOptions?: KeysClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.ApiKeyWithSecret>> {\n const { \"Idempotency-Key\": idempotencyKey, ..._body } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"Idempotency-Key\": idempotencyKey }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n \"api-keys\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n requestType: \"json\",\n body: mergeAdditionalBodyParameters(_body, requestOptions?.additionalBodyParameters),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.ApiKeyWithSecret, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"POST\", \"/api-keys\");\n }\n\n /**\n * @param {SmoothAgentApi.ApiKeysGetRequest} request\n * @param {KeysClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.keys.apiKeysGet({\n * id: \"id\"\n * })\n */\n public apiKeysGet(\n request: SmoothAgentApi.ApiKeysGetRequest,\n requestOptions?: KeysClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.ApiKey> {\n return core.HttpResponsePromise.fromPromise(this.__apiKeysGet(request, requestOptions));\n }\n\n private async __apiKeysGet(\n request: SmoothAgentApi.ApiKeysGetRequest,\n requestOptions?: KeysClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.ApiKey>> {\n const { id } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `api-keys/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.ApiKey, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/api-keys/{id}\");\n }\n\n /**\n * @param {SmoothAgentApi.ApiKeysRevokeRequest} request\n * @param {KeysClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.keys.apiKeysRevoke({\n * id: \"id\"\n * })\n */\n public apiKeysRevoke(\n request: SmoothAgentApi.ApiKeysRevokeRequest,\n requestOptions?: KeysClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.Deleted> {\n return core.HttpResponsePromise.fromPromise(this.__apiKeysRevoke(request, requestOptions));\n }\n\n private async __apiKeysRevoke(\n request: SmoothAgentApi.ApiKeysRevokeRequest,\n requestOptions?: KeysClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.Deleted>> {\n const { id } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `api-keys/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.Deleted, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"DELETE\", \"/api-keys/{id}\");\n }\n\n /**\n * Novo segredo; o antigo vale at\u00E9 `graceSeconds` (padr\u00E3o 0 = morre j\u00E1; m\u00E1x 7 dias). Sess\u00E3o do dashboard n\u00E3o se rotaciona: 403 `{reason: \"dashboard_session\"}`.\n *\n * @param {SmoothAgentApi.ApiKeysRotateRequest} request\n * @param {KeysClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.keys.apiKeysRotate({\n * id: \"id\"\n * })\n */\n public apiKeysRotate(\n request: SmoothAgentApi.ApiKeysRotateRequest,\n requestOptions?: KeysClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.ApiKeyWithSecret> {\n return core.HttpResponsePromise.fromPromise(this.__apiKeysRotate(request, requestOptions));\n }\n\n private async __apiKeysRotate(\n request: SmoothAgentApi.ApiKeysRotateRequest,\n requestOptions?: KeysClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.ApiKeyWithSecret>> {\n const { id, \"Idempotency-Key\": idempotencyKey, ..._body } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"Idempotency-Key\": idempotencyKey }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `api-keys/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/rotate`,\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n requestType: \"json\",\n body: mergeAdditionalBodyParameters(_body, requestOptions?.additionalBodyParameters),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.ApiKeyWithSecret, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"POST\", \"/api-keys/{id}/rotate\");\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type { BaseClientOptions, BaseRequestOptions } from \"../../../../BaseClient.js\";\nimport { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from \"../../../../BaseClient.js\";\nimport { mergeHeaders, mergeOnlyDefinedHeaders } from \"../../../../core/headers.js\";\nimport * as core from \"../../../../core/index.js\";\nimport { mergeAdditionalBodyParameters } from \"../../../../core/requestBody.js\";\nimport * as environments from \"../../../../environments.js\";\nimport { handleNonStatusCodeError } from \"../../../../errors/handleNonStatusCodeError.js\";\nimport * as errors from \"../../../../errors/index.js\";\nimport * as SmoothAgentApi from \"../../../index.js\";\n\nexport declare namespace MachinesClient {\n export type Options = BaseClientOptions;\n\n export interface RequestOptions extends BaseRequestOptions {}\n}\n\nexport class MachinesClient {\n protected readonly _options: NormalizedClientOptionsWithAuth<MachinesClient.Options>;\n\n constructor(options: MachinesClient.Options) {\n this._options = normalizeClientOptionsWithAuth(options);\n }\n\n /**\n * Chave: as do workspace (filtro userId/kind). Usu\u00E1rio: as dele \u2014 `local` s\u00F3 aparece ONLINE\n * (`includeOffline=true` pra tela de gerenciar dispositivos).\n *\n * @param {SmoothAgentApi.MachinesListRequest} request\n * @param {MachinesClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.machines.list()\n */\n public async list(\n request: SmoothAgentApi.MachinesListRequest = {},\n requestOptions?: MachinesClient.RequestOptions,\n ): Promise<core.Page<SmoothAgentApi.Machine, SmoothAgentApi.MachinesListResponse>> {\n const list = core.HttpResponsePromise.interceptFunction(\n async (\n request: SmoothAgentApi.MachinesListRequest,\n ): Promise<core.WithRawResponse<SmoothAgentApi.MachinesListResponse>> => {\n const {\n limit,\n cursor,\n userId,\n kind,\n includeOffline,\n \"SmoothAgent-Workspace\": smoothAgentWorkspace,\n } = request;\n const _queryParams: Record<string, unknown> = {\n limit,\n cursor,\n userId,\n kind,\n includeOffline,\n };\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-Workspace\": smoothAgentWorkspace }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n \"machines\",\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url\n .queryBuilder()\n .addMany(_queryParams)\n .add(\"limit\", _queryParams.limit, { style: \"comma\" })\n .add(\"cursor\", _queryParams.cursor, { style: \"comma\" })\n .add(\"userId\", _queryParams.userId, { style: \"comma\" })\n .add(\"kind\", _queryParams.kind, { style: \"comma\" })\n .add(\"includeOffline\", _queryParams.includeOffline, { style: \"comma\" })\n .mergeAdditional(requestOptions?.queryParams)\n .build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return {\n data: _response.body as SmoothAgentApi.MachinesListResponse,\n rawResponse: _response.rawResponse,\n };\n }\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/machines\");\n },\n );\n const dataWithRawResponse = await list(request).withRawResponse();\n return new core.Page<SmoothAgentApi.Machine, SmoothAgentApi.MachinesListResponse>({\n response: dataWithRawResponse.data,\n rawResponse: dataWithRawResponse.rawResponse,\n hasNextPage: (response) =>\n response?.nextCursor != null &&\n !(typeof response?.nextCursor === \"string\" && response?.nextCursor === \"\"),\n getItems: (response) => response?.data ?? [],\n loadPage: (response) => {\n return list(core.setObjectProperty(request, \"cursor\", response?.nextCursor));\n },\n });\n }\n\n /**\n * Box com nome (cloud_box). S\u00F3 chave (nunca token de usu\u00E1rio).\n *\n * @param {SmoothAgentApi.MachinesCreateRequest} request\n * @param {MachinesClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.machines.create({\n * userId: \"userId\",\n * name: \"name\"\n * })\n */\n public create(\n request: SmoothAgentApi.MachinesCreateRequest,\n requestOptions?: MachinesClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.Machine> {\n return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));\n }\n\n private async __create(\n request: SmoothAgentApi.MachinesCreateRequest,\n requestOptions?: MachinesClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.Machine>> {\n const { \"SmoothAgent-Workspace\": smoothAgentWorkspace, \"Idempotency-Key\": idempotencyKey, ..._body } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n \"SmoothAgent-Workspace\": smoothAgentWorkspace,\n \"Idempotency-Key\": idempotencyKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n \"machines\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n requestType: \"json\",\n body: mergeAdditionalBodyParameters(_body, requestOptions?.additionalBodyParameters),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.Machine, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"POST\", \"/machines\");\n }\n\n /**\n * Gera o c\u00F3digo de pareamento de um computador. Chave (pra um `userId`) OU o pr\u00F3prio usu\u00E1rio\n * na interface do cliente (o login \u00E9 do cliente, nunca nosso). Por CHAVE (pura ou agindo como o usu\u00E1rio) o\n * pareamento emite token pro usu\u00E1rio: exige `tokens:write` e o recorte de agentes da chave (`agents_restricted`).\n *\n * @param {SmoothAgentApi.MachinesPairRequest} request\n * @param {MachinesClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.machines.pair()\n */\n public pair(\n request: SmoothAgentApi.MachinesPairRequest = {},\n requestOptions?: MachinesClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.Pairing> {\n return core.HttpResponsePromise.fromPromise(this.__pair(request, requestOptions));\n }\n\n private async __pair(\n request: SmoothAgentApi.MachinesPairRequest = {},\n requestOptions?: MachinesClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.Pairing>> {\n const { \"SmoothAgent-Workspace\": smoothAgentWorkspace, \"Idempotency-Key\": idempotencyKey, ..._body } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n \"SmoothAgent-Workspace\": smoothAgentWorkspace,\n \"Idempotency-Key\": idempotencyKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n \"machines/pairings\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n requestType: \"json\",\n body: mergeAdditionalBodyParameters(_body, requestOptions?.additionalBodyParameters),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.Pairing, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"POST\", \"/machines/pairings\");\n }\n\n /**\n * @param {SmoothAgentApi.PairingStatusMachinesRequest} request\n * @param {MachinesClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.machines.pairingStatus({\n * code: \"code\"\n * })\n */\n public pairingStatus(\n request: SmoothAgentApi.PairingStatusMachinesRequest,\n requestOptions?: MachinesClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.Pairing> {\n return core.HttpResponsePromise.fromPromise(this.__pairingStatus(request, requestOptions));\n }\n\n private async __pairingStatus(\n request: SmoothAgentApi.PairingStatusMachinesRequest,\n requestOptions?: MachinesClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.Pairing>> {\n const { code } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `machines/pairings/${core.url.encodePathParam(code, errors.SmoothAgentApiError)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.Pairing, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/machines/pairings/{code}\");\n }\n\n /**\n * @param {SmoothAgentApi.MachinesGetRequest} request\n * @param {MachinesClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.machines.get({\n * id: \"id\"\n * })\n */\n public get(\n request: SmoothAgentApi.MachinesGetRequest,\n requestOptions?: MachinesClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.Machine> {\n return core.HttpResponsePromise.fromPromise(this.__get(request, requestOptions));\n }\n\n private async __get(\n request: SmoothAgentApi.MachinesGetRequest,\n requestOptions?: MachinesClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.Machine>> {\n const { id } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `machines/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.Machine, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/machines/{id}\");\n }\n\n /**\n * cloud: apaga inst\u00E2ncia + volume (recusa com `conflict` se tem run vivo). local: despareia e revoga o token do runner.\n *\n * @param {SmoothAgentApi.MachinesDeleteRequest} request\n * @param {MachinesClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.machines.delete({\n * id: \"id\"\n * })\n */\n public delete(\n request: SmoothAgentApi.MachinesDeleteRequest,\n requestOptions?: MachinesClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.Deleted> {\n return core.HttpResponsePromise.fromPromise(this.__delete(request, requestOptions));\n }\n\n private async __delete(\n request: SmoothAgentApi.MachinesDeleteRequest,\n requestOptions?: MachinesClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.Deleted>> {\n const { id } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `machines/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.Deleted, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"DELETE\", \"/machines/{id}\");\n }\n\n /**\n * Mudou o perfil? A box \u00E9 recriada na pr\u00F3xima vez que estiver ociosa (o volume fica).\n *\n * @param {SmoothAgentApi.MachinesUpdateRequest} request\n * @param {MachinesClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.machines.update({\n * id: \"id\"\n * })\n */\n public update(\n request: SmoothAgentApi.MachinesUpdateRequest,\n requestOptions?: MachinesClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.Machine> {\n return core.HttpResponsePromise.fromPromise(this.__update(request, requestOptions));\n }\n\n private async __update(\n request: SmoothAgentApi.MachinesUpdateRequest,\n requestOptions?: MachinesClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.Machine>> {\n const { id, \"If-Match\": ifMatch, ..._body } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"If-Match\": ifMatch }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `machines/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}`,\n ),\n method: \"PATCH\",\n headers: _headers,\n contentType: \"application/json\",\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n requestType: \"json\",\n body: mergeAdditionalBodyParameters(_body, requestOptions?.additionalBodyParameters),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.Machine, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"PATCH\", \"/machines/{id}\");\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type { BaseClientOptions, BaseRequestOptions } from \"../../../../BaseClient.js\";\nimport { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from \"../../../../BaseClient.js\";\nimport { mergeHeaders, mergeOnlyDefinedHeaders } from \"../../../../core/headers.js\";\nimport * as core from \"../../../../core/index.js\";\nimport * as environments from \"../../../../environments.js\";\nimport { handleNonStatusCodeError } from \"../../../../errors/handleNonStatusCodeError.js\";\nimport * as errors from \"../../../../errors/index.js\";\nimport * as SmoothAgentApi from \"../../../index.js\";\n\nexport declare namespace ObservabilityClient {\n export type Options = BaseClientOptions;\n\n export interface RequestOptions extends BaseRequestOptions {}\n}\n\nexport class ObservabilityClient {\n protected readonly _options: NormalizedClientOptionsWithAuth<ObservabilityClient.Options>;\n\n constructor(options: ObservabilityClient.Options) {\n this._options = normalizeClientOptionsWithAuth(options);\n }\n\n /**\n * `probeMcp=true` testa cada servidor MCP agora (paridade v2 `mcpHealth`).\n *\n * @param {SmoothAgentApi.AgentObservabilityHealthRequest} request\n * @param {ObservabilityClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.observability.agentObservabilityHealth({\n * id: \"id\"\n * })\n */\n public agentObservabilityHealth(\n request: SmoothAgentApi.AgentObservabilityHealthRequest,\n requestOptions?: ObservabilityClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.AgentHealth> {\n return core.HttpResponsePromise.fromPromise(this.__agentObservabilityHealth(request, requestOptions));\n }\n\n private async __agentObservabilityHealth(\n request: SmoothAgentApi.AgentObservabilityHealthRequest,\n requestOptions?: ObservabilityClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.AgentHealth>> {\n const { id, probeMcp, \"SmoothAgent-Workspace\": smoothAgentWorkspace } = request;\n const _queryParams: Record<string, unknown> = {\n probeMcp,\n };\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-Workspace\": smoothAgentWorkspace }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `agents/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/health`,\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url\n .queryBuilder()\n .addMany(_queryParams)\n .add(\"probeMcp\", _queryParams.probeMcp, { style: \"comma\" })\n .mergeAdditional(requestOptions?.queryParams)\n .build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.AgentHealth, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/agents/{id}/health\");\n }\n\n /**\n * O culpado de cada turno (credencial, provedor, recursos, layer, plataforma, usu\u00E1rio).\n *\n * @param {SmoothAgentApi.ChatObservabilityDiagnoseRequest} request\n * @param {ObservabilityClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.observability.chatObservabilityDiagnose({\n * id: \"id\"\n * })\n */\n public chatObservabilityDiagnose(\n request: SmoothAgentApi.ChatObservabilityDiagnoseRequest,\n requestOptions?: ObservabilityClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.ChatDiagnosis> {\n return core.HttpResponsePromise.fromPromise(this.__chatObservabilityDiagnose(request, requestOptions));\n }\n\n private async __chatObservabilityDiagnose(\n request: SmoothAgentApi.ChatObservabilityDiagnoseRequest,\n requestOptions?: ObservabilityClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.ChatDiagnosis>> {\n const { id, limit, \"SmoothAgent-Workspace\": smoothAgentWorkspace } = request;\n const _queryParams: Record<string, unknown> = {\n limit,\n };\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-Workspace\": smoothAgentWorkspace }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `chats/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/diagnose`,\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url\n .queryBuilder()\n .addMany(_queryParams)\n .add(\"limit\", _queryParams.limit, { style: \"comma\" })\n .mergeAdditional(requestOptions?.queryParams)\n .build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.ChatDiagnosis, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/chats/{id}/diagnose\");\n }\n\n /**\n * Logs da inst\u00E2ncia da box do chat (Detona), mais novo primeiro; `before` pagina pra tr\u00E1s.\n *\n * @param {SmoothAgentApi.ChatObservabilityLogsRequest} request\n * @param {ObservabilityClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.observability.chatObservabilityLogs({\n * id: \"id\"\n * })\n */\n public chatObservabilityLogs(\n request: SmoothAgentApi.ChatObservabilityLogsRequest,\n requestOptions?: ObservabilityClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.LogsPage> {\n return core.HttpResponsePromise.fromPromise(this.__chatObservabilityLogs(request, requestOptions));\n }\n\n private async __chatObservabilityLogs(\n request: SmoothAgentApi.ChatObservabilityLogsRequest,\n requestOptions?: ObservabilityClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.LogsPage>> {\n const {\n id,\n q,\n source,\n from: from_,\n to,\n before,\n limit,\n \"SmoothAgent-Workspace\": smoothAgentWorkspace,\n } = request;\n const _queryParams: Record<string, unknown> = {\n q,\n source,\n from: from_ != null ? from_ : undefined,\n to: to != null ? to : undefined,\n before,\n limit,\n };\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-Workspace\": smoothAgentWorkspace }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `chats/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/logs`,\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url\n .queryBuilder()\n .addMany(_queryParams)\n .add(\"q\", _queryParams.q, { style: \"comma\" })\n .add(\"source\", _queryParams.source, { style: \"comma\" })\n .add(\"from\", _queryParams.from, { style: \"comma\" })\n .add(\"to\", _queryParams.to, { style: \"comma\" })\n .add(\"before\", _queryParams.before, { style: \"comma\" })\n .add(\"limit\", _queryParams.limit, { style: \"comma\" })\n .mergeAdditional(requestOptions?.queryParams)\n .build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.LogsPage, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/chats/{id}/logs\");\n }\n\n /**\n * CPU/mem\u00F3ria/IO/rede da box do chat.\n *\n * @param {SmoothAgentApi.ChatObservabilityMetricsRequest} request\n * @param {ObservabilityClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.observability.chatObservabilityMetrics({\n * id: \"id\"\n * })\n */\n public chatObservabilityMetrics(\n request: SmoothAgentApi.ChatObservabilityMetricsRequest,\n requestOptions?: ObservabilityClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.MetricsPage> {\n return core.HttpResponsePromise.fromPromise(this.__chatObservabilityMetrics(request, requestOptions));\n }\n\n private async __chatObservabilityMetrics(\n request: SmoothAgentApi.ChatObservabilityMetricsRequest,\n requestOptions?: ObservabilityClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.MetricsPage>> {\n const { id, from: from_, to, \"SmoothAgent-Workspace\": smoothAgentWorkspace } = request;\n const _queryParams: Record<string, unknown> = {\n from: from_ != null ? from_ : undefined,\n to: to != null ? to : undefined,\n };\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-Workspace\": smoothAgentWorkspace }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `chats/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/metrics`,\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url\n .queryBuilder()\n .addMany(_queryParams)\n .add(\"from\", _queryParams.from, { style: \"comma\" })\n .add(\"to\", _queryParams.to, { style: \"comma\" })\n .mergeAdditional(requestOptions?.queryParams)\n .build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.MetricsPage, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/chats/{id}/metrics\");\n }\n\n /**\n * O que mudou no runtime e quantas boxes do workspace j\u00E1 convergiram (paridade v2 `releases.list`).\n *\n * @param {SmoothAgentApi.ReleasesListRequest} request\n * @param {ObservabilityClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.observability.releasesList()\n */\n public releasesList(\n request: SmoothAgentApi.ReleasesListRequest = {},\n requestOptions?: ObservabilityClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.ReleasesStatus> {\n return core.HttpResponsePromise.fromPromise(this.__releasesList(request, requestOptions));\n }\n\n private async __releasesList(\n request: SmoothAgentApi.ReleasesListRequest = {},\n requestOptions?: ObservabilityClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.ReleasesStatus>> {\n const { \"SmoothAgent-Workspace\": smoothAgentWorkspace } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-Workspace\": smoothAgentWorkspace }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n \"releases\",\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.ReleasesStatus, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/releases\");\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type { BaseClientOptions, BaseRequestOptions } from \"../../../../BaseClient.js\";\nimport { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from \"../../../../BaseClient.js\";\nimport { mergeHeaders, mergeOnlyDefinedHeaders } from \"../../../../core/headers.js\";\nimport * as core from \"../../../../core/index.js\";\nimport { mergeAdditionalBodyParameters } from \"../../../../core/requestBody.js\";\nimport * as environments from \"../../../../environments.js\";\nimport { handleNonStatusCodeError } from \"../../../../errors/handleNonStatusCodeError.js\";\nimport * as errors from \"../../../../errors/index.js\";\nimport * as SmoothAgentApi from \"../../../index.js\";\n\nexport declare namespace ProvidersClient {\n export type Options = BaseClientOptions;\n\n export interface RequestOptions extends BaseRequestOptions {}\n}\n\nexport class ProvidersClient {\n protected readonly _options: NormalizedClientOptionsWithAuth<ProvidersClient.Options>;\n\n constructor(options: ProvidersClient.Options) {\n this._options = normalizeClientOptionsWithAuth(options);\n }\n\n /**\n * @param {SmoothAgentApi.MyProvidersListRequest} request\n * @param {ProvidersClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.providers.myProvidersList()\n */\n public myProvidersList(\n request: SmoothAgentApi.MyProvidersListRequest = {},\n requestOptions?: ProvidersClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.MyProvidersListResponse> {\n return core.HttpResponsePromise.fromPromise(this.__myProvidersList(request, requestOptions));\n }\n\n private async __myProvidersList(\n request: SmoothAgentApi.MyProvidersListRequest = {},\n requestOptions?: ProvidersClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.MyProvidersListResponse>> {\n const { \"SmoothAgent-As-User\": smoothAgentAsUser } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n \"me/providers\",\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return {\n data: _response.body as SmoothAgentApi.MyProvidersListResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/me/providers\");\n }\n\n /**\n * Poll do device flow (a box avisa quando capturou o auth.json).\n *\n * @param {SmoothAgentApi.MyProvidersLoginStatusRequest} request\n * @param {ProvidersClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.providers.myProvidersLoginStatus({\n * loginId: \"loginId\"\n * })\n */\n public myProvidersLoginStatus(\n request: SmoothAgentApi.MyProvidersLoginStatusRequest,\n requestOptions?: ProvidersClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.LoginStatus> {\n return core.HttpResponsePromise.fromPromise(this.__myProvidersLoginStatus(request, requestOptions));\n }\n\n private async __myProvidersLoginStatus(\n request: SmoothAgentApi.MyProvidersLoginStatusRequest,\n requestOptions?: ProvidersClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.LoginStatus>> {\n const { loginId, \"SmoothAgent-As-User\": smoothAgentAsUser } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `me/providers/logins/${core.url.encodePathParam(loginId, errors.SmoothAgentApiError)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.LoginStatus, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(\n _response.error,\n _response.rawResponse,\n \"GET\",\n \"/me/providers/logins/{loginId}\",\n );\n }\n\n /**\n * S\u00F3 OAuth: o c\u00F3digo colado pelo usu\u00E1rio.\n *\n * @param {SmoothAgentApi.MyProvidersCompleteRequest} request\n * @param {ProvidersClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.providers.myProvidersComplete({\n * loginId: \"loginId\",\n * code: \"code\"\n * })\n */\n public myProvidersComplete(\n request: SmoothAgentApi.MyProvidersCompleteRequest,\n requestOptions?: ProvidersClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.ProviderStatus> {\n return core.HttpResponsePromise.fromPromise(this.__myProvidersComplete(request, requestOptions));\n }\n\n private async __myProvidersComplete(\n request: SmoothAgentApi.MyProvidersCompleteRequest,\n requestOptions?: ProvidersClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.ProviderStatus>> {\n const {\n loginId,\n \"SmoothAgent-As-User\": smoothAgentAsUser,\n \"Idempotency-Key\": idempotencyKey,\n ..._body\n } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser, \"Idempotency-Key\": idempotencyKey }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `me/providers/logins/${core.url.encodePathParam(loginId, errors.SmoothAgentApiError)}/complete`,\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n requestType: \"json\",\n body: mergeAdditionalBodyParameters(_body, requestOptions?.additionalBodyParameters),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.ProviderStatus, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(\n _response.error,\n _response.rawResponse,\n \"POST\",\n \"/me/providers/logins/{loginId}/complete\",\n );\n }\n\n /**\n * @param {SmoothAgentApi.MyProvidersDisconnectRequest} request\n * @param {ProvidersClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.providers.myProvidersDisconnect({\n * provider: \"claude\"\n * })\n */\n public myProvidersDisconnect(\n request: SmoothAgentApi.MyProvidersDisconnectRequest,\n requestOptions?: ProvidersClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.ProviderStatus> {\n return core.HttpResponsePromise.fromPromise(this.__myProvidersDisconnect(request, requestOptions));\n }\n\n private async __myProvidersDisconnect(\n request: SmoothAgentApi.MyProvidersDisconnectRequest,\n requestOptions?: ProvidersClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.ProviderStatus>> {\n const { provider, via, \"SmoothAgent-As-User\": smoothAgentAsUser } = request;\n const _queryParams: Record<string, unknown> = {\n via: via != null ? via : undefined,\n };\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `me/providers/${core.url.encodePathParam(provider, errors.SmoothAgentApiError)}`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryString: core.url\n .queryBuilder()\n .addMany(_queryParams)\n .add(\"via\", _queryParams.via, { style: \"comma\" })\n .mergeAdditional(requestOptions?.queryParams)\n .build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.ProviderStatus, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"DELETE\", \"/me/providers/{provider}\");\n }\n\n /**\n * Abre o fluxo. Claude \u2192 `oauth`; Codex \u2192 `device`.\n *\n * @param {SmoothAgentApi.MyProvidersConnectRequest} request\n * @param {ProvidersClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.providers.myProvidersConnect({\n * provider: \"claude\"\n * })\n */\n public myProvidersConnect(\n request: SmoothAgentApi.MyProvidersConnectRequest,\n requestOptions?: ProvidersClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.MyProvidersConnectResponse> {\n return core.HttpResponsePromise.fromPromise(this.__myProvidersConnect(request, requestOptions));\n }\n\n private async __myProvidersConnect(\n request: SmoothAgentApi.MyProvidersConnectRequest,\n requestOptions?: ProvidersClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.MyProvidersConnectResponse>> {\n const { provider, \"SmoothAgent-As-User\": smoothAgentAsUser, \"Idempotency-Key\": idempotencyKey } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser, \"Idempotency-Key\": idempotencyKey }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `me/providers/${core.url.encodePathParam(provider, errors.SmoothAgentApiError)}/connect`,\n ),\n method: \"POST\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return {\n data: _response.body as SmoothAgentApi.MyProvidersConnectResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(\n _response.error,\n _response.rawResponse,\n \"POST\",\n \"/me/providers/{provider}/connect\",\n );\n }\n\n /**\n * Chave pr\u00F3pria. Validada pelo prefixo E por uma chamada barata ao provedor.\n *\n * @param {SmoothAgentApi.MyProvidersSetKeyRequest} request\n * @param {ProvidersClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.providers.myProvidersSetKey({\n * provider: \"claude\",\n * key: \"key\"\n * })\n */\n public myProvidersSetKey(\n request: SmoothAgentApi.MyProvidersSetKeyRequest,\n requestOptions?: ProvidersClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.ProviderStatus> {\n return core.HttpResponsePromise.fromPromise(this.__myProvidersSetKey(request, requestOptions));\n }\n\n private async __myProvidersSetKey(\n request: SmoothAgentApi.MyProvidersSetKeyRequest,\n requestOptions?: ProvidersClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.ProviderStatus>> {\n const { provider, \"SmoothAgent-As-User\": smoothAgentAsUser, ..._body } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `me/providers/${core.url.encodePathParam(provider, errors.SmoothAgentApiError)}/key`,\n ),\n method: \"PUT\",\n headers: _headers,\n contentType: \"application/json\",\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n requestType: \"json\",\n body: mergeAdditionalBodyParameters(_body, requestOptions?.additionalBodyParameters),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.ProviderStatus, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"PUT\", \"/me/providers/{provider}/key\");\n }\n\n /**\n * Janelas de uso da assinatura/chave (o que o provedor informa; ausente nunca \u00E9 estimado).\n *\n * @param {SmoothAgentApi.MyProvidersLimitsRequest} request\n * @param {ProvidersClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.providers.myProvidersLimits({\n * provider: \"claude\"\n * })\n */\n public myProvidersLimits(\n request: SmoothAgentApi.MyProvidersLimitsRequest,\n requestOptions?: ProvidersClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.ProviderLimits> {\n return core.HttpResponsePromise.fromPromise(this.__myProvidersLimits(request, requestOptions));\n }\n\n private async __myProvidersLimits(\n request: SmoothAgentApi.MyProvidersLimitsRequest,\n requestOptions?: ProvidersClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.ProviderLimits>> {\n const { provider, \"SmoothAgent-As-User\": smoothAgentAsUser } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-As-User\": smoothAgentAsUser }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `me/providers/${core.url.encodePathParam(provider, errors.SmoothAgentApiError)}/limits`,\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.ProviderLimits, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(\n _response.error,\n _response.rawResponse,\n \"GET\",\n \"/me/providers/{provider}/limits\",\n );\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type { BaseClientOptions, BaseRequestOptions } from \"../../../../BaseClient.js\";\nimport { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from \"../../../../BaseClient.js\";\nimport { mergeHeaders, mergeOnlyDefinedHeaders } from \"../../../../core/headers.js\";\nimport * as core from \"../../../../core/index.js\";\nimport * as environments from \"../../../../environments.js\";\nimport { handleNonStatusCodeError } from \"../../../../errors/handleNonStatusCodeError.js\";\nimport * as errors from \"../../../../errors/index.js\";\nimport * as SmoothAgentApi from \"../../../index.js\";\n\nexport declare namespace RunsClient {\n export type Options = BaseClientOptions;\n\n export interface RequestOptions extends BaseRequestOptions {}\n}\n\nexport class RunsClient {\n protected readonly _options: NormalizedClientOptionsWithAuth<RunsClient.Options>;\n\n constructor(options: RunsClient.Options) {\n this._options = normalizeClientOptionsWithAuth(options);\n }\n\n /**\n * Todos os runs do workspace, mais novo primeiro. `from`/`to` filtram pelo in\u00EDcio do run (ISO).\n * Chave com recorte de agentes s\u00F3 v\u00EA os runs desses agentes.\n *\n * @param {SmoothAgentApi.RunsListRequest} request\n * @param {RunsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.runs.list()\n */\n public async list(\n request: SmoothAgentApi.RunsListRequest = {},\n requestOptions?: RunsClient.RequestOptions,\n ): Promise<core.Page<SmoothAgentApi.WorkspaceRun, SmoothAgentApi.RunsListResponse>> {\n const list = core.HttpResponsePromise.interceptFunction(\n async (\n request: SmoothAgentApi.RunsListRequest,\n ): Promise<core.WithRawResponse<SmoothAgentApi.RunsListResponse>> => {\n const {\n limit,\n cursor,\n agentId,\n userId,\n status,\n from: from_,\n to,\n \"SmoothAgent-Workspace\": smoothAgentWorkspace,\n } = request;\n const _queryParams: Record<string, unknown> = {\n limit,\n cursor,\n agentId,\n userId,\n status: status != null ? status : undefined,\n from: from_ != null ? from_ : undefined,\n to: to != null ? to : undefined,\n };\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-Workspace\": smoothAgentWorkspace }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n \"runs\",\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url\n .queryBuilder()\n .addMany(_queryParams)\n .add(\"limit\", _queryParams.limit, { style: \"comma\" })\n .add(\"cursor\", _queryParams.cursor, { style: \"comma\" })\n .add(\"agentId\", _queryParams.agentId, { style: \"comma\" })\n .add(\"userId\", _queryParams.userId, { style: \"comma\" })\n .add(\"status\", _queryParams.status, { style: \"comma\" })\n .add(\"from\", _queryParams.from, { style: \"comma\" })\n .add(\"to\", _queryParams.to, { style: \"comma\" })\n .mergeAdditional(requestOptions?.queryParams)\n .build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return {\n data: _response.body as SmoothAgentApi.RunsListResponse,\n rawResponse: _response.rawResponse,\n };\n }\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/runs\");\n },\n );\n const dataWithRawResponse = await list(request).withRawResponse();\n return new core.Page<SmoothAgentApi.WorkspaceRun, SmoothAgentApi.RunsListResponse>({\n response: dataWithRawResponse.data,\n rawResponse: dataWithRawResponse.rawResponse,\n hasNextPage: (response) =>\n response?.nextCursor != null &&\n !(typeof response?.nextCursor === \"string\" && response?.nextCursor === \"\"),\n getItems: (response) => response?.data ?? [],\n loadPage: (response) => {\n return list(core.setObjectProperty(request, \"cursor\", response?.nextCursor));\n },\n });\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type { BaseClientOptions, BaseRequestOptions } from \"../../../../BaseClient.js\";\nimport { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from \"../../../../BaseClient.js\";\nimport { mergeHeaders, mergeOnlyDefinedHeaders } from \"../../../../core/headers.js\";\nimport * as core from \"../../../../core/index.js\";\nimport { mergeAdditionalBodyParameters } from \"../../../../core/requestBody.js\";\nimport * as environments from \"../../../../environments.js\";\nimport { handleNonStatusCodeError } from \"../../../../errors/handleNonStatusCodeError.js\";\nimport * as errors from \"../../../../errors/index.js\";\nimport * as SmoothAgentApi from \"../../../index.js\";\n\nexport declare namespace SecretsClient {\n export type Options = BaseClientOptions;\n\n export interface RequestOptions extends BaseRequestOptions {}\n}\n\nexport class SecretsClient {\n protected readonly _options: NormalizedClientOptionsWithAuth<SecretsClient.Options>;\n\n constructor(options: SecretsClient.Options) {\n this._options = normalizeClientOptionsWithAuth(options);\n }\n\n /**\n * @param {SmoothAgentApi.SecretsListRequest} request\n * @param {SecretsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.secrets.list()\n */\n public async list(\n request: SmoothAgentApi.SecretsListRequest = {},\n requestOptions?: SecretsClient.RequestOptions,\n ): Promise<core.Page<SmoothAgentApi.SecretInfo, SmoothAgentApi.SecretsListResponse>> {\n const list = core.HttpResponsePromise.interceptFunction(\n async (\n request: SmoothAgentApi.SecretsListRequest,\n ): Promise<core.WithRawResponse<SmoothAgentApi.SecretsListResponse>> => {\n const { limit, cursor, \"SmoothAgent-Workspace\": smoothAgentWorkspace } = request;\n const _queryParams: Record<string, unknown> = {\n limit,\n cursor,\n };\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-Workspace\": smoothAgentWorkspace }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n \"secrets\",\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url\n .queryBuilder()\n .addMany(_queryParams)\n .add(\"limit\", _queryParams.limit, { style: \"comma\" })\n .add(\"cursor\", _queryParams.cursor, { style: \"comma\" })\n .mergeAdditional(requestOptions?.queryParams)\n .build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return {\n data: _response.body as SmoothAgentApi.SecretsListResponse,\n rawResponse: _response.rawResponse,\n };\n }\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/secrets\");\n },\n );\n const dataWithRawResponse = await list(request).withRawResponse();\n return new core.Page<SmoothAgentApi.SecretInfo, SmoothAgentApi.SecretsListResponse>({\n response: dataWithRawResponse.data,\n rawResponse: dataWithRawResponse.rawResponse,\n hasNextPage: (response) =>\n response?.nextCursor != null &&\n !(typeof response?.nextCursor === \"string\" && response?.nextCursor === \"\"),\n getItems: (response) => response?.data ?? [],\n loadPage: (response) => {\n return list(core.setObjectProperty(request, \"cursor\", response?.nextCursor));\n },\n });\n }\n\n /**\n * @param {SmoothAgentApi.SecretsSetRequest} request\n * @param {SecretsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.secrets.set({\n * name: \"name\",\n * value: \"value\"\n * })\n */\n public set(\n request: SmoothAgentApi.SecretsSetRequest,\n requestOptions?: SecretsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.SecretInfo> {\n return core.HttpResponsePromise.fromPromise(this.__set(request, requestOptions));\n }\n\n private async __set(\n request: SmoothAgentApi.SecretsSetRequest,\n requestOptions?: SecretsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.SecretInfo>> {\n const { name, \"SmoothAgent-Workspace\": smoothAgentWorkspace, ..._body } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-Workspace\": smoothAgentWorkspace }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `secrets/${core.url.encodePathParam(name, errors.SmoothAgentApiError)}`,\n ),\n method: \"PUT\",\n headers: _headers,\n contentType: \"application/json\",\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n requestType: \"json\",\n body: mergeAdditionalBodyParameters(_body, requestOptions?.additionalBodyParameters),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.SecretInfo, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"PUT\", \"/secrets/{name}\");\n }\n\n /**\n * @param {SmoothAgentApi.SecretsDeleteRequest} request\n * @param {SecretsClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.secrets.delete({\n * name: \"name\"\n * })\n */\n public delete(\n request: SmoothAgentApi.SecretsDeleteRequest,\n requestOptions?: SecretsClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.Deleted> {\n return core.HttpResponsePromise.fromPromise(this.__delete(request, requestOptions));\n }\n\n private async __delete(\n request: SmoothAgentApi.SecretsDeleteRequest,\n requestOptions?: SecretsClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.Deleted>> {\n const { name, \"SmoothAgent-Workspace\": smoothAgentWorkspace } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-Workspace\": smoothAgentWorkspace }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `secrets/${core.url.encodePathParam(name, errors.SmoothAgentApiError)}`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.Deleted, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"DELETE\", \"/secrets/{name}\");\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type { BaseClientOptions, BaseRequestOptions } from \"../../../../BaseClient.js\";\nimport { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from \"../../../../BaseClient.js\";\nimport { mergeHeaders, mergeOnlyDefinedHeaders } from \"../../../../core/headers.js\";\nimport * as core from \"../../../../core/index.js\";\nimport { mergeAdditionalBodyParameters } from \"../../../../core/requestBody.js\";\nimport * as environments from \"../../../../environments.js\";\nimport { handleNonStatusCodeError } from \"../../../../errors/handleNonStatusCodeError.js\";\nimport * as errors from \"../../../../errors/index.js\";\nimport * as SmoothAgentApi from \"../../../index.js\";\n\nexport declare namespace UsersClient {\n export type Options = BaseClientOptions;\n\n export interface RequestOptions extends BaseRequestOptions {}\n}\n\nexport class UsersClient {\n protected readonly _options: NormalizedClientOptionsWithAuth<UsersClient.Options>;\n\n constructor(options: UsersClient.Options) {\n this._options = normalizeClientOptionsWithAuth(options);\n }\n\n /**\n * @param {SmoothAgentApi.UsersListRequest} request\n * @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.users.list()\n */\n public async list(\n request: SmoothAgentApi.UsersListRequest = {},\n requestOptions?: UsersClient.RequestOptions,\n ): Promise<core.Page<SmoothAgentApi.User, SmoothAgentApi.UsersListResponse>> {\n const list = core.HttpResponsePromise.interceptFunction(\n async (\n request: SmoothAgentApi.UsersListRequest,\n ): Promise<core.WithRawResponse<SmoothAgentApi.UsersListResponse>> => {\n const { limit, cursor, agentId, \"SmoothAgent-Workspace\": smoothAgentWorkspace } = request;\n const _queryParams: Record<string, unknown> = {\n limit,\n cursor,\n agentId,\n };\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-Workspace\": smoothAgentWorkspace }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n \"users\",\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url\n .queryBuilder()\n .addMany(_queryParams)\n .add(\"limit\", _queryParams.limit, { style: \"comma\" })\n .add(\"cursor\", _queryParams.cursor, { style: \"comma\" })\n .add(\"agentId\", _queryParams.agentId, { style: \"comma\" })\n .mergeAdditional(requestOptions?.queryParams)\n .build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return {\n data: _response.body as SmoothAgentApi.UsersListResponse,\n rawResponse: _response.rawResponse,\n };\n }\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/users\");\n },\n );\n const dataWithRawResponse = await list(request).withRawResponse();\n return new core.Page<SmoothAgentApi.User, SmoothAgentApi.UsersListResponse>({\n response: dataWithRawResponse.data,\n rawResponse: dataWithRawResponse.rawResponse,\n hasNextPage: (response) =>\n response?.nextCursor != null &&\n !(typeof response?.nextCursor === \"string\" && response?.nextCursor === \"\"),\n getItems: (response) => response?.data ?? [],\n loadPage: (response) => {\n return list(core.setObjectProperty(request, \"cursor\", response?.nextCursor));\n },\n });\n }\n\n /**\n * Idempotente pelo `id` (upsert): criar um usu\u00E1rio que j\u00E1 existe devolve o existente.\n *\n * @param {SmoothAgentApi.UsersCreateRequest} request\n * @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.users.create({\n * id: \"id\"\n * })\n */\n public create(\n request: SmoothAgentApi.UsersCreateRequest,\n requestOptions?: UsersClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.User> {\n return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));\n }\n\n private async __create(\n request: SmoothAgentApi.UsersCreateRequest,\n requestOptions?: UsersClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.User>> {\n const { \"SmoothAgent-Workspace\": smoothAgentWorkspace, \"Idempotency-Key\": idempotencyKey, ..._body } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n \"SmoothAgent-Workspace\": smoothAgentWorkspace,\n \"Idempotency-Key\": idempotencyKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n \"users\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n requestType: \"json\",\n body: mergeAdditionalBodyParameters(_body, requestOptions?.additionalBodyParameters),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.User, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"POST\", \"/users\");\n }\n\n /**\n * @param {SmoothAgentApi.UsersGetRequest} request\n * @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.users.get({\n * userId: \"userId\"\n * })\n */\n public get(\n request: SmoothAgentApi.UsersGetRequest,\n requestOptions?: UsersClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.User> {\n return core.HttpResponsePromise.fromPromise(this.__get(request, requestOptions));\n }\n\n private async __get(\n request: SmoothAgentApi.UsersGetRequest,\n requestOptions?: UsersClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.User>> {\n const { userId, \"SmoothAgent-Workspace\": smoothAgentWorkspace } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-Workspace\": smoothAgentWorkspace }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `users/${core.url.encodePathParam(userId, errors.SmoothAgentApiError)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.User, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/users/{userId}\");\n }\n\n /**\n * Apaga o usu\u00E1rio, os tokens, os grants, as credenciais de provedor dele e os chats.\n *\n * @param {SmoothAgentApi.UsersDeleteRequest} request\n * @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.users.delete({\n * userId: \"userId\"\n * })\n */\n public delete(\n request: SmoothAgentApi.UsersDeleteRequest,\n requestOptions?: UsersClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.Deleted> {\n return core.HttpResponsePromise.fromPromise(this.__delete(request, requestOptions));\n }\n\n private async __delete(\n request: SmoothAgentApi.UsersDeleteRequest,\n requestOptions?: UsersClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.Deleted>> {\n const { userId, \"SmoothAgent-Workspace\": smoothAgentWorkspace } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-Workspace\": smoothAgentWorkspace }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `users/${core.url.encodePathParam(userId, errors.SmoothAgentApiError)}`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.Deleted, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"DELETE\", \"/users/{userId}\");\n }\n\n /**\n * @param {SmoothAgentApi.UsersUpdateRequest} request\n * @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.users.update({\n * userId: \"userId\"\n * })\n */\n public update(\n request: SmoothAgentApi.UsersUpdateRequest,\n requestOptions?: UsersClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.User> {\n return core.HttpResponsePromise.fromPromise(this.__update(request, requestOptions));\n }\n\n private async __update(\n request: SmoothAgentApi.UsersUpdateRequest,\n requestOptions?: UsersClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.User>> {\n const { userId, \"SmoothAgent-Workspace\": smoothAgentWorkspace, ..._body } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-Workspace\": smoothAgentWorkspace }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `users/${core.url.encodePathParam(userId, errors.SmoothAgentApiError)}`,\n ),\n method: \"PATCH\",\n headers: _headers,\n contentType: \"application/json\",\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n requestType: \"json\",\n body: mergeAdditionalBodyParameters(_body, requestOptions?.additionalBodyParameters),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.User, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"PATCH\", \"/users/{userId}\");\n }\n\n /**\n * @param {SmoothAgentApi.GrantsListRequest} request\n * @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.users.grantsList({\n * userId: \"userId\"\n * })\n */\n public async grantsList(\n request: SmoothAgentApi.GrantsListRequest,\n requestOptions?: UsersClient.RequestOptions,\n ): Promise<core.Page<SmoothAgentApi.Grant, SmoothAgentApi.GrantsListResponse>> {\n const list = core.HttpResponsePromise.interceptFunction(\n async (\n request: SmoothAgentApi.GrantsListRequest,\n ): Promise<core.WithRawResponse<SmoothAgentApi.GrantsListResponse>> => {\n const { userId, limit, cursor, \"SmoothAgent-Workspace\": smoothAgentWorkspace } = request;\n const _queryParams: Record<string, unknown> = {\n limit,\n cursor,\n };\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-Workspace\": smoothAgentWorkspace }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `users/${core.url.encodePathParam(userId, errors.SmoothAgentApiError)}/grants`,\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url\n .queryBuilder()\n .addMany(_queryParams)\n .add(\"limit\", _queryParams.limit, { style: \"comma\" })\n .add(\"cursor\", _queryParams.cursor, { style: \"comma\" })\n .mergeAdditional(requestOptions?.queryParams)\n .build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return {\n data: _response.body as SmoothAgentApi.GrantsListResponse,\n rawResponse: _response.rawResponse,\n };\n }\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n return handleNonStatusCodeError(\n _response.error,\n _response.rawResponse,\n \"GET\",\n \"/users/{userId}/grants\",\n );\n },\n );\n const dataWithRawResponse = await list(request).withRawResponse();\n return new core.Page<SmoothAgentApi.Grant, SmoothAgentApi.GrantsListResponse>({\n response: dataWithRawResponse.data,\n rawResponse: dataWithRawResponse.rawResponse,\n hasNextPage: (response) =>\n response?.nextCursor != null &&\n !(typeof response?.nextCursor === \"string\" && response?.nextCursor === \"\"),\n getItems: (response) => response?.data ?? [],\n loadPage: (response) => {\n return list(core.setObjectProperty(request, \"cursor\", response?.nextCursor));\n },\n });\n }\n\n /**\n * Vale NA HORA, sem token novo.\n *\n * @param {SmoothAgentApi.GrantsGrantRequest} request\n * @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.users.grantsGrant({\n * userId: \"userId\",\n * agentId: \"agentId\"\n * })\n */\n public grantsGrant(\n request: SmoothAgentApi.GrantsGrantRequest,\n requestOptions?: UsersClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.Grant> {\n return core.HttpResponsePromise.fromPromise(this.__grantsGrant(request, requestOptions));\n }\n\n private async __grantsGrant(\n request: SmoothAgentApi.GrantsGrantRequest,\n requestOptions?: UsersClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.Grant>> {\n const { userId, agentId, \"SmoothAgent-Workspace\": smoothAgentWorkspace } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-Workspace\": smoothAgentWorkspace }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `users/${core.url.encodePathParam(userId, errors.SmoothAgentApiError)}/grants/${core.url.encodePathParam(agentId, errors.SmoothAgentApiError)}`,\n ),\n method: \"PUT\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.Grant, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(\n _response.error,\n _response.rawResponse,\n \"PUT\",\n \"/users/{userId}/grants/{agentId}\",\n );\n }\n\n /**\n * @param {SmoothAgentApi.GrantsRevokeRequest} request\n * @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.users.grantsRevoke({\n * userId: \"userId\",\n * agentId: \"agentId\"\n * })\n */\n public grantsRevoke(\n request: SmoothAgentApi.GrantsRevokeRequest,\n requestOptions?: UsersClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.Deleted> {\n return core.HttpResponsePromise.fromPromise(this.__grantsRevoke(request, requestOptions));\n }\n\n private async __grantsRevoke(\n request: SmoothAgentApi.GrantsRevokeRequest,\n requestOptions?: UsersClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.Deleted>> {\n const { userId, agentId, \"SmoothAgent-Workspace\": smoothAgentWorkspace } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-Workspace\": smoothAgentWorkspace }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `users/${core.url.encodePathParam(userId, errors.SmoothAgentApiError)}/grants/${core.url.encodePathParam(agentId, errors.SmoothAgentApiError)}`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.Deleted, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(\n _response.error,\n _response.rawResponse,\n \"DELETE\",\n \"/users/{userId}/grants/{agentId}\",\n );\n }\n\n /**\n * Os dispositivos com sess\u00E3o ativa.\n *\n * @param {SmoothAgentApi.UserTokensListRequest} request\n * @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.users.userTokensList({\n * userId: \"userId\"\n * })\n */\n public async userTokensList(\n request: SmoothAgentApi.UserTokensListRequest,\n requestOptions?: UsersClient.RequestOptions,\n ): Promise<core.Page<SmoothAgentApi.UserSession, SmoothAgentApi.UserTokensListResponse>> {\n const list = core.HttpResponsePromise.interceptFunction(\n async (\n request: SmoothAgentApi.UserTokensListRequest,\n ): Promise<core.WithRawResponse<SmoothAgentApi.UserTokensListResponse>> => {\n const { userId, limit, cursor, \"SmoothAgent-Workspace\": smoothAgentWorkspace } = request;\n const _queryParams: Record<string, unknown> = {\n limit,\n cursor,\n };\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-Workspace\": smoothAgentWorkspace }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `users/${core.url.encodePathParam(userId, errors.SmoothAgentApiError)}/tokens`,\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url\n .queryBuilder()\n .addMany(_queryParams)\n .add(\"limit\", _queryParams.limit, { style: \"comma\" })\n .add(\"cursor\", _queryParams.cursor, { style: \"comma\" })\n .mergeAdditional(requestOptions?.queryParams)\n .build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return {\n data: _response.body as SmoothAgentApi.UserTokensListResponse,\n rawResponse: _response.rawResponse,\n };\n }\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n return handleNonStatusCodeError(\n _response.error,\n _response.rawResponse,\n \"GET\",\n \"/users/{userId}/tokens\",\n );\n },\n );\n const dataWithRawResponse = await list(request).withRawResponse();\n return new core.Page<SmoothAgentApi.UserSession, SmoothAgentApi.UserTokensListResponse>({\n response: dataWithRawResponse.data,\n rawResponse: dataWithRawResponse.rawResponse,\n hasNextPage: (response) =>\n response?.nextCursor != null &&\n !(typeof response?.nextCursor === \"string\" && response?.nextCursor === \"\"),\n getItems: (response) => response?.data ?? [],\n loadPage: (response) => {\n return list(core.setObjectProperty(request, \"cursor\", response?.nextCursor));\n },\n });\n }\n\n /**\n * Cria o usu\u00E1rio se n\u00E3o existir (o caminho de 1 chamada do backend do dev).\n *\n * @param {SmoothAgentApi.CreateUserToken} request\n * @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.users.userTokensCreate({\n * userId: \"userId\",\n * device: \"device\"\n * })\n */\n public userTokensCreate(\n request: SmoothAgentApi.CreateUserToken,\n requestOptions?: UsersClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.UserToken> {\n return core.HttpResponsePromise.fromPromise(this.__userTokensCreate(request, requestOptions));\n }\n\n private async __userTokensCreate(\n request: SmoothAgentApi.CreateUserToken,\n requestOptions?: UsersClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.UserToken>> {\n const {\n userId,\n \"SmoothAgent-Workspace\": smoothAgentWorkspace,\n \"Idempotency-Key\": idempotencyKey,\n ..._body\n } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n \"SmoothAgent-Workspace\": smoothAgentWorkspace,\n \"Idempotency-Key\": idempotencyKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `users/${core.url.encodePathParam(userId, errors.SmoothAgentApiError)}/tokens`,\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n requestType: \"json\",\n body: mergeAdditionalBodyParameters(_body, requestOptions?.additionalBodyParameters),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.UserToken, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"POST\", \"/users/{userId}/tokens\");\n }\n\n /**\n * Revoga TODOS (sobe o `v` do usu\u00E1rio).\n *\n * @param {SmoothAgentApi.UserTokensRevokeAllRequest} request\n * @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.users.userTokensRevokeAll({\n * userId: \"userId\"\n * })\n */\n public userTokensRevokeAll(\n request: SmoothAgentApi.UserTokensRevokeAllRequest,\n requestOptions?: UsersClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.UserTokensRevokeAllResponse> {\n return core.HttpResponsePromise.fromPromise(this.__userTokensRevokeAll(request, requestOptions));\n }\n\n private async __userTokensRevokeAll(\n request: SmoothAgentApi.UserTokensRevokeAllRequest,\n requestOptions?: UsersClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.UserTokensRevokeAllResponse>> {\n const { userId, \"SmoothAgent-Workspace\": smoothAgentWorkspace, \"Idempotency-Key\": idempotencyKey } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n \"SmoothAgent-Workspace\": smoothAgentWorkspace,\n \"Idempotency-Key\": idempotencyKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `users/${core.url.encodePathParam(userId, errors.SmoothAgentApiError)}/tokens/revoke-all`,\n ),\n method: \"POST\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return {\n data: _response.body as SmoothAgentApi.UserTokensRevokeAllResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(\n _response.error,\n _response.rawResponse,\n \"POST\",\n \"/users/{userId}/tokens/revoke-all\",\n );\n }\n\n /**\n * Revoga UM dispositivo; os outros seguem. As conex\u00F5es ao vivo dele caem (4401).\n *\n * @param {SmoothAgentApi.UserTokensRevokeRequest} request\n * @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.users.userTokensRevoke({\n * userId: \"userId\",\n * sessionId: \"sessionId\"\n * })\n */\n public userTokensRevoke(\n request: SmoothAgentApi.UserTokensRevokeRequest,\n requestOptions?: UsersClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.Deleted> {\n return core.HttpResponsePromise.fromPromise(this.__userTokensRevoke(request, requestOptions));\n }\n\n private async __userTokensRevoke(\n request: SmoothAgentApi.UserTokensRevokeRequest,\n requestOptions?: UsersClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.Deleted>> {\n const { userId, sessionId, \"SmoothAgent-Workspace\": smoothAgentWorkspace } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-Workspace\": smoothAgentWorkspace }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `users/${core.url.encodePathParam(userId, errors.SmoothAgentApiError)}/tokens/${core.url.encodePathParam(sessionId, errors.SmoothAgentApiError)}`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.Deleted, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(\n _response.error,\n _response.rawResponse,\n \"DELETE\",\n \"/users/{userId}/tokens/{sessionId}\",\n );\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type { BaseClientOptions, BaseRequestOptions } from \"../../../../BaseClient.js\";\nimport { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from \"../../../../BaseClient.js\";\nimport { mergeHeaders, mergeOnlyDefinedHeaders } from \"../../../../core/headers.js\";\nimport * as core from \"../../../../core/index.js\";\nimport { mergeAdditionalBodyParameters } from \"../../../../core/requestBody.js\";\nimport * as environments from \"../../../../environments.js\";\nimport { handleNonStatusCodeError } from \"../../../../errors/handleNonStatusCodeError.js\";\nimport * as errors from \"../../../../errors/index.js\";\nimport * as SmoothAgentApi from \"../../../index.js\";\n\nexport declare namespace WebhooksClient {\n export type Options = BaseClientOptions;\n\n export interface RequestOptions extends BaseRequestOptions {}\n}\n\nexport class WebhooksClient {\n protected readonly _options: NormalizedClientOptionsWithAuth<WebhooksClient.Options>;\n\n constructor(options: WebhooksClient.Options) {\n this._options = normalizeClientOptionsWithAuth(options);\n }\n\n /**\n * @param {SmoothAgentApi.WebhooksListRequest} request\n * @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.webhooks.list()\n */\n public async list(\n request: SmoothAgentApi.WebhooksListRequest = {},\n requestOptions?: WebhooksClient.RequestOptions,\n ): Promise<core.Page<SmoothAgentApi.WebhookEndpoint, SmoothAgentApi.WebhooksListResponse>> {\n const list = core.HttpResponsePromise.interceptFunction(\n async (\n request: SmoothAgentApi.WebhooksListRequest,\n ): Promise<core.WithRawResponse<SmoothAgentApi.WebhooksListResponse>> => {\n const { limit, cursor, \"SmoothAgent-Workspace\": smoothAgentWorkspace } = request;\n const _queryParams: Record<string, unknown> = {\n limit,\n cursor,\n };\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"SmoothAgent-Workspace\": smoothAgentWorkspace }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n \"webhook-endpoints\",\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url\n .queryBuilder()\n .addMany(_queryParams)\n .add(\"limit\", _queryParams.limit, { style: \"comma\" })\n .add(\"cursor\", _queryParams.cursor, { style: \"comma\" })\n .mergeAdditional(requestOptions?.queryParams)\n .build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return {\n data: _response.body as SmoothAgentApi.WebhooksListResponse,\n rawResponse: _response.rawResponse,\n };\n }\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/webhook-endpoints\");\n },\n );\n const dataWithRawResponse = await list(request).withRawResponse();\n return new core.Page<SmoothAgentApi.WebhookEndpoint, SmoothAgentApi.WebhooksListResponse>({\n response: dataWithRawResponse.data,\n rawResponse: dataWithRawResponse.rawResponse,\n hasNextPage: (response) =>\n response?.nextCursor != null &&\n !(typeof response?.nextCursor === \"string\" && response?.nextCursor === \"\"),\n getItems: (response) => response?.data ?? [],\n loadPage: (response) => {\n return list(core.setObjectProperty(request, \"cursor\", response?.nextCursor));\n },\n });\n }\n\n /**\n * @param {SmoothAgentApi.WebhooksCreateRequest} request\n * @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.webhooks.create({\n * url: \"url\",\n * events: [\"events\"]\n * })\n */\n public create(\n request: SmoothAgentApi.WebhooksCreateRequest,\n requestOptions?: WebhooksClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.WebhooksCreateResponse> {\n return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));\n }\n\n private async __create(\n request: SmoothAgentApi.WebhooksCreateRequest,\n requestOptions?: WebhooksClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.WebhooksCreateResponse>> {\n const { \"SmoothAgent-Workspace\": smoothAgentWorkspace, \"Idempotency-Key\": idempotencyKey, ..._body } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n \"SmoothAgent-Workspace\": smoothAgentWorkspace,\n \"Idempotency-Key\": idempotencyKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n \"webhook-endpoints\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n requestType: \"json\",\n body: mergeAdditionalBodyParameters(_body, requestOptions?.additionalBodyParameters),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return {\n data: _response.body as SmoothAgentApi.WebhooksCreateResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"POST\", \"/webhook-endpoints\");\n }\n\n /**\n * @param {SmoothAgentApi.WebhooksDeleteRequest} request\n * @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.webhooks.delete({\n * id: \"id\"\n * })\n */\n public delete(\n request: SmoothAgentApi.WebhooksDeleteRequest,\n requestOptions?: WebhooksClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.Deleted> {\n return core.HttpResponsePromise.fromPromise(this.__delete(request, requestOptions));\n }\n\n private async __delete(\n request: SmoothAgentApi.WebhooksDeleteRequest,\n requestOptions?: WebhooksClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.Deleted>> {\n const { id } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `webhook-endpoints/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.Deleted, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"DELETE\", \"/webhook-endpoints/{id}\");\n }\n\n /**\n * @param {SmoothAgentApi.WebhooksUpdateRequest} request\n * @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.webhooks.update({\n * id: \"id\"\n * })\n */\n public update(\n request: SmoothAgentApi.WebhooksUpdateRequest,\n requestOptions?: WebhooksClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.WebhookEndpoint> {\n return core.HttpResponsePromise.fromPromise(this.__update(request, requestOptions));\n }\n\n private async __update(\n request: SmoothAgentApi.WebhooksUpdateRequest,\n requestOptions?: WebhooksClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.WebhookEndpoint>> {\n const { id, ..._body } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `webhook-endpoints/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}`,\n ),\n method: \"PATCH\",\n headers: _headers,\n contentType: \"application/json\",\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n requestType: \"json\",\n body: mergeAdditionalBodyParameters(_body, requestOptions?.additionalBodyParameters),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.WebhookEndpoint, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"PATCH\", \"/webhook-endpoints/{id}\");\n }\n\n /**\n * @param {SmoothAgentApi.RotateSecretWebhooksRequest} request\n * @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.webhooks.rotateSecret({\n * id: \"id\"\n * })\n */\n public rotateSecret(\n request: SmoothAgentApi.RotateSecretWebhooksRequest,\n requestOptions?: WebhooksClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.RotateSecretWebhooksResponse> {\n return core.HttpResponsePromise.fromPromise(this.__rotateSecret(request, requestOptions));\n }\n\n private async __rotateSecret(\n request: SmoothAgentApi.RotateSecretWebhooksRequest,\n requestOptions?: WebhooksClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.RotateSecretWebhooksResponse>> {\n const { id, \"Idempotency-Key\": idempotencyKey } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"Idempotency-Key\": idempotencyKey }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `webhook-endpoints/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/rotate-secret`,\n ),\n method: \"POST\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return {\n data: _response.body as SmoothAgentApi.RotateSecretWebhooksResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(\n _response.error,\n _response.rawResponse,\n \"POST\",\n \"/webhook-endpoints/{id}/rotate-secret\",\n );\n }\n\n /**\n * Manda um evento `webhook.test` assinado.\n *\n * @param {SmoothAgentApi.WebhooksTestRequest} request\n * @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.webhooks.test({\n * id: \"id\"\n * })\n */\n public test(\n request: SmoothAgentApi.WebhooksTestRequest,\n requestOptions?: WebhooksClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.WebhooksTestResponse> {\n return core.HttpResponsePromise.fromPromise(this.__test(request, requestOptions));\n }\n\n private async __test(\n request: SmoothAgentApi.WebhooksTestRequest,\n requestOptions?: WebhooksClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.WebhooksTestResponse>> {\n const { id, \"Idempotency-Key\": idempotencyKey } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"Idempotency-Key\": idempotencyKey }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `webhook-endpoints/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}/test`,\n ),\n method: \"POST\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.WebhooksTestResponse, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"POST\", \"/webhook-endpoints/{id}/test\");\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport type { BaseClientOptions, BaseRequestOptions } from \"../../../../BaseClient.js\";\nimport { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from \"../../../../BaseClient.js\";\nimport { mergeHeaders, mergeOnlyDefinedHeaders } from \"../../../../core/headers.js\";\nimport * as core from \"../../../../core/index.js\";\nimport { mergeAdditionalBodyParameters } from \"../../../../core/requestBody.js\";\nimport * as environments from \"../../../../environments.js\";\nimport { handleNonStatusCodeError } from \"../../../../errors/handleNonStatusCodeError.js\";\nimport * as errors from \"../../../../errors/index.js\";\nimport * as SmoothAgentApi from \"../../../index.js\";\n\nexport declare namespace WorkspacesClient {\n export type Options = BaseClientOptions;\n\n export interface RequestOptions extends BaseRequestOptions {}\n}\n\nexport class WorkspacesClient {\n protected readonly _options: NormalizedClientOptionsWithAuth<WorkspacesClient.Options>;\n\n constructor(options: WorkspacesClient.Options) {\n this._options = normalizeClientOptionsWithAuth(options);\n }\n\n /**\n * @param {SmoothAgentApi.WorkspacesListRequest} request\n * @param {WorkspacesClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.workspaces.list()\n */\n public async list(\n request: SmoothAgentApi.WorkspacesListRequest = {},\n requestOptions?: WorkspacesClient.RequestOptions,\n ): Promise<core.Page<SmoothAgentApi.Workspace, SmoothAgentApi.WorkspacesListResponse>> {\n const list = core.HttpResponsePromise.interceptFunction(\n async (\n request: SmoothAgentApi.WorkspacesListRequest,\n ): Promise<core.WithRawResponse<SmoothAgentApi.WorkspacesListResponse>> => {\n const { limit, cursor } = request;\n const _queryParams: Record<string, unknown> = {\n limit,\n cursor,\n };\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n \"workspaces\",\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url\n .queryBuilder()\n .addMany(_queryParams)\n .add(\"limit\", _queryParams.limit, { style: \"comma\" })\n .add(\"cursor\", _queryParams.cursor, { style: \"comma\" })\n .mergeAdditional(requestOptions?.queryParams)\n .build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return {\n data: _response.body as SmoothAgentApi.WorkspacesListResponse,\n rawResponse: _response.rawResponse,\n };\n }\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/workspaces\");\n },\n );\n const dataWithRawResponse = await list(request).withRawResponse();\n return new core.Page<SmoothAgentApi.Workspace, SmoothAgentApi.WorkspacesListResponse>({\n response: dataWithRawResponse.data,\n rawResponse: dataWithRawResponse.rawResponse,\n hasNextPage: (response) =>\n response?.nextCursor != null &&\n !(typeof response?.nextCursor === \"string\" && response?.nextCursor === \"\"),\n getItems: (response) => response?.data ?? [],\n loadPage: (response) => {\n return list(core.setObjectProperty(request, \"cursor\", response?.nextCursor));\n },\n });\n }\n\n /**\n * S\u00F3 chave de CONTA (a do MCP do dono \u00E9 uma).\n *\n * @param {SmoothAgentApi.WorkspacesCreateRequest} request\n * @param {WorkspacesClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.workspaces.create({\n * name: \"name\"\n * })\n */\n public create(\n request: SmoothAgentApi.WorkspacesCreateRequest,\n requestOptions?: WorkspacesClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.Workspace> {\n return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));\n }\n\n private async __create(\n request: SmoothAgentApi.WorkspacesCreateRequest,\n requestOptions?: WorkspacesClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.Workspace>> {\n const { \"Idempotency-Key\": idempotencyKey, ..._body } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n mergeOnlyDefinedHeaders({ \"Idempotency-Key\": idempotencyKey }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n \"workspaces\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n requestType: \"json\",\n body: mergeAdditionalBodyParameters(_body, requestOptions?.additionalBodyParameters),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.Workspace, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"POST\", \"/workspaces\");\n }\n\n /**\n * @param {SmoothAgentApi.WorkspacesGetRequest} request\n * @param {WorkspacesClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.workspaces.get({\n * id: \"id\"\n * })\n */\n public get(\n request: SmoothAgentApi.WorkspacesGetRequest,\n requestOptions?: WorkspacesClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.Workspace> {\n return core.HttpResponsePromise.fromPromise(this.__get(request, requestOptions));\n }\n\n private async __get(\n request: SmoothAgentApi.WorkspacesGetRequest,\n requestOptions?: WorkspacesClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.Workspace>> {\n const { id } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `workspaces/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.Workspace, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"GET\", \"/workspaces/{id}\");\n }\n\n /**\n * Apaga TUDO do workspace (agentes, usu\u00E1rios, chats, m\u00E1quinas, conex\u00F5es). Irrevers\u00EDvel.\n *\n * @param {SmoothAgentApi.WorkspacesDeleteRequest} request\n * @param {WorkspacesClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.workspaces.delete({\n * id: \"id\"\n * })\n */\n public delete(\n request: SmoothAgentApi.WorkspacesDeleteRequest,\n requestOptions?: WorkspacesClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.Deleted> {\n return core.HttpResponsePromise.fromPromise(this.__delete(request, requestOptions));\n }\n\n private async __delete(\n request: SmoothAgentApi.WorkspacesDeleteRequest,\n requestOptions?: WorkspacesClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.Deleted>> {\n const { id } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `workspaces/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.Deleted, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"DELETE\", \"/workspaces/{id}\");\n }\n\n /**\n * @param {SmoothAgentApi.WorkspacesUpdateRequest} request\n * @param {WorkspacesClient.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link SmoothAgentApi.BadRequestError}\n * @throws {@link SmoothAgentApi.UnauthorizedError}\n * @throws {@link SmoothAgentApi.PaymentRequiredError}\n * @throws {@link SmoothAgentApi.ForbiddenError}\n * @throws {@link SmoothAgentApi.NotFoundError}\n * @throws {@link SmoothAgentApi.ConflictError}\n * @throws {@link SmoothAgentApi.GoneError}\n * @throws {@link SmoothAgentApi.UnprocessableEntityError}\n * @throws {@link SmoothAgentApi.FailedDependencyError}\n * @throws {@link SmoothAgentApi.TooManyRequestsError}\n * @throws {@link SmoothAgentApi.InternalServerError}\n * @throws {@link SmoothAgentApi.BadGatewayError}\n * @throws {@link SmoothAgentApi.ServiceUnavailableError}\n * @throws {@link errors.SmoothAgentApiError}\n * @throws {@link errors.SmoothAgentApiTimeoutError}\n *\n * @example\n * await client.workspaces.update({\n * id: \"id\"\n * })\n */\n public update(\n request: SmoothAgentApi.WorkspacesUpdateRequest,\n requestOptions?: WorkspacesClient.RequestOptions,\n ): core.HttpResponsePromise<SmoothAgentApi.Workspace> {\n return core.HttpResponsePromise.fromPromise(this.__update(request, requestOptions));\n }\n\n private async __update(\n request: SmoothAgentApi.WorkspacesUpdateRequest,\n requestOptions?: WorkspacesClient.RequestOptions,\n ): Promise<core.WithRawResponse<SmoothAgentApi.Workspace>> {\n const { id, ..._body } = request;\n const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();\n const _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n _authRequest.headers,\n this._options?.headers,\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.SmoothAgentApiEnvironment.Default,\n `workspaces/${core.url.encodePathParam(id, errors.SmoothAgentApiError)}`,\n ),\n method: \"PATCH\",\n headers: _headers,\n contentType: \"application/json\",\n queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),\n requestType: \"json\",\n body: mergeAdditionalBodyParameters(_body, requestOptions?.additionalBodyParameters),\n timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,\n maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n fetchFn: this._options?.fetch,\n logging: this._options.logging,\n });\n if (_response.ok) {\n return { data: _response.body as SmoothAgentApi.Workspace, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new SmoothAgentApi.BadRequestError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 401:\n throw new SmoothAgentApi.UnauthorizedError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 402:\n throw new SmoothAgentApi.PaymentRequiredError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 403:\n throw new SmoothAgentApi.ForbiddenError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 404:\n throw new SmoothAgentApi.NotFoundError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 409:\n throw new SmoothAgentApi.ConflictError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 410:\n throw new SmoothAgentApi.GoneError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 422:\n throw new SmoothAgentApi.UnprocessableEntityError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 424:\n throw new SmoothAgentApi.FailedDependencyError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 429:\n throw new SmoothAgentApi.TooManyRequestsError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 500:\n throw new SmoothAgentApi.InternalServerError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 502:\n throw new SmoothAgentApi.BadGatewayError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n case 503:\n throw new SmoothAgentApi.ServiceUnavailableError(\n _response.error.body as SmoothAgentApi.Error_,\n _response.rawResponse,\n );\n default:\n throw new errors.SmoothAgentApiError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n return handleNonStatusCodeError(_response.error, _response.rawResponse, \"PATCH\", \"/workspaces/{id}\");\n }\n}\n", "// This file was auto-generated by Fern from our API Definition.\n\nimport { AccountClient } from \"./api/resources/account/client/Client.js\";\nimport { AgentsClient } from \"./api/resources/agents/client/Client.js\";\nimport { BillingClient } from \"./api/resources/billing/client/Client.js\";\nimport { ChatsClient } from \"./api/resources/chats/client/Client.js\";\nimport { ConnectionsClient } from \"./api/resources/connections/client/Client.js\";\nimport { FilesClient } from \"./api/resources/files/client/Client.js\";\nimport { IdentityClient } from \"./api/resources/identity/client/Client.js\";\nimport { KeysClient } from \"./api/resources/keys/client/Client.js\";\nimport { MachinesClient } from \"./api/resources/machines/client/Client.js\";\nimport { ObservabilityClient } from \"./api/resources/observability/client/Client.js\";\nimport { ProvidersClient } from \"./api/resources/providers/client/Client.js\";\nimport { RunsClient } from \"./api/resources/runs/client/Client.js\";\nimport { SecretsClient } from \"./api/resources/secrets/client/Client.js\";\nimport { UsersClient } from \"./api/resources/users/client/Client.js\";\nimport { WebhooksClient } from \"./api/resources/webhooks/client/Client.js\";\nimport { WorkspacesClient } from \"./api/resources/workspaces/client/Client.js\";\nimport type { BaseClientOptions, BaseRequestOptions } from \"./BaseClient.js\";\nimport { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from \"./BaseClient.js\";\nimport * as core from \"./core/index.js\";\n\nexport declare namespace SmoothAgentApiClient {\n export type Options = BaseClientOptions;\n\n export interface RequestOptions extends BaseRequestOptions {}\n}\n\nexport class SmoothAgentApiClient {\n protected readonly _options: NormalizedClientOptionsWithAuth<SmoothAgentApiClient.Options>;\n protected _account: AccountClient | undefined;\n protected _agents: AgentsClient | undefined;\n protected _observability: ObservabilityClient | undefined;\n protected _keys: KeysClient | undefined;\n protected _billing: BillingClient | undefined;\n protected _chats: ChatsClient | undefined;\n protected _connections: ConnectionsClient | undefined;\n protected _files: FilesClient | undefined;\n protected _machines: MachinesClient | undefined;\n protected _identity: IdentityClient | undefined;\n protected _providers: ProvidersClient | undefined;\n protected _runs: RunsClient | undefined;\n protected _secrets: SecretsClient | undefined;\n protected _users: UsersClient | undefined;\n protected _webhooks: WebhooksClient | undefined;\n protected _workspaces: WorkspacesClient | undefined;\n\n constructor(options: SmoothAgentApiClient.Options) {\n this._options = normalizeClientOptionsWithAuth(options);\n }\n\n public get account(): AccountClient {\n return (this._account ??= new AccountClient(this._options));\n }\n\n public get agents(): AgentsClient {\n return (this._agents ??= new AgentsClient(this._options));\n }\n\n public get observability(): ObservabilityClient {\n return (this._observability ??= new ObservabilityClient(this._options));\n }\n\n public get keys(): KeysClient {\n return (this._keys ??= new KeysClient(this._options));\n }\n\n public get billing(): BillingClient {\n return (this._billing ??= new BillingClient(this._options));\n }\n\n public get chats(): ChatsClient {\n return (this._chats ??= new ChatsClient(this._options));\n }\n\n public get connections(): ConnectionsClient {\n return (this._connections ??= new ConnectionsClient(this._options));\n }\n\n public get files(): FilesClient {\n return (this._files ??= new FilesClient(this._options));\n }\n\n public get machines(): MachinesClient {\n return (this._machines ??= new MachinesClient(this._options));\n }\n\n public get identity(): IdentityClient {\n return (this._identity ??= new IdentityClient(this._options));\n }\n\n public get providers(): ProvidersClient {\n return (this._providers ??= new ProvidersClient(this._options));\n }\n\n public get runs(): RunsClient {\n return (this._runs ??= new RunsClient(this._options));\n }\n\n public get secrets(): SecretsClient {\n return (this._secrets ??= new SecretsClient(this._options));\n }\n\n public get users(): UsersClient {\n return (this._users ??= new UsersClient(this._options));\n }\n\n public get webhooks(): WebhooksClient {\n return (this._webhooks ??= new WebhooksClient(this._options));\n }\n\n public get workspaces(): WorkspacesClient {\n return (this._workspaces ??= new WorkspacesClient(this._options));\n }\n\n /**\n * Make a passthrough request using the SDK's configured auth, retry, logging, etc.\n * This is useful for making requests to endpoints not yet supported in the SDK.\n * The input can be a URL string, URL object, or Request object. Relative paths are resolved against the configured base URL.\n *\n * @param {Request | string | URL} input - The URL, path, or Request object.\n * @param {RequestInit} init - Standard fetch RequestInit options.\n * @param {core.PassthroughRequest.RequestOptions} requestOptions - Per-request overrides (timeout, retries, headers, abort signal).\n * @returns {Promise<Response>} A standard Response object.\n */\n public async fetch(\n input: Request | string | URL,\n init?: RequestInit,\n requestOptions?: core.PassthroughRequest.RequestOptions,\n ): Promise<Response> {\n return core.makePassthroughRequest(\n input,\n init,\n {\n baseUrl: this._options.baseUrl ?? this._options.environment,\n headers: this._options.headers,\n timeoutInSeconds: this._options.timeoutInSeconds,\n maxRetries: this._options.maxRetries,\n fetch: this._options.fetch,\n logging: this._options.logging,\n getAuthHeaders: async () => (await this._options.authProvider.getAuthRequest()).headers,\n },\n requestOptions,\n );\n }\n}\n", "import * as logger from \"./logger.js\";\n\nexport namespace logging {\n /**\n * Configuration for logger instances.\n */\n export type LogConfig = logger.LogConfig;\n export type LogLevel = logger.LogLevel;\n export const LogLevel: typeof logger.LogLevel = logger.LogLevel;\n export type ILogger = logger.ILogger;\n /**\n * Console logger implementation that outputs to the console.\n */\n export type ConsoleLogger = logger.ConsoleLogger;\n /**\n * Console logger implementation that outputs to the console.\n */\n export const ConsoleLogger: typeof logger.ConsoleLogger = logger.ConsoleLogger;\n}\n", "// Provedores de um dono \u2014 o usu\u00E1rio (`/me/providers`) ou uma conex\u00E3o do workspace (`/connections/{id}`) \u2014 prontos pra\n// tela (DESIGN \u00A718 regra 4: \"provedores do usu\u00E1rio v\u00EAm prontos da SDK\"). A tela s\u00F3 desenha `getState()`.\n//\n// Mora aqui (TS, sobre o REST gerado) e n\u00E3o no n\u00FAcleo Rust: \u00E9 orquestra\u00E7\u00E3o de REST + rel\u00F3gio, sem estado da camada ao\n// vivo; o wasm s\u00F3 entra no `watch` (DESIGN \u00A714, M49) \u2014 mesmo lugar do `untilStored` (rest.ts). Uma fonte s\u00F3: o mesmo\n// c\u00F3digo serve o @smoothcodes/agent-client e o @smoothcodes/agent-server, e os dois donos.\n//\n// Seguran\u00E7a (\u00A716): o c\u00F3digo do OAuth e a chave passam direto pro pedido; nunca entram no estado, em erro, em log nem\n// em nada que a SDK guarde. A URL do login s\u00F3 sai se for http(s).\nimport type { Clock } from './deps'\nimport { apiErrorBody } from './rest'\n\n/** Um provedor como a API devolve (`/me/providers` ou dentro de uma conex\u00E3o). */\nexport interface ProviderRow {\n provider: string\n connected: boolean\n via: string[]\n expiresAt?: string | null\n /** ok | expiring (renova sozinho no pr\u00F3ximo uso) | dead (reconectar) | disconnected. */\n status: 'ok' | 'expiring' | 'dead' | 'disconnected'\n message?: string\n models: { id: string; name?: string }[]\n connect: string[]\n /** `/me/providers`: algum agente do usu\u00E1rio roda neste provedor. Ausente nas conex\u00F5es do workspace. */\n needed?: boolean\n}\n\n/** O in\u00EDcio de um login, como a API devolve (`connect`). */\nexport type LoginStart =\n | { kind: 'oauth'; loginId: string; url: string; expiresAt: string }\n | { kind: 'device'; loginId: string; url: string; userCode: string; expiresAt: string }\n\n/** As rotas de UM dono. A cola (client/server) monta isto com o REST gerado. */\nexport interface ProviderEndpoints {\n list(): Promise<ProviderRow[]>\n connect(provider: string): Promise<LoginStart>\n complete(loginId: string, code: string): Promise<unknown>\n loginStatus(loginId: string): Promise<{ status: string; error?: { code?: string; message?: string } }>\n setKey(provider: string, key: string): Promise<unknown>\n disconnect(provider: string, via?: 'subscription' | 'key'): Promise<unknown>\n}\n\n/** O estado de um fluxo de conectar. `error` no pending = falha que d\u00E1 pra tentar de novo (c\u00F3digo errado, rede). */\nexport type ConnectState =\n | { status: 'starting'; provider: string }\n | { status: 'pending'; provider: string; kind: 'oauth'; url: string; expiresAt: string; submitting: boolean; error?: string }\n | { status: 'pending'; provider: string; kind: 'device'; userCode: string; verificationUrl: string; expiresAt: string; error?: string }\n | { status: 'connected'; provider: string }\n | { status: 'expired'; provider: string }\n | { status: 'failed'; provider: string; message: string; code?: string }\n | { status: 'cancelled'; provider: string }\n\nexport type ConnectStatus = ConnectState['status']\nconst TERMINAL: ReadonlySet<ConnectStatus> = new Set(['connected', 'expired', 'failed', 'cancelled'])\n\n/** Um login em andamento. `subscribe`/`getState` servem o `useSyncExternalStore`. */\nexport interface ConnectFlow {\n readonly provider: string\n getState(): ConnectState\n subscribe(fn: (s: ConnectState) => void): () => void\n /** S\u00F3 OAuth: o c\u00F3digo que o site mostrou. C\u00F3digo errado = continua `pending` com `error` (cole de novo). */\n complete(code: string): Promise<ConnectState>\n /** Para de esperar (o login no servidor vence sozinho). */\n cancel(): void\n /** Resolve no estado final: connected | expired | failed | cancelled. Nunca rejeita. */\n readonly done: Promise<ConnectState>\n}\n\n/** Um provedor na tela: a linha da API + o fluxo de conectar dele + a a\u00E7\u00E3o de chave/desconectar em curso. */\nexport interface ProviderEntry extends ProviderRow {\n /** Em que se\u00E7\u00E3o desenhar (ver `sortProviders`). */\n group: ProviderGroup\n /** O login aberto (ou o \u00FAltimo que falhou/venceu, at\u00E9 o pr\u00F3ximo `connect`/`dismiss`). */\n flow: ConnectState | null\n /** `setKey`/`disconnect` em curso. */\n busy: 'key' | 'disconnect' | null\n /** O erro da \u00FAltima `setKey`/`disconnect` (limpo na pr\u00F3xima a\u00E7\u00E3o). */\n error: string | null\n}\n\nexport interface ProvidersState {\n /** Ordenada: os que algum agente do usu\u00E1rio usa (`needed`) primeiro, depois os outros, na ordem da API. */\n rows: ProviderEntry[]\n loading: boolean\n /** Falha ao carregar a lista. */\n error: string | null\n}\n\nexport interface ProviderSetOptions {\n clock: Clock\n /** Os provedores do agente/chat aberto (ex.: `agent.needs` ou `[agent.provider]`): v\u00EAm primeiro. Troque com `setPrimary`. */\n primary?: readonly string[]\n /** Intervalo do poll do device (padr\u00E3o 2 s). */\n pollMs?: number\n /** Folga sobre o `expiresAt` do servidor antes de dar `expired` localmente (rel\u00F3gio do aparelho torto; padr\u00E3o 30 s). */\n graceMs?: number\n}\n\nexport const PROVIDER_POLL_MS = 2_000\nconst GRACE_MS = 30_000\n\n/** O grupo da linha na tela: os do agente/chat (`primary`), os que algum agente do usu\u00E1rio usa (`needed`), o resto. */\nexport type ProviderGroup = 'primary' | 'needed' | 'other'\n\nexport const groupOf = (r: { provider: string; needed?: boolean }, primary: readonly string[] = []): ProviderGroup =>\n primary.includes(r.provider) ? 'primary' : r.needed === true ? 'needed' : 'other'\n\n/** Ordena: `primary` (na ordem dada) \u2192 `needed` \u2192 o resto; est\u00E1vel. A lista nunca \u00E9 filtrada. */\nexport function sortProviders<R extends { provider: string; needed?: boolean }>(rows: readonly R[], primary: readonly string[] = []): R[] {\n const p = rows.filter((r) => primary.includes(r.provider)).sort((a, b) => primary.indexOf(a.provider) - primary.indexOf(b.provider))\n return [...p, ...rows.filter((r) => groupOf(r, primary) === 'needed'), ...rows.filter((r) => groupOf(r, primary) === 'other')]\n}\n\n/** Texto curto de um erro do REST pra tela (sem nada do pedido). */\nexport function errorMessage(e: unknown): string {\n const b = apiErrorBody(e)\n if (b?.message) return b.message\n if (e instanceof Error && e.message) return e.message\n return 'falhou'\n}\n\n/** S\u00F3 http(s): URL de login com outro esquema (javascript:, data:) n\u00E3o chega na tela. */\nexport function safeLoginUrl(url: unknown): string | null {\n if (typeof url !== 'string') return null\n try {\n const u = new URL(url)\n return u.protocol === 'https:' || u.protocol === 'http:' ? u.href : null\n } catch {\n return null\n }\n}\n\n/** Erro que n\u00E3o adianta repetir (4xx que n\u00E3o seja 408/429): o poll para. Rede/5xx = tenta de novo. */\nfunction permanent(e: unknown): boolean {\n const status = (e as { statusCode?: number } | null)?.statusCode\n const b = apiErrorBody(e)\n if (b && b.retryable) return false\n return typeof status === 'number' && status >= 400 && status < 500 && status !== 408 && status !== 429\n}\n\nclass Flow implements ConnectFlow {\n private state: ConnectState\n private subs = new Set<(s: ConnectState) => void>()\n private timer: unknown = null\n private deadline: unknown = null\n private loginId: string | null = null\n private resolveDone!: (s: ConnectState) => void\n readonly done: Promise<ConnectState>\n\n constructor(\n readonly provider: string,\n private readonly ep: ProviderEndpoints,\n private readonly o: Required<Omit<ProviderSetOptions, 'primary'>>,\n private readonly onEnd: (s: ConnectState) => void,\n ) {\n this.state = { status: 'starting', provider }\n this.done = new Promise((r) => (this.resolveDone = r))\n void this.start()\n }\n\n getState = (): ConnectState => this.state\n\n subscribe = (fn: (s: ConnectState) => void): (() => void) => {\n this.subs.add(fn)\n return () => this.subs.delete(fn)\n }\n\n private get ended(): boolean {\n return TERMINAL.has(this.state.status)\n }\n\n private set(s: ConnectState): void {\n if (this.ended) return\n this.state = s\n for (const fn of [...this.subs]) fn(s)\n if (this.ended) {\n this.clearTimers()\n this.resolveDone(s)\n this.onEnd(s)\n }\n }\n\n private clearTimers(): void {\n if (this.timer !== null) this.o.clock.clearTimeout(this.timer)\n if (this.deadline !== null) this.o.clock.clearTimeout(this.deadline)\n this.timer = this.deadline = null\n }\n\n private async start(): Promise<void> {\n let f: LoginStart\n try {\n f = await this.ep.connect(this.provider)\n } catch (e) {\n this.set({ status: 'failed', provider: this.provider, message: errorMessage(e), ...errCode(e) })\n return\n }\n if (this.ended) return // cancelado enquanto abria\n const url = safeLoginUrl(f.url)\n if (!url) {\n this.set({ status: 'failed', provider: this.provider, message: 'o servidor mandou uma URL de login inv\u00E1lida' })\n return\n }\n this.loginId = f.loginId\n this.armDeadline(f.expiresAt)\n if (f.kind === 'oauth') {\n this.set({ status: 'pending', provider: this.provider, kind: 'oauth', url, expiresAt: f.expiresAt, submitting: false })\n } else {\n this.set({ status: 'pending', provider: this.provider, kind: 'device', userCode: f.userCode, verificationUrl: url, expiresAt: f.expiresAt })\n this.schedulePoll()\n }\n }\n\n private armDeadline(expiresAt: string): void {\n const at = Date.parse(expiresAt)\n if (!Number.isFinite(at)) return\n // o servidor \u00E9 a verdade (o poll/complete dizem `expired`); o prazo local s\u00F3 garante que a tela n\u00E3o espera pra sempre\n const ms = Math.max(0, at - this.o.clock.now()) + this.o.graceMs\n this.deadline = this.o.clock.setTimeout(() => {\n this.deadline = null\n this.set({ status: 'expired', provider: this.provider })\n }, ms)\n }\n\n private schedulePoll(): void {\n if (this.ended) return\n this.timer = this.o.clock.setTimeout(() => {\n this.timer = null\n void this.poll()\n }, this.o.pollMs)\n }\n\n private async poll(): Promise<void> {\n if (this.ended || !this.loginId) return\n try {\n const s = await this.ep.loginStatus(this.loginId)\n if (this.ended) return\n if (s.status === 'completed') return this.set({ status: 'connected', provider: this.provider })\n if (s.status === 'expired') return this.set({ status: 'expired', provider: this.provider })\n if (s.status === 'failed')\n return this.set({ status: 'failed', provider: this.provider, message: s.error?.message || 'o login falhou', ...(s.error?.code ? { code: s.error.code } : {}) })\n if (this.state.status === 'pending' && this.state.error) this.patch({ error: undefined })\n } catch (e) {\n if (this.ended) return\n if (permanent(e)) return this.set({ status: 'failed', provider: this.provider, message: errorMessage(e), ...errCode(e) })\n this.patch({ error: errorMessage(e) }) // rede/5xx: mostra e continua esperando\n }\n this.schedulePoll()\n }\n\n private patch(p: { error?: string; submitting?: boolean }): void {\n if (this.state.status !== 'pending') return\n const next = { ...this.state, ...p } as ConnectState & { error?: string }\n if (p.error === undefined && 'error' in p) delete next.error\n this.set(next)\n }\n\n complete = async (code: string): Promise<ConnectState> => {\n const s = this.state\n if (s.status !== 'pending' || s.kind !== 'oauth' || !this.loginId) return s\n const c = String(code ?? '').trim()\n if (!c) {\n this.patch({ error: 'cole o c\u00F3digo que o site mostrou' })\n return this.state\n }\n if (s.submitting) return s\n this.patch({ submitting: true, error: undefined })\n try {\n await this.ep.complete(this.loginId, c)\n this.set({ status: 'connected', provider: this.provider })\n } catch (e) {\n if (this.ended) return this.state\n const b = apiErrorBody(e)\n const st = (b?.details as { status?: string } | undefined)?.status\n // login vencido/usado ou que n\u00E3o \u00E9 mais deste usu\u00E1rio = acabou; c\u00F3digo errado / rede = cola de novo\n if (st === 'expired') this.set({ status: 'expired', provider: this.provider })\n else if (st === 'completed' || st === 'failed' || b?.code === 'not_found' || b?.code === 'forbidden')\n this.set({ status: 'failed', provider: this.provider, message: errorMessage(e), ...errCode(e) })\n else this.patch({ submitting: false, error: errorMessage(e) })\n }\n return this.state\n }\n\n cancel = (): void => {\n this.set({ status: 'cancelled', provider: this.provider })\n }\n}\n\nconst errCode = (e: unknown): { code?: string } => {\n const c = apiErrorBody(e)?.code\n return c ? { code: c } : {}\n}\n\n/**\n * Os provedores de UM dono, prontos pra tela: lista ordenada, conectar (OAuth/device, com o poll aqui dentro), chave,\n * desconectar. Recarrega a lista sozinho depois de cada mudan\u00E7a. `release()` quando a tela desmontar.\n */\nexport class ProviderSet {\n private state: ProvidersState = { rows: [], loading: true, error: null }\n private raw: ProviderRow[] = []\n private flows = new Map<string, Flow>()\n private last = new Map<string, ConnectState>()\n private busy = new Map<string, 'key' | 'disconnect'>()\n private errors = new Map<string, string>()\n private subs = new Set<(s: ProvidersState) => void>()\n private loadSeq = 0\n private released = false\n private readonly o: Required<Omit<ProviderSetOptions, 'primary'>>\n private primary: readonly string[]\n\n constructor(\n private readonly ep: ProviderEndpoints,\n o: ProviderSetOptions,\n ) {\n this.o = { pollMs: PROVIDER_POLL_MS, graceMs: GRACE_MS, clock: o.clock, ...(o.pollMs !== undefined ? { pollMs: o.pollMs } : {}), ...(o.graceMs !== undefined ? { graceMs: o.graceMs } : {}) }\n this.primary = [...(o.primary ?? [])]\n void this.reload()\n }\n\n getState = (): ProvidersState => this.state\n\n subscribe = (fn: (s: ProvidersState) => void): (() => void) => {\n this.subs.add(fn)\n return () => this.subs.delete(fn)\n }\n\n /** Busca a lista de novo (a resposta mais nova vence). */\n reload = async (): Promise<void> => {\n if (this.released) return\n const seq = ++this.loadSeq\n this.emit({ loading: true })\n try {\n const rows = await this.ep.list()\n if (seq !== this.loadSeq || this.released) return\n this.raw = rows\n this.emit({ loading: false, error: null })\n } catch (e) {\n if (seq !== this.loadSeq || this.released) return\n this.emit({ loading: false, error: errorMessage(e) })\n }\n }\n\n /** Abre o login: Claude \u2192 `oauth` (abra `url`, cole o c\u00F3digo em `complete`); Codex \u2192 `device` (mostre `userCode`). */\n connect = (provider: string): ConnectFlow => {\n this.flows.get(provider)?.cancel()\n this.last.delete(provider)\n const f = new Flow(provider, this.ep, this.o, (end) => {\n if (this.flows.get(provider) !== f) return\n this.flows.delete(provider)\n if (end.status === 'failed' || end.status === 'expired') this.last.set(provider, end)\n this.emit({})\n if (end.status === 'connected') void this.reload()\n })\n this.flows.set(provider, f)\n f.subscribe(() => this.emit({}))\n this.emit({})\n return f\n }\n\n /** O login aberto deste provedor, se houver. */\n flow(provider: string): ConnectFlow | null {\n return this.flows.get(provider) ?? null\n }\n\n /** Troca os provedores que v\u00EAm primeiro (o chat mudou de agente). N\u00E3o busca de novo. */\n setPrimary = (primary: readonly string[] | undefined): void => {\n this.primary = [...(primary ?? [])]\n this.emit({})\n }\n\n /** Some com o erro/expirado que ficou na linha. */\n dismiss = (provider: string): void => {\n this.last.delete(provider)\n this.errors.delete(provider)\n this.emit({})\n }\n\n /** Chave pr\u00F3pria. Rejeita com o erro da API (e o deixa na linha); a chave nunca fica guardada. */\n setKey = (provider: string, key: string): Promise<void> => this.act(provider, 'key', () => this.ep.setKey(provider, String(key ?? '').trim()))\n\n disconnect = (provider: string, via?: 'subscription' | 'key'): Promise<void> => this.act(provider, 'disconnect', () => this.ep.disconnect(provider, via))\n\n /** Cancela os logins abertos e para de avisar. */\n release = (): void => {\n this.released = true\n for (const f of [...this.flows.values()]) f.cancel()\n this.flows.clear()\n this.subs.clear()\n }\n\n private async act(provider: string, kind: 'key' | 'disconnect', call: () => Promise<unknown>): Promise<void> {\n this.busy.set(provider, kind)\n this.errors.delete(provider)\n this.emit({})\n try {\n await call()\n } catch (e) {\n this.errors.set(provider, errorMessage(e))\n throw e\n } finally {\n this.busy.delete(provider)\n this.emit({})\n }\n await this.reload()\n }\n\n private emit(p: Partial<ProvidersState>): void {\n if (this.released) return\n const rows = sortProviders(this.raw, this.primary).map((r) => ({\n ...r,\n group: groupOf(r, this.primary),\n flow: this.flows.get(r.provider)?.getState() ?? this.last.get(r.provider) ?? null,\n busy: this.busy.get(r.provider) ?? null,\n error: this.errors.get(r.provider) ?? null,\n }))\n this.state = { ...this.state, ...p, rows }\n for (const fn of [...this.subs]) fn(this.state)\n }\n}\n\n// \u2500\u2500\u2500 a cola com o REST gerado (client e server t\u00EAm os mesmos nomes; tipado pela forma, sem importar o gerado) \u2500\u2500\u2500\n\ntype Method = (req: never, opts?: never) => PromiseLike<unknown>\n\n/** O que a SDK gerada tem pra `/me/providers` (o mesmo no client e no server). */\nexport type GeneratedMyProviders = Record<\n 'myProvidersList' | 'myProvidersConnect' | 'myProvidersComplete' | 'myProvidersLoginStatus' | 'myProvidersSetKey' | 'myProvidersDisconnect',\n Method\n>\n\n/** O que a SDK gerada (server) tem pra `/connections`. */\nexport type GeneratedConnections = Record<'get' | 'connect' | 'complete' | 'loginStatus' | 'setKey' | 'disconnect', Method>\n\n/** Chama o m\u00E9todo COMO m\u00E9todo (a gerada usa `this`). */\nconst call = async <T>(g: Record<string, Method>, name: string, req: Record<string, unknown> = {}): Promise<T> =>\n (await (g[name] as unknown as (r: Record<string, unknown>) => PromiseLike<unknown>).call(g, req)) as T\nconst rowsOf = (r: unknown): ProviderRow[] => (Array.isArray(r) ? r : ((r as { data?: ProviderRow[] } | null)?.data ?? [])) as ProviderRow[]\nconst viaOpt = (via?: string) => (via ? { via } : {})\ntype Status = Awaited<ReturnType<ProviderEndpoints['loginStatus']>>\n\n/** As rotas do usu\u00E1rio (`/me/providers`), com a gerada. */\nexport function myProviderEndpoints(g: GeneratedMyProviders): ProviderEndpoints {\n return {\n list: async () => rowsOf(await call(g, 'myProvidersList')),\n connect: (provider) => call<LoginStart>(g, 'myProvidersConnect', { provider }),\n complete: (loginId, code) => call(g, 'myProvidersComplete', { loginId, code }),\n loginStatus: (loginId) => call<Status>(g, 'myProvidersLoginStatus', { loginId }),\n setKey: (provider, key) => call(g, 'myProvidersSetKey', { provider, key }),\n disconnect: (provider, via) => call(g, 'myProvidersDisconnect', { provider, ...viaOpt(via) }),\n }\n}\n\n/** As rotas de uma conex\u00E3o do workspace (`/connections/{id}`), com a gerada: a mesma forma do usu\u00E1rio. */\nexport function connectionProviderEndpoints(g: GeneratedConnections, id: string): ProviderEndpoints {\n return {\n list: async () => (await call<{ providers?: ProviderRow[] }>(g, 'get', { id })).providers ?? [],\n connect: (provider) => call<LoginStart>(g, 'connect', { id, provider }),\n complete: (loginId, code) => call(g, 'complete', { id, loginId, code }),\n loginStatus: (loginId) => call<Status>(g, 'loginStatus', { id, loginId }),\n setKey: (provider, key) => call(g, 'setKey', { id, provider, key }),\n disconnect: (provider, via) => call(g, 'disconnect', { id, provider, ...viaOpt(via) }),\n }\n}\n\n/** A gerada + m\u00E9todos a mais (os da gerada continuam presos a ela). */\nexport function withExtra<G extends object, E extends object>(gen: G, extra: E): G & E {\n return new Proxy(gen, {\n get(target, key) {\n if (key in extra) return (extra as Record<PropertyKey, unknown>)[key]\n const v = Reflect.get(target, key, target) as unknown\n return typeof v === 'function' ? (v as (...a: unknown[]) => unknown).bind(target) : v\n },\n }) as G & E\n}\n", "// @smoothcodes/agent-server \u2014 a SDK de quem integra (DESIGN \u00A73; proposta sdk \u00A73.2): a chave de conta/workspace\n// num backend, num bot ou no dashboard do dev (navegador). REST = o que o Fern gera do contrato (audience\n// `server`) + Idempotency-Key em todo pedido + `send` que n\u00E3o se perde. Sem a camada ao vivo (sem wasm).\nimport { SmoothAgentApiClient, SmoothAgentApiEnvironment, SmoothAgentApiError, SmoothAgentApiTimeoutError } from '../../../generated/ts-server/index.js'\nimport { HttpResponsePromise } from '../../../generated/ts-server/core/fetcher/HttpResponsePromise.js'\nimport { systemClock, type Clock, type SocketLike } from '../../core-live/src/deps'\nimport type { LiveClient } from '../../core-live/src/client'\nimport type { ContractChatState, ContractItem } from '../../core-live/src/reducers/contract'\nimport { idempotencyHeaders, sendBody, transient, untilStored } from '../../core-live/src/rest'\nimport {\n ProviderSet,\n connectionProviderEndpoints,\n myProviderEndpoints,\n withExtra,\n type GeneratedConnections,\n type GeneratedMyProviders,\n} from '../../core-live/src/providers'\n\nexport { SmoothAgentApiError, SmoothAgentApiTimeoutError }\nexport { apiErrorBody, type ApiErrorBody } from '../../core-live/src/rest'\nexport type { ErrorCode } from '../../core-live/src/types'\nexport { ProviderSet, sortProviders, type ConnectFlow, type ConnectState, type ConnectStatus, type ProviderEntry, type ProviderGroup, type ProviderRow, type ProvidersState } from '../../core-live/src/providers'\n\nexport interface SmoothAgentServerOptions {\n /** Chave de conta ou de workspace (`sa_\u2026`). Uma fun\u00E7\u00E3o = renovada a cada pedido (ex.: sess\u00E3o do dashboard). */\n apiKey: string | (() => string | Promise<string>)\n /** Workspace padr\u00E3o (header `SmoothAgent-Workspace`); a chave de conta precisa dele nas rotas de workspace. */\n workspace?: string\n /** Agir como este usu\u00E1rio (header `SmoothAgent-As-User`; a chave precisa do escopo `users:act`). Use `sa.as(userId)`. */\n asUser?: string\n /** White-label: s\u00F3 isto muda. Padr\u00E3o: produ\u00E7\u00E3o. No navegador do dashboard, `location.origin` (proxy /v3). */\n baseUrl?: string\n fetch?: typeof fetch\n /** O ao vivo (`live()`) fora do navegador/Node 22: passe o WebSocket. */\n WebSocket?: new (url: string, protocols: string[]) => SocketLike\n /** Testes. */\n clock?: Clock\n}\n\n/** A base de produ\u00E7\u00E3o = o `servers` do contrato (sem o `/v3`); white-label passa `baseUrl`. */\nexport const DEFAULT_BASE_URL: string = SmoothAgentApiEnvironment.Default.replace(/\\/v3$/, '')\n\ntype GeneratedChats = SmoothAgentApiClient['chats']\ntype SendInput = Parameters<GeneratedChats['send']>[0]\n\ntype GeneratedProviders = SmoothAgentApiClient['providers']\ntype GeneratedConnectionsApi = SmoothAgentApiClient['connections']\n\nexport interface ProvidersLive {\n /** Os provedores do usu\u00E1rio (`sa.as(userId).providers.watch()`), prontos pra tela \u2014 a mesma forma do client. */\n watch(opts?: { primary?: readonly string[] }): ProviderSet\n}\n\nexport interface ConnectionsLive {\n /** Os provedores de UMA conex\u00E3o do workspace, prontos pra tela: a mesma forma de `providers.watch()`. */\n watchProviders(connectionId: string): ProviderSet\n}\n\nexport class SmoothAgentServer {\n /** O cliente REST gerado (todas as rotas da audience `server`). */\n readonly api: SmoothAgentApiClient\n readonly chats: GeneratedChats\n readonly providers: GeneratedProviders & ProvidersLive\n readonly connections: GeneratedConnectionsApi & ConnectionsLive\n private readonly baseUrl: string\n private liveClient: Promise<LiveClient<ContractChatState, ContractItem>> | null = null\n\n constructor(private readonly o: SmoothAgentServerOptions) {\n const baseUrl = (this.baseUrl = (o.baseUrl ?? DEFAULT_BASE_URL).replace(/\\/$/, ''))\n const key = o.apiKey\n this.api = new SmoothAgentApiClient({\n baseUrl: `${baseUrl}/v3`,\n token: typeof key === 'string' ? key : async () => key(),\n ...(o.fetch ? { fetch: o.fetch } : {}),\n headers: {\n ...idempotencyHeaders(),\n ...(o.workspace ? { 'SmoothAgent-Workspace': o.workspace } : {}),\n ...(o.asUser ? { 'SmoothAgent-As-User': o.asUser } : {}),\n },\n })\n this.chats = chatsFacade(this.api.chats, o.clock ?? systemClock)\n const clock = o.clock ?? systemClock\n const gp = this.api.providers\n const gc = this.api.connections\n this.providers = withExtra(gp, { watch: (w?: { primary?: readonly string[] }) => new ProviderSet(myProviderEndpoints(gp as unknown as GeneratedMyProviders), { clock, ...(w?.primary ? { primary: w.primary } : {}) }) })\n this.connections = withExtra(gc, {\n watchProviders: (id: string) => new ProviderSet(connectionProviderEndpoints(gc as unknown as GeneratedConnections, id), { clock }),\n })\n }\n\n /**\n * A camada ao vivo com a chave (DESIGN \u00A73: um backend ou bot acompanha um chat igual a uma tela):\n * `(await sa.live()).watch(chatId)`, `.events(chatId, {after})`, `.prompt(chatId, 'oi')`. O n\u00FAcleo (wasm)\n * s\u00F3 carrega aqui, num peda\u00E7o separado \u2014 quem usa s\u00F3 o REST nunca baixa (M49).\n */\n live(): Promise<LiveClient<ContractChatState, ContractItem>> {\n const key = this.o.apiKey\n this.liveClient ??= import('../../core-live/src/client').then(\n ({ LiveClient }) =>\n new LiveClient<ContractChatState, ContractItem>({\n baseUrl: this.baseUrl,\n getToken: async () => (typeof key === 'string' ? key : key()),\n ...(this.o.fetch ? { fetch: this.o.fetch } : {}),\n ...(this.o.WebSocket ? { WebSocket: this.o.WebSocket } : {}),\n ...(this.o.clock ? { clock: this.o.clock } : {}),\n }),\n )\n return this.liveClient\n }\n\n /**\n * Agindo como um usu\u00E1rio, do backend, sem expor token (DESIGN \u00A73, \u00A712.5): a mesma API, com todo pedido REST\n * levando `SmoothAgent-As-User` \u2014 o servidor aplica o acesso DESSE usu\u00E1rio (grants). `sa.as(u).chats.send(\u2026)`.\n */\n as(userId: string): SmoothAgentServer {\n return new SmoothAgentServer({ ...this.o, asUser: userId })\n }\n\n /** A mesma API presa a outro workspace (chave de conta). */\n workspace(id: string): SmoothAgentServer {\n return new SmoothAgentServer({ ...this.o, workspace: id })\n }\n\n /** A organiza\u00E7\u00E3o (chave de conta): `account.update({ name })` renomeia. */\n get account() {\n return this.api.account\n }\n get agents() {\n return this.api.agents\n }\n get apiKeys() {\n return this.api.keys\n }\n get billing() {\n return this.api.billing\n }\n get files() {\n return this.api.files\n }\n get machines() {\n return this.api.machines\n }\n get me() {\n return this.api.identity\n }\n /** Diagn\u00F3stico/logs/m\u00E9tricas de chat, sa\u00FAde de agente e releases (o que o dashboard mostra). */\n get observability() {\n return this.api.observability\n }\n get runs() {\n return this.api.runs\n }\n get secrets() {\n return this.api.secrets\n }\n get users() {\n return this.api.users\n }\n get webhooks() {\n return this.api.webhooks\n }\n get workspaces() {\n return this.api.workspaces\n }\n}\n\n/** `send` com o `clientMessageId` gerado uma vez (e a mesma Idempotency-Key) e reenvio na falha passageira. */\nfunction chatsFacade(gen: GeneratedChats, clock: Clock): GeneratedChats {\n const send = ((req: SendInput, ro?: Parameters<GeneratedChats['send']>[1]) => {\n const body = sendBody(req as SendInput & { clientMessageId?: string; 'Idempotency-Key'?: string }) as SendInput\n const isTransient = (e: unknown) => transient(e, { api: SmoothAgentApiError, timeout: SmoothAgentApiTimeoutError })\n return HttpResponsePromise.fromPromise(untilStored(() => gen.send(body, ro).withRawResponse(), { clock, abortSignal: ro?.abortSignal, isTransient }))\n }) as GeneratedChats['send']\n return new Proxy(gen, {\n get(target, k) {\n if (k === 'send') return send\n const v = Reflect.get(target, k, target) as unknown\n return typeof v === 'function' ? (v as (...a: unknown[]) => unknown).bind(target) : v\n },\n })\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;AAOO,IAAM,SAAS,CAClB,OACA,UACA,UACS;AACT,SAAO,KAAK,UAAU,OAAO,UAAU,KAA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,IAAI;AAAA,EAClB;AAAA,EACA,IAAI,WAAW;AACb,WAAO,KAAK,IAAI;AAAA,EAClB;AAAA,EACA,IAAI,KAAK;AACP,WAAO,KAAK,IAAI;AAAA,EAClB;AAAA;AAAA,EAEA,IAAI,gBAAgB;AAClB,WAAO,KAAK,IAAI;AAAA,EAClB;AAAA,EACA,IAAI,OAAO;AACT,WAAO,KAAK,IAAI;AAAA,EAClB;AAAA,EACA,IAAI,UAAU;AACZ,WAAO,KAAK,IAAI;AAAA,EAClB;AAAA,EACA,IAAI,QAAQ;AACV,WAAO,KAAK,IAAI;AAAA,EAClB;AAAA,EACA,IAAI,WAAW;AACb,WAAO,KAAK,IAAI;AAAA,EAClB;AAAA,EACA,IAAI,aAAa;AACf,WAAO,KAAK,IAAI;AAAA,EAClB;AACF;AAGA,SAAS,YAAY,KAAqB,OAA8B;AACtE,QAAM,QAAQ,CAAC,KAAgB,OAA+C;AAC5E,UAAM,OAAO,SAAS,GAA2E;AACjG,UAAM,cAAc,CAAC,MAAe,UAAU,GAAG,EAAE,KAAK,qBAAqB,SAAS,2BAA2B,CAAC;AAClH,WAAO,oBAAoB,YAAY,YAAY,MAAM,IAAI,KAAK,MAAM,EAAE,EAAE,gBAAgB,GAAG,EAAE,OAAO,aAAa,IAAI,aAAa,YAAY,CAAC,CAAC;AAAA,EACtJ;AACA,SAAO,IAAI,MAAM,KAAK;AAAA,IACpB,IAAI,QAAQ,GAAG;AACb,UAAI,MAAM,OAAQ,QAAO;AACzB,YAAM,IAAI,QAAQ,IAAI,QAAQ,GAAG,MAAM;AACvC,aAAO,OAAO,MAAM,aAAc,EAAmC,KAAK,MAAM,IAAI;AAAA,IACtF;AAAA,EACF,CAAC;AACH;",
6
- "names": ["AgentConfig", "Queue", "AgentConfigMergePatchUpdate", "Queue", "SendMessage", "ChatsSendResponse", "Agent", "Queue", "AgentHealth", "Credential", "Mcp", "Item", "AgentMessageOrigin", "ApiKey", "ApiKeyWithSecret", "BillingLine", "BoxFileContent", "BoxFileEntry", "Chat", "ChatDeleted", "ChatSelection", "Current", "ChatTask", "EventsApprovalOption", "EventsCapabilities", "EventsDelta", "EventsEChatStateData", "EventsEItemRetractedData", "EventsENoticeData", "EventsERunCompletedData", "EventsERunStartedData", "EventsERunWaitingData", "EventsESessionStartedData", "EventsHandoffInjected", "EventsHandoffLost", "EventsInboxEntry", "EventsInboxState", "Held", "EventsItemApproval", "Action", "EventsItemCommand", "EventsItemCompaction", "EventsItemError", "EventsItemFileChange", "Changes", "Item", "EventsItemFileSearch", "EventsItemHandoff", "EventsItemHook", "EventsItemNotification", "Source", "EventsItemPlan", "Steps", "Item", "EventsItemProposedPlan", "EventsItemQuestion", "EventsItemReasoning", "EventsItemSubagent", "EventsItemText", "EventsItemTimer", "EventsItemToolCall", "EventsItemUserMessage", "EventsItemWebSearch", "EventsLimits", "EventsLimitWindow", "EventsOrigin", "EventsRawFrame", "EventsRunAgent", "EventsRunTrigger", "EventsTask", "FileObject", "LoginStatus", "Machine", "MessageReceipt", "MyProviderStatus", "Via", "Connect", "Pairing", "Placement", "PlacementMergePatchUpdateOrCreate", "PreTurnHook", "PreTurnHookMergePatchUpdateOrCreate", "Principal", "ProviderLimits", "ProviderStatus", "Via", "Connect", "RunSummary", "RunVerdict", "SwitchResult", "ToolPrincipal", "Tools", "UserSession", "WorkspaceRun", "Headers", "Headers", "Headers", "isStreamLike", "isReadableStream", "isBuffer", "isArrayBufferView", "self", "BearerAuthProvider", "request", "request", "request", "request", "request", "request", "request", "request", "request", "request", "logging", "call"]
7
- }