@letta-ai/letta-client 0.1.169 → 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 (330) 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/api/types/ModalSandboxConfig.d.ts +9 -0
  108. package/api/types/ModalSandboxConfig.js +5 -0
  109. package/api/types/SandboxConfigCreateConfig.d.ts +1 -1
  110. package/api/types/SandboxConfigUpdateConfig.d.ts +1 -1
  111. package/api/types/SandboxType.d.ts +2 -1
  112. package/api/types/SandboxType.js +1 -0
  113. package/api/types/ToolType.d.ts +1 -2
  114. package/api/types/ToolType.js +0 -1
  115. package/api/types/index.d.ts +1 -0
  116. package/api/types/index.js +1 -0
  117. package/core/fetcher/APIResponse.d.ts +10 -0
  118. package/core/fetcher/Fetcher.d.ts +1 -1
  119. package/core/fetcher/Fetcher.js +11 -3
  120. package/core/fetcher/Headers.d.ts +2 -0
  121. package/core/fetcher/Headers.js +84 -0
  122. package/core/fetcher/HttpResponsePromise.d.ts +58 -0
  123. package/core/fetcher/HttpResponsePromise.js +103 -0
  124. package/core/fetcher/RawResponse.d.ts +29 -0
  125. package/core/fetcher/RawResponse.js +44 -0
  126. package/core/fetcher/createRequestUrl.d.ts +1 -1
  127. package/core/fetcher/getRequestBody.js +2 -1
  128. package/core/fetcher/index.d.ts +3 -0
  129. package/core/fetcher/index.js +7 -1
  130. package/core/fetcher/requestWithRetries.js +1 -1
  131. package/core/form-data-utils/FormDataWrapper.d.ts +3 -0
  132. package/core/form-data-utils/FormDataWrapper.js +53 -10
  133. package/core/form-data-utils/encodeAsFormParameter.d.ts +4 -0
  134. package/core/form-data-utils/encodeAsFormParameter.js +18 -0
  135. package/core/form-data-utils/index.d.ts +1 -0
  136. package/core/form-data-utils/index.js +3 -0
  137. package/core/json.d.ts +15 -0
  138. package/core/json.js +24 -0
  139. package/core/schemas/Schema.d.ts +2 -0
  140. package/core/schemas/Schema.js +2 -0
  141. package/core/schemas/builders/bigint/bigint.d.ts +1 -1
  142. package/core/schemas/builders/bigint/bigint.js +21 -17
  143. package/core/schemas/builders/object/object.js +1 -0
  144. package/core/schemas/builders/record/record.js +1 -2
  145. package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
  146. package/core/schemas/builders/schema-utils/getSchemaUtils.js +64 -0
  147. package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +1 -1
  148. package/dist/api/errors/BadRequestError.d.ts +2 -1
  149. package/dist/api/errors/BadRequestError.js +2 -1
  150. package/dist/api/errors/ConflictError.d.ts +2 -1
  151. package/dist/api/errors/ConflictError.js +2 -1
  152. package/dist/api/errors/InternalServerError.d.ts +2 -1
  153. package/dist/api/errors/InternalServerError.js +2 -1
  154. package/dist/api/errors/NotFoundError.d.ts +2 -1
  155. package/dist/api/errors/NotFoundError.js +2 -1
  156. package/dist/api/errors/PaymentRequiredError.d.ts +2 -1
  157. package/dist/api/errors/PaymentRequiredError.js +2 -1
  158. package/dist/api/errors/UnprocessableEntityError.d.ts +2 -1
  159. package/dist/api/errors/UnprocessableEntityError.js +2 -1
  160. package/dist/api/resources/agents/client/Client.d.ts +20 -10
  161. package/dist/api/resources/agents/client/Client.js +166 -82
  162. package/dist/api/resources/agents/resources/blocks/client/Client.d.ts +10 -5
  163. package/dist/api/resources/agents/resources/blocks/client/Client.js +90 -45
  164. package/dist/api/resources/agents/resources/context/client/Client.d.ts +2 -1
  165. package/dist/api/resources/agents/resources/context/client/Client.js +18 -9
  166. package/dist/api/resources/agents/resources/coreMemory/client/Client.d.ts +2 -1
  167. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +18 -9
  168. package/dist/api/resources/agents/resources/files/client/Client.d.ts +6 -3
  169. package/dist/api/resources/agents/resources/files/client/Client.js +45 -21
  170. package/dist/api/resources/agents/resources/folders/client/Client.d.ts +6 -3
  171. package/dist/api/resources/agents/resources/folders/client/Client.js +54 -27
  172. package/dist/api/resources/agents/resources/groups/client/Client.d.ts +2 -1
  173. package/dist/api/resources/agents/resources/groups/client/Client.js +19 -10
  174. package/dist/api/resources/agents/resources/memoryVariables/client/Client.d.ts +2 -1
  175. package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +18 -9
  176. package/dist/api/resources/agents/resources/messages/client/Client.d.ts +16 -8
  177. package/dist/api/resources/agents/resources/messages/client/Client.js +155 -83
  178. package/dist/api/resources/agents/resources/passages/client/Client.d.ts +8 -4
  179. package/dist/api/resources/agents/resources/passages/client/Client.js +64 -31
  180. package/dist/api/resources/agents/resources/sources/client/Client.d.ts +6 -3
  181. package/dist/api/resources/agents/resources/sources/client/Client.js +54 -27
  182. package/dist/api/resources/agents/resources/templates/client/Client.d.ts +6 -3
  183. package/dist/api/resources/agents/resources/templates/client/Client.js +54 -27
  184. package/dist/api/resources/agents/resources/tools/client/Client.d.ts +6 -3
  185. package/dist/api/resources/agents/resources/tools/client/Client.js +54 -27
  186. package/dist/api/resources/batches/client/Client.d.ts +8 -4
  187. package/dist/api/resources/batches/client/Client.js +63 -30
  188. package/dist/api/resources/blocks/client/Client.d.ts +12 -6
  189. package/dist/api/resources/blocks/client/Client.js +100 -49
  190. package/dist/api/resources/blocks/resources/agents/client/Client.d.ts +2 -1
  191. package/dist/api/resources/blocks/resources/agents/client/Client.js +19 -10
  192. package/dist/api/resources/clientSideAccessTokens/client/Client.d.ts +6 -3
  193. package/dist/api/resources/clientSideAccessTokens/client/Client.js +46 -22
  194. package/dist/api/resources/embeddingModels/client/Client.d.ts +2 -1
  195. package/dist/api/resources/embeddingModels/client/Client.js +18 -9
  196. package/dist/api/resources/folders/client/Client.d.ts +18 -9
  197. package/dist/api/resources/folders/client/Client.js +154 -76
  198. package/dist/api/resources/folders/resources/files/client/Client.d.ts +6 -3
  199. package/dist/api/resources/folders/resources/files/client/Client.js +48 -24
  200. package/dist/api/resources/folders/resources/passages/client/Client.d.ts +2 -1
  201. package/dist/api/resources/folders/resources/passages/client/Client.js +19 -10
  202. package/dist/api/resources/groups/client/Client.d.ts +12 -6
  203. package/dist/api/resources/groups/client/Client.js +105 -52
  204. package/dist/api/resources/groups/resources/messages/client/Client.d.ts +10 -5
  205. package/dist/api/resources/groups/resources/messages/client/Client.js +91 -49
  206. package/dist/api/resources/health/client/Client.d.ts +2 -1
  207. package/dist/api/resources/health/client/Client.js +17 -8
  208. package/dist/api/resources/identities/client/Client.d.ts +14 -7
  209. package/dist/api/resources/identities/client/Client.js +123 -61
  210. package/dist/api/resources/identities/resources/properties/client/Client.d.ts +2 -1
  211. package/dist/api/resources/identities/resources/properties/client/Client.js +9 -3
  212. package/dist/api/resources/jobs/client/Client.d.ts +10 -5
  213. package/dist/api/resources/jobs/client/Client.js +92 -47
  214. package/dist/api/resources/messages/client/Client.d.ts +2 -1
  215. package/dist/api/resources/messages/client/Client.js +19 -10
  216. package/dist/api/resources/models/client/Client.d.ts +2 -1
  217. package/dist/api/resources/models/client/Client.js +27 -14
  218. package/dist/api/resources/projects/client/Client.d.ts +2 -1
  219. package/dist/api/resources/projects/client/Client.js +18 -9
  220. package/dist/api/resources/providers/client/Client.d.ts +10 -5
  221. package/dist/api/resources/providers/client/Client.js +77 -36
  222. package/dist/api/resources/runs/client/Client.d.ts +8 -4
  223. package/dist/api/resources/runs/client/Client.js +74 -38
  224. package/dist/api/resources/runs/resources/messages/client/Client.d.ts +2 -1
  225. package/dist/api/resources/runs/resources/messages/client/Client.js +21 -12
  226. package/dist/api/resources/runs/resources/steps/client/Client.d.ts +2 -1
  227. package/dist/api/resources/runs/resources/steps/client/Client.js +19 -10
  228. package/dist/api/resources/runs/resources/usage/client/Client.d.ts +2 -1
  229. package/dist/api/resources/runs/resources/usage/client/Client.js +18 -9
  230. package/dist/api/resources/sources/client/Client.d.ts +20 -10
  231. package/dist/api/resources/sources/client/Client.js +173 -86
  232. package/dist/api/resources/sources/resources/files/client/Client.d.ts +6 -3
  233. package/dist/api/resources/sources/resources/files/client/Client.js +48 -24
  234. package/dist/api/resources/sources/resources/passages/client/Client.d.ts +2 -1
  235. package/dist/api/resources/sources/resources/passages/client/Client.js +19 -10
  236. package/dist/api/resources/steps/client/Client.d.ts +4 -2
  237. package/dist/api/resources/steps/client/Client.js +41 -21
  238. package/dist/api/resources/steps/resources/feedback/client/Client.d.ts +2 -1
  239. package/dist/api/resources/steps/resources/feedback/client/Client.js +23 -12
  240. package/dist/api/resources/tags/client/Client.d.ts +2 -1
  241. package/dist/api/resources/tags/client/Client.js +19 -10
  242. package/dist/api/resources/telemetry/client/Client.d.ts +2 -1
  243. package/dist/api/resources/telemetry/client/Client.js +18 -9
  244. package/dist/api/resources/templates/client/Client.d.ts +2 -1
  245. package/dist/api/resources/templates/client/Client.js +18 -9
  246. package/dist/api/resources/templates/resources/agents/client/Client.d.ts +2 -1
  247. package/dist/api/resources/templates/resources/agents/client/Client.js +19 -10
  248. package/dist/api/resources/tools/client/Client.d.ts +40 -20
  249. package/dist/api/resources/tools/client/Client.js +356 -182
  250. package/dist/api/resources/voice/client/Client.d.ts +2 -1
  251. package/dist/api/resources/voice/client/Client.js +9 -3
  252. package/dist/api/types/LettaStreamingRequest.d.ts +2 -0
  253. package/dist/api/types/ModalSandboxConfig.d.ts +9 -0
  254. package/dist/api/types/ModalSandboxConfig.js +5 -0
  255. package/dist/api/types/SandboxConfigCreateConfig.d.ts +1 -1
  256. package/dist/api/types/SandboxConfigUpdateConfig.d.ts +1 -1
  257. package/dist/api/types/SandboxType.d.ts +2 -1
  258. package/dist/api/types/SandboxType.js +1 -0
  259. package/dist/api/types/ToolType.d.ts +1 -2
  260. package/dist/api/types/ToolType.js +0 -1
  261. package/dist/api/types/index.d.ts +1 -0
  262. package/dist/api/types/index.js +1 -0
  263. package/dist/core/fetcher/APIResponse.d.ts +10 -0
  264. package/dist/core/fetcher/Fetcher.d.ts +1 -1
  265. package/dist/core/fetcher/Fetcher.js +11 -3
  266. package/dist/core/fetcher/Headers.d.ts +2 -0
  267. package/dist/core/fetcher/Headers.js +84 -0
  268. package/dist/core/fetcher/HttpResponsePromise.d.ts +58 -0
  269. package/dist/core/fetcher/HttpResponsePromise.js +103 -0
  270. package/dist/core/fetcher/RawResponse.d.ts +29 -0
  271. package/dist/core/fetcher/RawResponse.js +44 -0
  272. package/dist/core/fetcher/createRequestUrl.d.ts +1 -1
  273. package/dist/core/fetcher/getRequestBody.js +2 -1
  274. package/dist/core/fetcher/index.d.ts +3 -0
  275. package/dist/core/fetcher/index.js +7 -1
  276. package/dist/core/fetcher/requestWithRetries.js +1 -1
  277. package/dist/core/form-data-utils/FormDataWrapper.d.ts +3 -0
  278. package/dist/core/form-data-utils/FormDataWrapper.js +53 -10
  279. package/dist/core/form-data-utils/encodeAsFormParameter.d.ts +4 -0
  280. package/dist/core/form-data-utils/encodeAsFormParameter.js +18 -0
  281. package/dist/core/form-data-utils/index.d.ts +1 -0
  282. package/dist/core/form-data-utils/index.js +3 -0
  283. package/dist/core/json.d.ts +15 -0
  284. package/dist/core/json.js +24 -0
  285. package/dist/core/schemas/Schema.d.ts +2 -0
  286. package/dist/core/schemas/Schema.js +2 -0
  287. package/dist/core/schemas/builders/bigint/bigint.d.ts +1 -1
  288. package/dist/core/schemas/builders/bigint/bigint.js +21 -17
  289. package/dist/core/schemas/builders/object/object.js +1 -0
  290. package/dist/core/schemas/builders/record/record.js +1 -2
  291. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
  292. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +64 -0
  293. package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +1 -1
  294. package/dist/errors/LettaError.d.ts +4 -1
  295. package/dist/errors/LettaError.js +6 -8
  296. package/dist/serialization/types/LettaStreamingRequest.d.ts +1 -0
  297. package/dist/serialization/types/LettaStreamingRequest.js +1 -0
  298. package/dist/serialization/types/ModalSandboxConfig.d.ts +13 -0
  299. package/dist/serialization/types/ModalSandboxConfig.js +44 -0
  300. package/dist/serialization/types/SandboxConfigCreateConfig.d.ts +2 -1
  301. package/dist/serialization/types/SandboxConfigCreateConfig.js +2 -1
  302. package/dist/serialization/types/SandboxConfigUpdateConfig.d.ts +2 -1
  303. package/dist/serialization/types/SandboxConfigUpdateConfig.js +2 -1
  304. package/dist/serialization/types/SandboxType.d.ts +1 -1
  305. package/dist/serialization/types/SandboxType.js +1 -1
  306. package/dist/serialization/types/ToolType.d.ts +1 -1
  307. package/dist/serialization/types/ToolType.js +0 -1
  308. package/dist/serialization/types/index.d.ts +1 -0
  309. package/dist/serialization/types/index.js +1 -0
  310. package/dist/version.d.ts +1 -1
  311. package/dist/version.js +1 -1
  312. package/errors/LettaError.d.ts +4 -1
  313. package/errors/LettaError.js +6 -8
  314. package/package.json +4 -4
  315. package/serialization/types/LettaStreamingRequest.d.ts +1 -0
  316. package/serialization/types/LettaStreamingRequest.js +1 -0
  317. package/serialization/types/ModalSandboxConfig.d.ts +13 -0
  318. package/serialization/types/ModalSandboxConfig.js +44 -0
  319. package/serialization/types/SandboxConfigCreateConfig.d.ts +2 -1
  320. package/serialization/types/SandboxConfigCreateConfig.js +2 -1
  321. package/serialization/types/SandboxConfigUpdateConfig.d.ts +2 -1
  322. package/serialization/types/SandboxConfigUpdateConfig.js +2 -1
  323. package/serialization/types/SandboxType.d.ts +1 -1
  324. package/serialization/types/SandboxType.js +1 -1
  325. package/serialization/types/ToolType.d.ts +1 -1
  326. package/serialization/types/ToolType.js +0 -1
  327. package/serialization/types/index.d.ts +1 -0
  328. package/serialization/types/index.js +1 -0
  329. package/version.d.ts +1 -1
  330. package/version.js +1 -1
@@ -70,6 +70,9 @@ class Batches {
70
70
  * await client.batches.list()
71
71
  */
72
72
  list(requestOptions) {
73
+ return core.HttpResponsePromise.fromPromise(this.__list(requestOptions));
74
+ }
75
+ __list(requestOptions) {
73
76
  return __awaiter(this, void 0, void 0, function* () {
74
77
  var _a, _b, _c;
75
78
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
@@ -77,7 +80,7 @@ class Batches {
77
80
  method: "GET",
78
81
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
79
82
  ? yield core.Supplier.get(this._options.project)
80
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.169", "User-Agent": "@letta-ai/letta-client/0.1.169", "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),
83
+ : 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),
81
84
  contentType: "application/json",
82
85
  requestType: "json",
83
86
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -85,13 +88,16 @@ class Batches {
85
88
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
86
89
  });
87
90
  if (_response.ok) {
88
- return serializers.batches.list.Response.parseOrThrow(_response.body, {
89
- unrecognizedObjectKeys: "passthrough",
90
- allowUnrecognizedUnionMembers: true,
91
- allowUnrecognizedEnumValues: true,
92
- skipValidation: true,
93
- breadcrumbsPrefix: ["response"],
94
- });
91
+ return {
92
+ data: serializers.batches.list.Response.parseOrThrow(_response.body, {
93
+ unrecognizedObjectKeys: "passthrough",
94
+ allowUnrecognizedUnionMembers: true,
95
+ allowUnrecognizedEnumValues: true,
96
+ skipValidation: true,
97
+ breadcrumbsPrefix: ["response"],
98
+ }),
99
+ rawResponse: _response.rawResponse,
100
+ };
95
101
  }
96
102
  if (_response.error.reason === "status-code") {
97
103
  switch (_response.error.statusCode) {
@@ -102,11 +108,12 @@ class Batches {
102
108
  allowUnrecognizedEnumValues: true,
103
109
  skipValidation: true,
104
110
  breadcrumbsPrefix: ["response"],
105
- }));
111
+ }), _response.rawResponse);
106
112
  default:
107
113
  throw new errors.LettaError({
108
114
  statusCode: _response.error.statusCode,
109
115
  body: _response.error.body,
116
+ rawResponse: _response.rawResponse,
110
117
  });
111
118
  }
112
119
  }
@@ -115,12 +122,14 @@ class Batches {
115
122
  throw new errors.LettaError({
116
123
  statusCode: _response.error.statusCode,
117
124
  body: _response.error.rawBody,
125
+ rawResponse: _response.rawResponse,
118
126
  });
119
127
  case "timeout":
120
128
  throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/messages/batches.");
121
129
  case "unknown":
122
130
  throw new errors.LettaError({
123
131
  message: _response.error.errorMessage,
132
+ rawResponse: _response.rawResponse,
124
133
  });
125
134
  }
126
135
  });
@@ -149,6 +158,9 @@ class Batches {
149
158
  * })
150
159
  */
151
160
  create(request, requestOptions) {
161
+ return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
162
+ }
163
+ __create(request, requestOptions) {
152
164
  return __awaiter(this, void 0, void 0, function* () {
153
165
  var _a, _b, _c;
154
166
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
@@ -156,7 +168,7 @@ class Batches {
156
168
  method: "POST",
157
169
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
158
170
  ? yield core.Supplier.get(this._options.project)
159
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.169", "User-Agent": "@letta-ai/letta-client/0.1.169", "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
+ : 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),
160
172
  contentType: "application/json",
161
173
  requestType: "json",
162
174
  body: serializers.CreateBatch.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -165,13 +177,16 @@ class Batches {
165
177
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
166
178
  });
167
179
  if (_response.ok) {
168
- return serializers.BatchJob.parseOrThrow(_response.body, {
169
- unrecognizedObjectKeys: "passthrough",
170
- allowUnrecognizedUnionMembers: true,
171
- allowUnrecognizedEnumValues: true,
172
- skipValidation: true,
173
- breadcrumbsPrefix: ["response"],
174
- });
180
+ return {
181
+ data: serializers.BatchJob.parseOrThrow(_response.body, {
182
+ unrecognizedObjectKeys: "passthrough",
183
+ allowUnrecognizedUnionMembers: true,
184
+ allowUnrecognizedEnumValues: true,
185
+ skipValidation: true,
186
+ breadcrumbsPrefix: ["response"],
187
+ }),
188
+ rawResponse: _response.rawResponse,
189
+ };
175
190
  }
176
191
  if (_response.error.reason === "status-code") {
177
192
  switch (_response.error.statusCode) {
@@ -182,11 +197,12 @@ class Batches {
182
197
  allowUnrecognizedEnumValues: true,
183
198
  skipValidation: true,
184
199
  breadcrumbsPrefix: ["response"],
185
- }));
200
+ }), _response.rawResponse);
186
201
  default:
187
202
  throw new errors.LettaError({
188
203
  statusCode: _response.error.statusCode,
189
204
  body: _response.error.body,
205
+ rawResponse: _response.rawResponse,
190
206
  });
191
207
  }
192
208
  }
@@ -195,12 +211,14 @@ class Batches {
195
211
  throw new errors.LettaError({
196
212
  statusCode: _response.error.statusCode,
197
213
  body: _response.error.rawBody,
214
+ rawResponse: _response.rawResponse,
198
215
  });
199
216
  case "timeout":
200
217
  throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/messages/batches.");
201
218
  case "unknown":
202
219
  throw new errors.LettaError({
203
220
  message: _response.error.errorMessage,
221
+ rawResponse: _response.rawResponse,
204
222
  });
205
223
  }
206
224
  });
@@ -217,6 +235,9 @@ class Batches {
217
235
  * await client.batches.retrieve("batch_id")
218
236
  */
219
237
  retrieve(batchId, requestOptions) {
238
+ return core.HttpResponsePromise.fromPromise(this.__retrieve(batchId, requestOptions));
239
+ }
240
+ __retrieve(batchId, requestOptions) {
220
241
  return __awaiter(this, void 0, void 0, function* () {
221
242
  var _a, _b, _c;
222
243
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
@@ -224,7 +245,7 @@ class Batches {
224
245
  method: "GET",
225
246
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
226
247
  ? yield core.Supplier.get(this._options.project)
227
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.169", "User-Agent": "@letta-ai/letta-client/0.1.169", "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),
248
+ : 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),
228
249
  contentType: "application/json",
229
250
  requestType: "json",
230
251
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -232,13 +253,16 @@ class Batches {
232
253
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
233
254
  });
234
255
  if (_response.ok) {
235
- return serializers.BatchJob.parseOrThrow(_response.body, {
236
- unrecognizedObjectKeys: "passthrough",
237
- allowUnrecognizedUnionMembers: true,
238
- allowUnrecognizedEnumValues: true,
239
- skipValidation: true,
240
- breadcrumbsPrefix: ["response"],
241
- });
256
+ return {
257
+ data: serializers.BatchJob.parseOrThrow(_response.body, {
258
+ unrecognizedObjectKeys: "passthrough",
259
+ allowUnrecognizedUnionMembers: true,
260
+ allowUnrecognizedEnumValues: true,
261
+ skipValidation: true,
262
+ breadcrumbsPrefix: ["response"],
263
+ }),
264
+ rawResponse: _response.rawResponse,
265
+ };
242
266
  }
243
267
  if (_response.error.reason === "status-code") {
244
268
  switch (_response.error.statusCode) {
@@ -249,11 +273,12 @@ class Batches {
249
273
  allowUnrecognizedEnumValues: true,
250
274
  skipValidation: true,
251
275
  breadcrumbsPrefix: ["response"],
252
- }));
276
+ }), _response.rawResponse);
253
277
  default:
254
278
  throw new errors.LettaError({
255
279
  statusCode: _response.error.statusCode,
256
280
  body: _response.error.body,
281
+ rawResponse: _response.rawResponse,
257
282
  });
258
283
  }
259
284
  }
@@ -262,12 +287,14 @@ class Batches {
262
287
  throw new errors.LettaError({
263
288
  statusCode: _response.error.statusCode,
264
289
  body: _response.error.rawBody,
290
+ rawResponse: _response.rawResponse,
265
291
  });
266
292
  case "timeout":
267
293
  throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/messages/batches/{batch_id}.");
268
294
  case "unknown":
269
295
  throw new errors.LettaError({
270
296
  message: _response.error.errorMessage,
297
+ rawResponse: _response.rawResponse,
271
298
  });
272
299
  }
273
300
  });
@@ -284,6 +311,9 @@ class Batches {
284
311
  * await client.batches.cancel("batch_id")
285
312
  */
286
313
  cancel(batchId, requestOptions) {
314
+ return core.HttpResponsePromise.fromPromise(this.__cancel(batchId, requestOptions));
315
+ }
316
+ __cancel(batchId, requestOptions) {
287
317
  return __awaiter(this, void 0, void 0, function* () {
288
318
  var _a, _b, _c;
289
319
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
@@ -291,7 +321,7 @@ class Batches {
291
321
  method: "PATCH",
292
322
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
293
323
  ? yield core.Supplier.get(this._options.project)
294
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.169", "User-Agent": "@letta-ai/letta-client/0.1.169", "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),
324
+ : 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),
295
325
  contentType: "application/json",
296
326
  requestType: "json",
297
327
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -299,7 +329,7 @@ class Batches {
299
329
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
300
330
  });
301
331
  if (_response.ok) {
302
- return _response.body;
332
+ return { data: _response.body, rawResponse: _response.rawResponse };
303
333
  }
304
334
  if (_response.error.reason === "status-code") {
305
335
  switch (_response.error.statusCode) {
@@ -310,11 +340,12 @@ class Batches {
310
340
  allowUnrecognizedEnumValues: true,
311
341
  skipValidation: true,
312
342
  breadcrumbsPrefix: ["response"],
313
- }));
343
+ }), _response.rawResponse);
314
344
  default:
315
345
  throw new errors.LettaError({
316
346
  statusCode: _response.error.statusCode,
317
347
  body: _response.error.body,
348
+ rawResponse: _response.rawResponse,
318
349
  });
319
350
  }
320
351
  }
@@ -323,12 +354,14 @@ class Batches {
323
354
  throw new errors.LettaError({
324
355
  statusCode: _response.error.statusCode,
325
356
  body: _response.error.rawBody,
357
+ rawResponse: _response.rawResponse,
326
358
  });
327
359
  case "timeout":
328
360
  throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/messages/batches/{batch_id}/cancel.");
329
361
  case "unknown":
330
362
  throw new errors.LettaError({
331
363
  message: _response.error.errorMessage,
364
+ rawResponse: _response.rawResponse,
332
365
  });
333
366
  }
334
367
  });
@@ -42,7 +42,8 @@ export declare class Blocks {
42
42
  * @example
43
43
  * await client.blocks.list()
44
44
  */
45
- list(request?: Letta.BlocksListRequest, requestOptions?: Blocks.RequestOptions): Promise<Letta.Block[]>;
45
+ list(request?: Letta.BlocksListRequest, requestOptions?: Blocks.RequestOptions): core.HttpResponsePromise<Letta.Block[]>;
46
+ private __list;
46
47
  /**
47
48
  * @param {Letta.CreateBlock} request
48
49
  * @param {Blocks.RequestOptions} requestOptions - Request-specific configuration.
@@ -55,7 +56,8 @@ export declare class Blocks {
55
56
  * label: "label"
56
57
  * })
57
58
  */
58
- create(request: Letta.CreateBlock, requestOptions?: Blocks.RequestOptions): Promise<Letta.Block>;
59
+ create(request: Letta.CreateBlock, requestOptions?: Blocks.RequestOptions): core.HttpResponsePromise<Letta.Block>;
60
+ private __create;
59
61
  /**
60
62
  * Count all blocks created by a user.
61
63
  *
@@ -66,7 +68,8 @@ export declare class Blocks {
66
68
  * @example
67
69
  * await client.blocks.count()
68
70
  */
69
- count(requestOptions?: Blocks.RequestOptions): Promise<number>;
71
+ count(requestOptions?: Blocks.RequestOptions): core.HttpResponsePromise<number>;
72
+ private __count;
70
73
  /**
71
74
  * @param {string} blockId
72
75
  * @param {Blocks.RequestOptions} requestOptions - Request-specific configuration.
@@ -76,7 +79,8 @@ export declare class Blocks {
76
79
  * @example
77
80
  * await client.blocks.retrieve("block_id")
78
81
  */
79
- retrieve(blockId: string, requestOptions?: Blocks.RequestOptions): Promise<Letta.Block>;
82
+ retrieve(blockId: string, requestOptions?: Blocks.RequestOptions): core.HttpResponsePromise<Letta.Block>;
83
+ private __retrieve;
80
84
  /**
81
85
  * @param {string} blockId
82
86
  * @param {Blocks.RequestOptions} requestOptions - Request-specific configuration.
@@ -86,7 +90,8 @@ export declare class Blocks {
86
90
  * @example
87
91
  * await client.blocks.delete("block_id")
88
92
  */
89
- delete(blockId: string, requestOptions?: Blocks.RequestOptions): Promise<unknown>;
93
+ delete(blockId: string, requestOptions?: Blocks.RequestOptions): core.HttpResponsePromise<unknown>;
94
+ private __delete;
90
95
  /**
91
96
  * @param {string} blockId
92
97
  * @param {Letta.BlockUpdate} request
@@ -97,7 +102,8 @@ export declare class Blocks {
97
102
  * @example
98
103
  * await client.blocks.modify("block_id", {})
99
104
  */
100
- modify(blockId: string, request: Letta.BlockUpdate, requestOptions?: Blocks.RequestOptions): Promise<Letta.Block>;
105
+ modify(blockId: string, request: Letta.BlockUpdate, requestOptions?: Blocks.RequestOptions): core.HttpResponsePromise<Letta.Block>;
106
+ private __modify;
101
107
  protected _getCustomAuthorizationHeaders(): Promise<{
102
108
  Authorization: string;
103
109
  }>;