@letta-ai/letta-client 0.1.170 → 0.1.172

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 (286) hide show
  1. package/README.md +16 -3
  2. package/api/errors/BadRequestError.d.ts +2 -1
  3. package/api/errors/BadRequestError.js +2 -1
  4. package/api/errors/ConflictError.d.ts +2 -1
  5. package/api/errors/ConflictError.js +2 -1
  6. package/api/errors/InternalServerError.d.ts +2 -1
  7. package/api/errors/InternalServerError.js +2 -1
  8. package/api/errors/NotFoundError.d.ts +2 -1
  9. package/api/errors/NotFoundError.js +2 -1
  10. package/api/errors/PaymentRequiredError.d.ts +2 -1
  11. package/api/errors/PaymentRequiredError.js +2 -1
  12. package/api/errors/UnprocessableEntityError.d.ts +2 -1
  13. package/api/errors/UnprocessableEntityError.js +2 -1
  14. package/api/resources/agents/client/Client.d.ts +20 -10
  15. package/api/resources/agents/client/Client.js +166 -82
  16. package/api/resources/agents/resources/blocks/client/Client.d.ts +10 -5
  17. package/api/resources/agents/resources/blocks/client/Client.js +90 -45
  18. package/api/resources/agents/resources/context/client/Client.d.ts +2 -1
  19. package/api/resources/agents/resources/context/client/Client.js +18 -9
  20. package/api/resources/agents/resources/coreMemory/client/Client.d.ts +2 -1
  21. package/api/resources/agents/resources/coreMemory/client/Client.js +18 -9
  22. package/api/resources/agents/resources/files/client/Client.d.ts +6 -3
  23. package/api/resources/agents/resources/files/client/Client.js +45 -21
  24. package/api/resources/agents/resources/folders/client/Client.d.ts +6 -3
  25. package/api/resources/agents/resources/folders/client/Client.js +54 -27
  26. package/api/resources/agents/resources/groups/client/Client.d.ts +2 -1
  27. package/api/resources/agents/resources/groups/client/Client.js +19 -10
  28. package/api/resources/agents/resources/memoryVariables/client/Client.d.ts +2 -1
  29. package/api/resources/agents/resources/memoryVariables/client/Client.js +18 -9
  30. package/api/resources/agents/resources/messages/client/Client.d.ts +16 -8
  31. package/api/resources/agents/resources/messages/client/Client.js +155 -83
  32. package/api/resources/agents/resources/passages/client/Client.d.ts +8 -4
  33. package/api/resources/agents/resources/passages/client/Client.js +64 -31
  34. package/api/resources/agents/resources/sources/client/Client.d.ts +6 -3
  35. package/api/resources/agents/resources/sources/client/Client.js +54 -27
  36. package/api/resources/agents/resources/templates/client/Client.d.ts +6 -3
  37. package/api/resources/agents/resources/templates/client/Client.js +54 -27
  38. package/api/resources/agents/resources/tools/client/Client.d.ts +6 -3
  39. package/api/resources/agents/resources/tools/client/Client.js +54 -27
  40. package/api/resources/batches/client/Client.d.ts +8 -4
  41. package/api/resources/batches/client/Client.js +63 -30
  42. package/api/resources/blocks/client/Client.d.ts +12 -6
  43. package/api/resources/blocks/client/Client.js +100 -49
  44. package/api/resources/blocks/resources/agents/client/Client.d.ts +2 -1
  45. package/api/resources/blocks/resources/agents/client/Client.js +19 -10
  46. package/api/resources/clientSideAccessTokens/client/Client.d.ts +6 -3
  47. package/api/resources/clientSideAccessTokens/client/Client.js +46 -22
  48. package/api/resources/embeddingModels/client/Client.d.ts +2 -1
  49. package/api/resources/embeddingModels/client/Client.js +18 -9
  50. package/api/resources/folders/client/Client.d.ts +18 -9
  51. package/api/resources/folders/client/Client.js +154 -76
  52. package/api/resources/folders/resources/files/client/Client.d.ts +6 -3
  53. package/api/resources/folders/resources/files/client/Client.js +48 -24
  54. package/api/resources/folders/resources/passages/client/Client.d.ts +2 -1
  55. package/api/resources/folders/resources/passages/client/Client.js +19 -10
  56. package/api/resources/groups/client/Client.d.ts +12 -6
  57. package/api/resources/groups/client/Client.js +105 -52
  58. package/api/resources/groups/resources/messages/client/Client.d.ts +10 -5
  59. package/api/resources/groups/resources/messages/client/Client.js +91 -49
  60. package/api/resources/health/client/Client.d.ts +2 -1
  61. package/api/resources/health/client/Client.js +17 -8
  62. package/api/resources/identities/client/Client.d.ts +14 -7
  63. package/api/resources/identities/client/Client.js +123 -61
  64. package/api/resources/identities/resources/properties/client/Client.d.ts +2 -1
  65. package/api/resources/identities/resources/properties/client/Client.js +9 -3
  66. package/api/resources/jobs/client/Client.d.ts +10 -5
  67. package/api/resources/jobs/client/Client.js +92 -47
  68. package/api/resources/messages/client/Client.d.ts +2 -1
  69. package/api/resources/messages/client/Client.js +19 -10
  70. package/api/resources/models/client/Client.d.ts +2 -1
  71. package/api/resources/models/client/Client.js +27 -14
  72. package/api/resources/projects/client/Client.d.ts +2 -1
  73. package/api/resources/projects/client/Client.js +18 -9
  74. package/api/resources/providers/client/Client.d.ts +10 -5
  75. package/api/resources/providers/client/Client.js +77 -36
  76. package/api/resources/runs/client/Client.d.ts +8 -4
  77. package/api/resources/runs/client/Client.js +74 -38
  78. package/api/resources/runs/resources/messages/client/Client.d.ts +2 -1
  79. package/api/resources/runs/resources/messages/client/Client.js +21 -12
  80. package/api/resources/runs/resources/steps/client/Client.d.ts +2 -1
  81. package/api/resources/runs/resources/steps/client/Client.js +19 -10
  82. package/api/resources/runs/resources/usage/client/Client.d.ts +2 -1
  83. package/api/resources/runs/resources/usage/client/Client.js +18 -9
  84. package/api/resources/sources/client/Client.d.ts +20 -10
  85. package/api/resources/sources/client/Client.js +173 -86
  86. package/api/resources/sources/resources/files/client/Client.d.ts +6 -3
  87. package/api/resources/sources/resources/files/client/Client.js +48 -24
  88. package/api/resources/sources/resources/passages/client/Client.d.ts +2 -1
  89. package/api/resources/sources/resources/passages/client/Client.js +19 -10
  90. package/api/resources/steps/client/Client.d.ts +4 -2
  91. package/api/resources/steps/client/Client.js +41 -21
  92. package/api/resources/steps/resources/feedback/client/Client.d.ts +2 -1
  93. package/api/resources/steps/resources/feedback/client/Client.js +23 -12
  94. package/api/resources/tags/client/Client.d.ts +2 -1
  95. package/api/resources/tags/client/Client.js +19 -10
  96. package/api/resources/telemetry/client/Client.d.ts +2 -1
  97. package/api/resources/telemetry/client/Client.js +18 -9
  98. package/api/resources/templates/client/Client.d.ts +2 -1
  99. package/api/resources/templates/client/Client.js +18 -9
  100. package/api/resources/templates/resources/agents/client/Client.d.ts +2 -1
  101. package/api/resources/templates/resources/agents/client/Client.js +19 -10
  102. package/api/resources/tools/client/Client.d.ts +40 -20
  103. package/api/resources/tools/client/Client.js +356 -182
  104. package/api/resources/voice/client/Client.d.ts +2 -1
  105. package/api/resources/voice/client/Client.js +9 -3
  106. package/api/types/LettaStreamingRequest.d.ts +2 -0
  107. package/core/fetcher/APIResponse.d.ts +10 -0
  108. package/core/fetcher/Fetcher.d.ts +1 -1
  109. package/core/fetcher/Fetcher.js +11 -3
  110. package/core/fetcher/Headers.d.ts +2 -0
  111. package/core/fetcher/Headers.js +84 -0
  112. package/core/fetcher/HttpResponsePromise.d.ts +58 -0
  113. package/core/fetcher/HttpResponsePromise.js +103 -0
  114. package/core/fetcher/RawResponse.d.ts +29 -0
  115. package/core/fetcher/RawResponse.js +44 -0
  116. package/core/fetcher/createRequestUrl.d.ts +1 -1
  117. package/core/fetcher/getRequestBody.js +2 -1
  118. package/core/fetcher/index.d.ts +3 -0
  119. package/core/fetcher/index.js +7 -1
  120. package/core/fetcher/requestWithRetries.js +1 -1
  121. package/core/form-data-utils/FormDataWrapper.d.ts +3 -0
  122. package/core/form-data-utils/FormDataWrapper.js +53 -10
  123. package/core/form-data-utils/encodeAsFormParameter.d.ts +4 -0
  124. package/core/form-data-utils/encodeAsFormParameter.js +18 -0
  125. package/core/form-data-utils/index.d.ts +1 -0
  126. package/core/form-data-utils/index.js +3 -0
  127. package/core/json.d.ts +15 -0
  128. package/core/json.js +24 -0
  129. package/core/schemas/Schema.d.ts +2 -0
  130. package/core/schemas/Schema.js +2 -0
  131. package/core/schemas/builders/bigint/bigint.d.ts +1 -1
  132. package/core/schemas/builders/bigint/bigint.js +21 -17
  133. package/core/schemas/builders/object/object.js +1 -0
  134. package/core/schemas/builders/record/record.js +1 -2
  135. package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
  136. package/core/schemas/builders/schema-utils/getSchemaUtils.js +64 -0
  137. package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +1 -1
  138. package/dist/api/errors/BadRequestError.d.ts +2 -1
  139. package/dist/api/errors/BadRequestError.js +2 -1
  140. package/dist/api/errors/ConflictError.d.ts +2 -1
  141. package/dist/api/errors/ConflictError.js +2 -1
  142. package/dist/api/errors/InternalServerError.d.ts +2 -1
  143. package/dist/api/errors/InternalServerError.js +2 -1
  144. package/dist/api/errors/NotFoundError.d.ts +2 -1
  145. package/dist/api/errors/NotFoundError.js +2 -1
  146. package/dist/api/errors/PaymentRequiredError.d.ts +2 -1
  147. package/dist/api/errors/PaymentRequiredError.js +2 -1
  148. package/dist/api/errors/UnprocessableEntityError.d.ts +2 -1
  149. package/dist/api/errors/UnprocessableEntityError.js +2 -1
  150. package/dist/api/resources/agents/client/Client.d.ts +20 -10
  151. package/dist/api/resources/agents/client/Client.js +166 -82
  152. package/dist/api/resources/agents/resources/blocks/client/Client.d.ts +10 -5
  153. package/dist/api/resources/agents/resources/blocks/client/Client.js +90 -45
  154. package/dist/api/resources/agents/resources/context/client/Client.d.ts +2 -1
  155. package/dist/api/resources/agents/resources/context/client/Client.js +18 -9
  156. package/dist/api/resources/agents/resources/coreMemory/client/Client.d.ts +2 -1
  157. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +18 -9
  158. package/dist/api/resources/agents/resources/files/client/Client.d.ts +6 -3
  159. package/dist/api/resources/agents/resources/files/client/Client.js +45 -21
  160. package/dist/api/resources/agents/resources/folders/client/Client.d.ts +6 -3
  161. package/dist/api/resources/agents/resources/folders/client/Client.js +54 -27
  162. package/dist/api/resources/agents/resources/groups/client/Client.d.ts +2 -1
  163. package/dist/api/resources/agents/resources/groups/client/Client.js +19 -10
  164. package/dist/api/resources/agents/resources/memoryVariables/client/Client.d.ts +2 -1
  165. package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +18 -9
  166. package/dist/api/resources/agents/resources/messages/client/Client.d.ts +16 -8
  167. package/dist/api/resources/agents/resources/messages/client/Client.js +155 -83
  168. package/dist/api/resources/agents/resources/passages/client/Client.d.ts +8 -4
  169. package/dist/api/resources/agents/resources/passages/client/Client.js +64 -31
  170. package/dist/api/resources/agents/resources/sources/client/Client.d.ts +6 -3
  171. package/dist/api/resources/agents/resources/sources/client/Client.js +54 -27
  172. package/dist/api/resources/agents/resources/templates/client/Client.d.ts +6 -3
  173. package/dist/api/resources/agents/resources/templates/client/Client.js +54 -27
  174. package/dist/api/resources/agents/resources/tools/client/Client.d.ts +6 -3
  175. package/dist/api/resources/agents/resources/tools/client/Client.js +54 -27
  176. package/dist/api/resources/batches/client/Client.d.ts +8 -4
  177. package/dist/api/resources/batches/client/Client.js +63 -30
  178. package/dist/api/resources/blocks/client/Client.d.ts +12 -6
  179. package/dist/api/resources/blocks/client/Client.js +100 -49
  180. package/dist/api/resources/blocks/resources/agents/client/Client.d.ts +2 -1
  181. package/dist/api/resources/blocks/resources/agents/client/Client.js +19 -10
  182. package/dist/api/resources/clientSideAccessTokens/client/Client.d.ts +6 -3
  183. package/dist/api/resources/clientSideAccessTokens/client/Client.js +46 -22
  184. package/dist/api/resources/embeddingModels/client/Client.d.ts +2 -1
  185. package/dist/api/resources/embeddingModels/client/Client.js +18 -9
  186. package/dist/api/resources/folders/client/Client.d.ts +18 -9
  187. package/dist/api/resources/folders/client/Client.js +154 -76
  188. package/dist/api/resources/folders/resources/files/client/Client.d.ts +6 -3
  189. package/dist/api/resources/folders/resources/files/client/Client.js +48 -24
  190. package/dist/api/resources/folders/resources/passages/client/Client.d.ts +2 -1
  191. package/dist/api/resources/folders/resources/passages/client/Client.js +19 -10
  192. package/dist/api/resources/groups/client/Client.d.ts +12 -6
  193. package/dist/api/resources/groups/client/Client.js +105 -52
  194. package/dist/api/resources/groups/resources/messages/client/Client.d.ts +10 -5
  195. package/dist/api/resources/groups/resources/messages/client/Client.js +91 -49
  196. package/dist/api/resources/health/client/Client.d.ts +2 -1
  197. package/dist/api/resources/health/client/Client.js +17 -8
  198. package/dist/api/resources/identities/client/Client.d.ts +14 -7
  199. package/dist/api/resources/identities/client/Client.js +123 -61
  200. package/dist/api/resources/identities/resources/properties/client/Client.d.ts +2 -1
  201. package/dist/api/resources/identities/resources/properties/client/Client.js +9 -3
  202. package/dist/api/resources/jobs/client/Client.d.ts +10 -5
  203. package/dist/api/resources/jobs/client/Client.js +92 -47
  204. package/dist/api/resources/messages/client/Client.d.ts +2 -1
  205. package/dist/api/resources/messages/client/Client.js +19 -10
  206. package/dist/api/resources/models/client/Client.d.ts +2 -1
  207. package/dist/api/resources/models/client/Client.js +27 -14
  208. package/dist/api/resources/projects/client/Client.d.ts +2 -1
  209. package/dist/api/resources/projects/client/Client.js +18 -9
  210. package/dist/api/resources/providers/client/Client.d.ts +10 -5
  211. package/dist/api/resources/providers/client/Client.js +77 -36
  212. package/dist/api/resources/runs/client/Client.d.ts +8 -4
  213. package/dist/api/resources/runs/client/Client.js +74 -38
  214. package/dist/api/resources/runs/resources/messages/client/Client.d.ts +2 -1
  215. package/dist/api/resources/runs/resources/messages/client/Client.js +21 -12
  216. package/dist/api/resources/runs/resources/steps/client/Client.d.ts +2 -1
  217. package/dist/api/resources/runs/resources/steps/client/Client.js +19 -10
  218. package/dist/api/resources/runs/resources/usage/client/Client.d.ts +2 -1
  219. package/dist/api/resources/runs/resources/usage/client/Client.js +18 -9
  220. package/dist/api/resources/sources/client/Client.d.ts +20 -10
  221. package/dist/api/resources/sources/client/Client.js +173 -86
  222. package/dist/api/resources/sources/resources/files/client/Client.d.ts +6 -3
  223. package/dist/api/resources/sources/resources/files/client/Client.js +48 -24
  224. package/dist/api/resources/sources/resources/passages/client/Client.d.ts +2 -1
  225. package/dist/api/resources/sources/resources/passages/client/Client.js +19 -10
  226. package/dist/api/resources/steps/client/Client.d.ts +4 -2
  227. package/dist/api/resources/steps/client/Client.js +41 -21
  228. package/dist/api/resources/steps/resources/feedback/client/Client.d.ts +2 -1
  229. package/dist/api/resources/steps/resources/feedback/client/Client.js +23 -12
  230. package/dist/api/resources/tags/client/Client.d.ts +2 -1
  231. package/dist/api/resources/tags/client/Client.js +19 -10
  232. package/dist/api/resources/telemetry/client/Client.d.ts +2 -1
  233. package/dist/api/resources/telemetry/client/Client.js +18 -9
  234. package/dist/api/resources/templates/client/Client.d.ts +2 -1
  235. package/dist/api/resources/templates/client/Client.js +18 -9
  236. package/dist/api/resources/templates/resources/agents/client/Client.d.ts +2 -1
  237. package/dist/api/resources/templates/resources/agents/client/Client.js +19 -10
  238. package/dist/api/resources/tools/client/Client.d.ts +40 -20
  239. package/dist/api/resources/tools/client/Client.js +356 -182
  240. package/dist/api/resources/voice/client/Client.d.ts +2 -1
  241. package/dist/api/resources/voice/client/Client.js +9 -3
  242. package/dist/api/types/LettaStreamingRequest.d.ts +2 -0
  243. package/dist/core/fetcher/APIResponse.d.ts +10 -0
  244. package/dist/core/fetcher/Fetcher.d.ts +1 -1
  245. package/dist/core/fetcher/Fetcher.js +11 -3
  246. package/dist/core/fetcher/Headers.d.ts +2 -0
  247. package/dist/core/fetcher/Headers.js +84 -0
  248. package/dist/core/fetcher/HttpResponsePromise.d.ts +58 -0
  249. package/dist/core/fetcher/HttpResponsePromise.js +103 -0
  250. package/dist/core/fetcher/RawResponse.d.ts +29 -0
  251. package/dist/core/fetcher/RawResponse.js +44 -0
  252. package/dist/core/fetcher/createRequestUrl.d.ts +1 -1
  253. package/dist/core/fetcher/getRequestBody.js +2 -1
  254. package/dist/core/fetcher/index.d.ts +3 -0
  255. package/dist/core/fetcher/index.js +7 -1
  256. package/dist/core/fetcher/requestWithRetries.js +1 -1
  257. package/dist/core/form-data-utils/FormDataWrapper.d.ts +3 -0
  258. package/dist/core/form-data-utils/FormDataWrapper.js +53 -10
  259. package/dist/core/form-data-utils/encodeAsFormParameter.d.ts +4 -0
  260. package/dist/core/form-data-utils/encodeAsFormParameter.js +18 -0
  261. package/dist/core/form-data-utils/index.d.ts +1 -0
  262. package/dist/core/form-data-utils/index.js +3 -0
  263. package/dist/core/json.d.ts +15 -0
  264. package/dist/core/json.js +24 -0
  265. package/dist/core/schemas/Schema.d.ts +2 -0
  266. package/dist/core/schemas/Schema.js +2 -0
  267. package/dist/core/schemas/builders/bigint/bigint.d.ts +1 -1
  268. package/dist/core/schemas/builders/bigint/bigint.js +21 -17
  269. package/dist/core/schemas/builders/object/object.js +1 -0
  270. package/dist/core/schemas/builders/record/record.js +1 -2
  271. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
  272. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +64 -0
  273. package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +1 -1
  274. package/dist/errors/LettaError.d.ts +4 -1
  275. package/dist/errors/LettaError.js +6 -8
  276. package/dist/serialization/types/LettaStreamingRequest.d.ts +1 -0
  277. package/dist/serialization/types/LettaStreamingRequest.js +1 -0
  278. package/dist/version.d.ts +1 -1
  279. package/dist/version.js +1 -1
  280. package/errors/LettaError.d.ts +4 -1
  281. package/errors/LettaError.js +6 -8
  282. package/package.json +4 -4
  283. package/serialization/types/LettaStreamingRequest.d.ts +1 -0
  284. package/serialization/types/LettaStreamingRequest.js +1 -0
  285. package/version.d.ts +1 -1
  286. package/version.js +1 -1
@@ -85,20 +85,26 @@ class Templates {
85
85
  * @example
86
86
  * await client.agents.templates.createVersion("agent_id")
87
87
  */
88
- createVersion(agentId_1) {
88
+ createVersion(agentId, request = {}, requestOptions) {
89
+ return core.HttpResponsePromise.fromPromise(this.__createVersion(agentId, request, requestOptions));
90
+ }
91
+ __createVersion(agentId_1) {
89
92
  return __awaiter(this, arguments, void 0, function* (agentId, request = {}, requestOptions) {
90
93
  var _a, _b, _c;
91
94
  const { returnAgentState } = request, _body = __rest(request, ["returnAgentState"]);
92
95
  const _queryParams = {};
93
96
  if (returnAgentState != null) {
94
- _queryParams["returnAgentState"] = returnAgentState;
97
+ _queryParams["returnAgentState"] =
98
+ serializers.agents.TemplatesCreateVersionRequestReturnAgentState.jsonOrThrow(returnAgentState, {
99
+ unrecognizedObjectKeys: "strip",
100
+ });
95
101
  }
96
102
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
97
103
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/version-template`),
98
104
  method: "POST",
99
105
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
100
106
  ? yield core.Supplier.get(this._options.project)
101
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.170", "User-Agent": "@letta-ai/letta-client/0.1.170", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
107
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.172", "User-Agent": "@letta-ai/letta-client/0.1.172", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
102
108
  contentType: "application/json",
103
109
  queryParameters: _queryParams,
104
110
  requestType: "json",
@@ -110,18 +116,19 @@ class Templates {
110
116
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
111
117
  });
112
118
  if (_response.ok) {
113
- return;
119
+ return { data: undefined, rawResponse: _response.rawResponse };
114
120
  }
115
121
  if (_response.error.reason === "status-code") {
116
122
  switch (_response.error.statusCode) {
117
123
  case 404:
118
- throw new Letta.NotFoundError(_response.error.body);
124
+ throw new Letta.NotFoundError(_response.error.body, _response.rawResponse);
119
125
  case 500:
120
- throw new Letta.InternalServerError(_response.error.body);
126
+ throw new Letta.InternalServerError(_response.error.body, _response.rawResponse);
121
127
  default:
122
128
  throw new errors.LettaError({
123
129
  statusCode: _response.error.statusCode,
124
130
  body: _response.error.body,
131
+ rawResponse: _response.rawResponse,
125
132
  });
126
133
  }
127
134
  }
@@ -130,12 +137,14 @@ class Templates {
130
137
  throw new errors.LettaError({
131
138
  statusCode: _response.error.statusCode,
132
139
  body: _response.error.rawBody,
140
+ rawResponse: _response.rawResponse,
133
141
  });
134
142
  case "timeout":
135
143
  throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/agents/{agent_id}/version-template.");
136
144
  case "unknown":
137
145
  throw new errors.LettaError({
138
146
  message: _response.error.errorMessage,
147
+ rawResponse: _response.rawResponse,
139
148
  });
140
149
  }
141
150
  });
@@ -160,6 +169,9 @@ class Templates {
160
169
  * })
161
170
  */
162
171
  migrate(agentId, request, requestOptions) {
172
+ return core.HttpResponsePromise.fromPromise(this.__migrate(agentId, request, requestOptions));
173
+ }
174
+ __migrate(agentId, request, requestOptions) {
163
175
  return __awaiter(this, void 0, void 0, function* () {
164
176
  var _a, _b, _c;
165
177
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
@@ -167,7 +179,7 @@ class Templates {
167
179
  method: "POST",
168
180
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
169
181
  ? yield core.Supplier.get(this._options.project)
170
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.170", "User-Agent": "@letta-ai/letta-client/0.1.170", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
182
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.172", "User-Agent": "@letta-ai/letta-client/0.1.172", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
171
183
  contentType: "application/json",
172
184
  requestType: "json",
173
185
  body: serializers.agents.TemplatesMigrateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -176,18 +188,21 @@ class Templates {
176
188
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
177
189
  });
178
190
  if (_response.ok) {
179
- return serializers.agents.TemplatesMigrateResponse.parseOrThrow(_response.body, {
180
- unrecognizedObjectKeys: "passthrough",
181
- allowUnrecognizedUnionMembers: true,
182
- allowUnrecognizedEnumValues: true,
183
- skipValidation: true,
184
- breadcrumbsPrefix: ["response"],
185
- });
191
+ return {
192
+ data: serializers.agents.TemplatesMigrateResponse.parseOrThrow(_response.body, {
193
+ unrecognizedObjectKeys: "passthrough",
194
+ allowUnrecognizedUnionMembers: true,
195
+ allowUnrecognizedEnumValues: true,
196
+ skipValidation: true,
197
+ breadcrumbsPrefix: ["response"],
198
+ }),
199
+ rawResponse: _response.rawResponse,
200
+ };
186
201
  }
187
202
  if (_response.error.reason === "status-code") {
188
203
  switch (_response.error.statusCode) {
189
204
  case 404:
190
- throw new Letta.NotFoundError(_response.error.body);
205
+ throw new Letta.NotFoundError(_response.error.body, _response.rawResponse);
191
206
  case 409:
192
207
  throw new Letta.ConflictError(serializers.ConflictErrorBody.parseOrThrow(_response.error.body, {
193
208
  unrecognizedObjectKeys: "passthrough",
@@ -195,13 +210,14 @@ class Templates {
195
210
  allowUnrecognizedEnumValues: true,
196
211
  skipValidation: true,
197
212
  breadcrumbsPrefix: ["response"],
198
- }));
213
+ }), _response.rawResponse);
199
214
  case 500:
200
- throw new Letta.InternalServerError(_response.error.body);
215
+ throw new Letta.InternalServerError(_response.error.body, _response.rawResponse);
201
216
  default:
202
217
  throw new errors.LettaError({
203
218
  statusCode: _response.error.statusCode,
204
219
  body: _response.error.body,
220
+ rawResponse: _response.rawResponse,
205
221
  });
206
222
  }
207
223
  }
@@ -210,12 +226,14 @@ class Templates {
210
226
  throw new errors.LettaError({
211
227
  statusCode: _response.error.statusCode,
212
228
  body: _response.error.rawBody,
229
+ rawResponse: _response.rawResponse,
213
230
  });
214
231
  case "timeout":
215
232
  throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/agents/{agent_id}/migrate.");
216
233
  case "unknown":
217
234
  throw new errors.LettaError({
218
235
  message: _response.error.errorMessage,
236
+ rawResponse: _response.rawResponse,
219
237
  });
220
238
  }
221
239
  });
@@ -234,7 +252,10 @@ class Templates {
234
252
  * @example
235
253
  * await client.agents.templates.create("agent_id")
236
254
  */
237
- create(agentId_1) {
255
+ create(agentId, request = {}, requestOptions) {
256
+ return core.HttpResponsePromise.fromPromise(this.__create(agentId, request, requestOptions));
257
+ }
258
+ __create(agentId_1) {
238
259
  return __awaiter(this, arguments, void 0, function* (agentId, request = {}, requestOptions) {
239
260
  var _a, _b, _c;
240
261
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
@@ -242,7 +263,7 @@ class Templates {
242
263
  method: "POST",
243
264
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
244
265
  ? yield core.Supplier.get(this._options.project)
245
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.170", "User-Agent": "@letta-ai/letta-client/0.1.170", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
266
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.172", "User-Agent": "@letta-ai/letta-client/0.1.172", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
246
267
  contentType: "application/json",
247
268
  requestType: "json",
248
269
  body: serializers.agents.TemplatesCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -251,22 +272,26 @@ class Templates {
251
272
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
252
273
  });
253
274
  if (_response.ok) {
254
- return serializers.agents.TemplatesCreateResponse.parseOrThrow(_response.body, {
255
- unrecognizedObjectKeys: "passthrough",
256
- allowUnrecognizedUnionMembers: true,
257
- allowUnrecognizedEnumValues: true,
258
- skipValidation: true,
259
- breadcrumbsPrefix: ["response"],
260
- });
275
+ return {
276
+ data: serializers.agents.TemplatesCreateResponse.parseOrThrow(_response.body, {
277
+ unrecognizedObjectKeys: "passthrough",
278
+ allowUnrecognizedUnionMembers: true,
279
+ allowUnrecognizedEnumValues: true,
280
+ skipValidation: true,
281
+ breadcrumbsPrefix: ["response"],
282
+ }),
283
+ rawResponse: _response.rawResponse,
284
+ };
261
285
  }
262
286
  if (_response.error.reason === "status-code") {
263
287
  switch (_response.error.statusCode) {
264
288
  case 500:
265
- throw new Letta.InternalServerError(_response.error.body);
289
+ throw new Letta.InternalServerError(_response.error.body, _response.rawResponse);
266
290
  default:
267
291
  throw new errors.LettaError({
268
292
  statusCode: _response.error.statusCode,
269
293
  body: _response.error.body,
294
+ rawResponse: _response.rawResponse,
270
295
  });
271
296
  }
272
297
  }
@@ -275,12 +300,14 @@ class Templates {
275
300
  throw new errors.LettaError({
276
301
  statusCode: _response.error.statusCode,
277
302
  body: _response.error.rawBody,
303
+ rawResponse: _response.rawResponse,
278
304
  });
279
305
  case "timeout":
280
306
  throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/agents/{agent_id}/template.");
281
307
  case "unknown":
282
308
  throw new errors.LettaError({
283
309
  message: _response.error.errorMessage,
310
+ rawResponse: _response.rawResponse,
284
311
  });
285
312
  }
286
313
  });
@@ -41,7 +41,8 @@ export declare class Tools {
41
41
  * @example
42
42
  * await client.agents.tools.list("agent_id")
43
43
  */
44
- list(agentId: string, requestOptions?: Tools.RequestOptions): Promise<Letta.Tool[]>;
44
+ list(agentId: string, requestOptions?: Tools.RequestOptions): core.HttpResponsePromise<Letta.Tool[]>;
45
+ private __list;
45
46
  /**
46
47
  * Attach a tool to an agent.
47
48
  *
@@ -54,7 +55,8 @@ export declare class Tools {
54
55
  * @example
55
56
  * await client.agents.tools.attach("agent_id", "tool_id")
56
57
  */
57
- attach(agentId: string, toolId: string, requestOptions?: Tools.RequestOptions): Promise<Letta.AgentState>;
58
+ attach(agentId: string, toolId: string, requestOptions?: Tools.RequestOptions): core.HttpResponsePromise<Letta.AgentState>;
59
+ private __attach;
58
60
  /**
59
61
  * Detach a tool from an agent.
60
62
  *
@@ -67,7 +69,8 @@ export declare class Tools {
67
69
  * @example
68
70
  * await client.agents.tools.detach("agent_id", "tool_id")
69
71
  */
70
- detach(agentId: string, toolId: string, requestOptions?: Tools.RequestOptions): Promise<Letta.AgentState>;
72
+ detach(agentId: string, toolId: string, requestOptions?: Tools.RequestOptions): core.HttpResponsePromise<Letta.AgentState>;
73
+ private __detach;
71
74
  protected _getCustomAuthorizationHeaders(): Promise<{
72
75
  Authorization: string;
73
76
  }>;
@@ -71,6 +71,9 @@ class Tools {
71
71
  * await client.agents.tools.list("agent_id")
72
72
  */
73
73
  list(agentId, requestOptions) {
74
+ return core.HttpResponsePromise.fromPromise(this.__list(agentId, requestOptions));
75
+ }
76
+ __list(agentId, requestOptions) {
74
77
  return __awaiter(this, void 0, void 0, function* () {
75
78
  var _a, _b, _c;
76
79
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
@@ -78,7 +81,7 @@ class Tools {
78
81
  method: "GET",
79
82
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
80
83
  ? yield core.Supplier.get(this._options.project)
81
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.170", "User-Agent": "@letta-ai/letta-client/0.1.170", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
84
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.172", "User-Agent": "@letta-ai/letta-client/0.1.172", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
82
85
  contentType: "application/json",
83
86
  requestType: "json",
84
87
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -86,13 +89,16 @@ class Tools {
86
89
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
87
90
  });
88
91
  if (_response.ok) {
89
- return serializers.agents.tools.list.Response.parseOrThrow(_response.body, {
90
- unrecognizedObjectKeys: "passthrough",
91
- allowUnrecognizedUnionMembers: true,
92
- allowUnrecognizedEnumValues: true,
93
- skipValidation: true,
94
- breadcrumbsPrefix: ["response"],
95
- });
92
+ return {
93
+ data: serializers.agents.tools.list.Response.parseOrThrow(_response.body, {
94
+ unrecognizedObjectKeys: "passthrough",
95
+ allowUnrecognizedUnionMembers: true,
96
+ allowUnrecognizedEnumValues: true,
97
+ skipValidation: true,
98
+ breadcrumbsPrefix: ["response"],
99
+ }),
100
+ rawResponse: _response.rawResponse,
101
+ };
96
102
  }
97
103
  if (_response.error.reason === "status-code") {
98
104
  switch (_response.error.statusCode) {
@@ -103,11 +109,12 @@ class Tools {
103
109
  allowUnrecognizedEnumValues: true,
104
110
  skipValidation: true,
105
111
  breadcrumbsPrefix: ["response"],
106
- }));
112
+ }), _response.rawResponse);
107
113
  default:
108
114
  throw new errors.LettaError({
109
115
  statusCode: _response.error.statusCode,
110
116
  body: _response.error.body,
117
+ rawResponse: _response.rawResponse,
111
118
  });
112
119
  }
113
120
  }
@@ -116,12 +123,14 @@ class Tools {
116
123
  throw new errors.LettaError({
117
124
  statusCode: _response.error.statusCode,
118
125
  body: _response.error.rawBody,
126
+ rawResponse: _response.rawResponse,
119
127
  });
120
128
  case "timeout":
121
129
  throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/agents/{agent_id}/tools.");
122
130
  case "unknown":
123
131
  throw new errors.LettaError({
124
132
  message: _response.error.errorMessage,
133
+ rawResponse: _response.rawResponse,
125
134
  });
126
135
  }
127
136
  });
@@ -139,6 +148,9 @@ class Tools {
139
148
  * await client.agents.tools.attach("agent_id", "tool_id")
140
149
  */
141
150
  attach(agentId, toolId, requestOptions) {
151
+ return core.HttpResponsePromise.fromPromise(this.__attach(agentId, toolId, requestOptions));
152
+ }
153
+ __attach(agentId, toolId, requestOptions) {
142
154
  return __awaiter(this, void 0, void 0, function* () {
143
155
  var _a, _b, _c;
144
156
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
@@ -146,7 +158,7 @@ class Tools {
146
158
  method: "PATCH",
147
159
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
148
160
  ? yield core.Supplier.get(this._options.project)
149
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.170", "User-Agent": "@letta-ai/letta-client/0.1.170", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
161
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.172", "User-Agent": "@letta-ai/letta-client/0.1.172", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
150
162
  contentType: "application/json",
151
163
  requestType: "json",
152
164
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -154,13 +166,16 @@ class Tools {
154
166
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
155
167
  });
156
168
  if (_response.ok) {
157
- return serializers.AgentState.parseOrThrow(_response.body, {
158
- unrecognizedObjectKeys: "passthrough",
159
- allowUnrecognizedUnionMembers: true,
160
- allowUnrecognizedEnumValues: true,
161
- skipValidation: true,
162
- breadcrumbsPrefix: ["response"],
163
- });
169
+ return {
170
+ data: serializers.AgentState.parseOrThrow(_response.body, {
171
+ unrecognizedObjectKeys: "passthrough",
172
+ allowUnrecognizedUnionMembers: true,
173
+ allowUnrecognizedEnumValues: true,
174
+ skipValidation: true,
175
+ breadcrumbsPrefix: ["response"],
176
+ }),
177
+ rawResponse: _response.rawResponse,
178
+ };
164
179
  }
165
180
  if (_response.error.reason === "status-code") {
166
181
  switch (_response.error.statusCode) {
@@ -171,11 +186,12 @@ class Tools {
171
186
  allowUnrecognizedEnumValues: true,
172
187
  skipValidation: true,
173
188
  breadcrumbsPrefix: ["response"],
174
- }));
189
+ }), _response.rawResponse);
175
190
  default:
176
191
  throw new errors.LettaError({
177
192
  statusCode: _response.error.statusCode,
178
193
  body: _response.error.body,
194
+ rawResponse: _response.rawResponse,
179
195
  });
180
196
  }
181
197
  }
@@ -184,12 +200,14 @@ class Tools {
184
200
  throw new errors.LettaError({
185
201
  statusCode: _response.error.statusCode,
186
202
  body: _response.error.rawBody,
203
+ rawResponse: _response.rawResponse,
187
204
  });
188
205
  case "timeout":
189
206
  throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/agents/{agent_id}/tools/attach/{tool_id}.");
190
207
  case "unknown":
191
208
  throw new errors.LettaError({
192
209
  message: _response.error.errorMessage,
210
+ rawResponse: _response.rawResponse,
193
211
  });
194
212
  }
195
213
  });
@@ -207,6 +225,9 @@ class Tools {
207
225
  * await client.agents.tools.detach("agent_id", "tool_id")
208
226
  */
209
227
  detach(agentId, toolId, requestOptions) {
228
+ return core.HttpResponsePromise.fromPromise(this.__detach(agentId, toolId, requestOptions));
229
+ }
230
+ __detach(agentId, toolId, requestOptions) {
210
231
  return __awaiter(this, void 0, void 0, function* () {
211
232
  var _a, _b, _c;
212
233
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
@@ -214,7 +235,7 @@ class Tools {
214
235
  method: "PATCH",
215
236
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
216
237
  ? yield core.Supplier.get(this._options.project)
217
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.170", "User-Agent": "@letta-ai/letta-client/0.1.170", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
238
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.172", "User-Agent": "@letta-ai/letta-client/0.1.172", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
218
239
  contentType: "application/json",
219
240
  requestType: "json",
220
241
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -222,13 +243,16 @@ class Tools {
222
243
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
223
244
  });
224
245
  if (_response.ok) {
225
- return serializers.AgentState.parseOrThrow(_response.body, {
226
- unrecognizedObjectKeys: "passthrough",
227
- allowUnrecognizedUnionMembers: true,
228
- allowUnrecognizedEnumValues: true,
229
- skipValidation: true,
230
- breadcrumbsPrefix: ["response"],
231
- });
246
+ return {
247
+ data: serializers.AgentState.parseOrThrow(_response.body, {
248
+ unrecognizedObjectKeys: "passthrough",
249
+ allowUnrecognizedUnionMembers: true,
250
+ allowUnrecognizedEnumValues: true,
251
+ skipValidation: true,
252
+ breadcrumbsPrefix: ["response"],
253
+ }),
254
+ rawResponse: _response.rawResponse,
255
+ };
232
256
  }
233
257
  if (_response.error.reason === "status-code") {
234
258
  switch (_response.error.statusCode) {
@@ -239,11 +263,12 @@ class Tools {
239
263
  allowUnrecognizedEnumValues: true,
240
264
  skipValidation: true,
241
265
  breadcrumbsPrefix: ["response"],
242
- }));
266
+ }), _response.rawResponse);
243
267
  default:
244
268
  throw new errors.LettaError({
245
269
  statusCode: _response.error.statusCode,
246
270
  body: _response.error.body,
271
+ rawResponse: _response.rawResponse,
247
272
  });
248
273
  }
249
274
  }
@@ -252,12 +277,14 @@ class Tools {
252
277
  throw new errors.LettaError({
253
278
  statusCode: _response.error.statusCode,
254
279
  body: _response.error.rawBody,
280
+ rawResponse: _response.rawResponse,
255
281
  });
256
282
  case "timeout":
257
283
  throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/agents/{agent_id}/tools/detach/{tool_id}.");
258
284
  case "unknown":
259
285
  throw new errors.LettaError({
260
286
  message: _response.error.errorMessage,
287
+ rawResponse: _response.rawResponse,
261
288
  });
262
289
  }
263
290
  });
@@ -40,7 +40,8 @@ export declare class Batches {
40
40
  * @example
41
41
  * await client.batches.list()
42
42
  */
43
- list(requestOptions?: Batches.RequestOptions): Promise<Letta.BatchJob[]>;
43
+ list(requestOptions?: Batches.RequestOptions): core.HttpResponsePromise<Letta.BatchJob[]>;
44
+ private __list;
44
45
  /**
45
46
  * Submit a batch of agent messages for asynchronous processing.
46
47
  * Creates a job that will fan out messages to all listed agents and process them in parallel.
@@ -64,7 +65,8 @@ export declare class Batches {
64
65
  * }]
65
66
  * })
66
67
  */
67
- create(request: Letta.CreateBatch, requestOptions?: Batches.RequestOptions): Promise<Letta.BatchJob>;
68
+ create(request: Letta.CreateBatch, requestOptions?: Batches.RequestOptions): core.HttpResponsePromise<Letta.BatchJob>;
69
+ private __create;
68
70
  /**
69
71
  * Get the status of a batch run.
70
72
  *
@@ -76,7 +78,8 @@ export declare class Batches {
76
78
  * @example
77
79
  * await client.batches.retrieve("batch_id")
78
80
  */
79
- retrieve(batchId: string, requestOptions?: Batches.RequestOptions): Promise<Letta.BatchJob>;
81
+ retrieve(batchId: string, requestOptions?: Batches.RequestOptions): core.HttpResponsePromise<Letta.BatchJob>;
82
+ private __retrieve;
80
83
  /**
81
84
  * Cancel a batch run.
82
85
  *
@@ -88,7 +91,8 @@ export declare class Batches {
88
91
  * @example
89
92
  * await client.batches.cancel("batch_id")
90
93
  */
91
- cancel(batchId: string, requestOptions?: Batches.RequestOptions): Promise<unknown>;
94
+ cancel(batchId: string, requestOptions?: Batches.RequestOptions): core.HttpResponsePromise<unknown>;
95
+ private __cancel;
92
96
  protected _getCustomAuthorizationHeaders(): Promise<{
93
97
  Authorization: string;
94
98
  }>;