@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
@@ -48,6 +48,15 @@ const runtime_1 = require("../runtime");
48
48
  function isNamedValue(value) {
49
49
  return typeof value === "object" && value != null && "name" in value;
50
50
  }
51
+ function isPathedValue(value) {
52
+ return typeof value === "object" && value != null && "path" in value;
53
+ }
54
+ function getLastPathSegment(pathStr) {
55
+ const lastForwardSlash = pathStr.lastIndexOf("/");
56
+ const lastBackSlash = pathStr.lastIndexOf("\\");
57
+ const lastSlashIndex = Math.max(lastForwardSlash, lastBackSlash);
58
+ return lastSlashIndex >= 0 ? pathStr.substring(lastSlashIndex + 1) : pathStr;
59
+ }
51
60
  function newFormData() {
52
61
  return __awaiter(this, void 0, void 0, function* () {
53
62
  let formdata;
@@ -77,12 +86,22 @@ class Node18FormData {
77
86
  var _a;
78
87
  (_a = this.fd) === null || _a === void 0 ? void 0 : _a.append(key, value);
79
88
  }
89
+ getFileName(value, filename) {
90
+ if (filename != null) {
91
+ return filename;
92
+ }
93
+ if (isNamedValue(value)) {
94
+ return value.name;
95
+ }
96
+ if (isPathedValue(value) && value.path) {
97
+ return getLastPathSegment(value.path.toString());
98
+ }
99
+ return undefined;
100
+ }
80
101
  appendFile(key, value, fileName) {
81
102
  return __awaiter(this, void 0, void 0, function* () {
82
103
  var _a, _b;
83
- if (fileName == null && isNamedValue(value)) {
84
- fileName = value.name;
85
- }
104
+ fileName = this.getFileName(value, fileName);
86
105
  if (value instanceof Blob) {
87
106
  (_a = this.fd) === null || _a === void 0 ? void 0 : _a.append(key, value, fileName);
88
107
  }
@@ -123,12 +142,22 @@ class Node16FormData {
123
142
  var _a;
124
143
  (_a = this.fd) === null || _a === void 0 ? void 0 : _a.append(key, value);
125
144
  }
145
+ getFileName(value, filename) {
146
+ if (filename != null) {
147
+ return filename;
148
+ }
149
+ if (isNamedValue(value)) {
150
+ return value.name;
151
+ }
152
+ if (isPathedValue(value) && value.path) {
153
+ return getLastPathSegment(value.path.toString());
154
+ }
155
+ return undefined;
156
+ }
126
157
  appendFile(key, value, fileName) {
127
158
  return __awaiter(this, void 0, void 0, function* () {
128
159
  var _a, _b;
129
- if (fileName == null && isNamedValue(value)) {
130
- fileName = value.name;
131
- }
160
+ fileName = this.getFileName(value, fileName);
132
161
  let bufferedValue;
133
162
  if (value instanceof Blob) {
134
163
  bufferedValue = Buffer.from(yield value.arrayBuffer());
@@ -165,13 +194,27 @@ class WebFormData {
165
194
  var _a;
166
195
  (_a = this.fd) === null || _a === void 0 ? void 0 : _a.append(key, value);
167
196
  }
197
+ getFileName(value, filename) {
198
+ if (filename != null) {
199
+ return filename;
200
+ }
201
+ if (isNamedValue(value)) {
202
+ return value.name;
203
+ }
204
+ if (isPathedValue(value) && value.path) {
205
+ return getLastPathSegment(value.path.toString());
206
+ }
207
+ return undefined;
208
+ }
168
209
  appendFile(key, value, fileName) {
169
210
  return __awaiter(this, void 0, void 0, function* () {
170
- var _a;
171
- if (fileName == null && isNamedValue(value)) {
172
- fileName = value.name;
211
+ var _a, _b;
212
+ fileName = this.getFileName(value, fileName);
213
+ if (value instanceof Blob) {
214
+ (_a = this.fd) === null || _a === void 0 ? void 0 : _a.append(key, value, fileName);
215
+ return;
173
216
  }
174
- (_a = this.fd) === null || _a === void 0 ? void 0 : _a.append(key, new Blob([value]), fileName);
217
+ (_b = this.fd) === null || _b === void 0 ? void 0 : _b.append(key, new Blob([value]), fileName);
175
218
  });
176
219
  }
177
220
  getRequest() {
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Takes an unknown value, stringifies it using qs, and parses it into a key-value record
3
+ */
4
+ export declare function encodeAsFormParameter(value: unknown): Record<string, string>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.encodeAsFormParameter = encodeAsFormParameter;
7
+ const qs_1 = __importDefault(require("qs"));
8
+ /**
9
+ * Takes an unknown value, stringifies it using qs, and parses it into a key-value record
10
+ */
11
+ function encodeAsFormParameter(value) {
12
+ const stringified = qs_1.default.stringify(value, { encode: false });
13
+ const keyValuePairs = stringified.split("&").map((pair) => {
14
+ const [key, value] = pair.split("=");
15
+ return [key, value];
16
+ });
17
+ return Object.fromEntries(keyValuePairs);
18
+ }
@@ -1 +1,2 @@
1
+ export { encodeAsFormParameter } from "./encodeAsFormParameter";
1
2
  export * from "./FormDataWrapper";
@@ -14,4 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.encodeAsFormParameter = void 0;
18
+ var encodeAsFormParameter_1 = require("./encodeAsFormParameter");
19
+ Object.defineProperty(exports, "encodeAsFormParameter", { enumerable: true, get: function () { return encodeAsFormParameter_1.encodeAsFormParameter; } });
17
20
  __exportStar(require("./FormDataWrapper"), exports);
package/core/json.d.ts ADDED
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Serialize a value to JSON
3
+ * @param value A JavaScript value, usually an object or array, to be converted.
4
+ * @param replacer A function that transforms the results.
5
+ * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
6
+ * @returns JSON string
7
+ */
8
+ export declare const toJson: (value: unknown, replacer?: (this: unknown, key: string, value: unknown) => unknown, space?: string | number) => string;
9
+ /**
10
+ * Parse JSON string to object, array, or other type
11
+ * @param text A valid JSON string.
12
+ * @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.
13
+ * @returns Parsed object, array, or other type
14
+ */
15
+ export declare function fromJson<T = unknown>(text: string, reviver?: (this: unknown, key: string, value: unknown) => unknown): T;
package/core/json.js ADDED
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toJson = void 0;
4
+ exports.fromJson = fromJson;
5
+ /**
6
+ * Serialize a value to JSON
7
+ * @param value A JavaScript value, usually an object or array, to be converted.
8
+ * @param replacer A function that transforms the results.
9
+ * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
10
+ * @returns JSON string
11
+ */
12
+ const toJson = (value, replacer, space) => {
13
+ return JSON.stringify(value, replacer, space);
14
+ };
15
+ exports.toJson = toJson;
16
+ /**
17
+ * Parse JSON string to object, array, or other type
18
+ * @param text A valid JSON string.
19
+ * @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.
20
+ * @returns Parsed object, array, or other type
21
+ */
22
+ function fromJson(text, reviver) {
23
+ return JSON.parse(text, reviver);
24
+ }
@@ -24,7 +24,9 @@ export declare const SchemaType: {
24
24
  readonly SET: "set";
25
25
  readonly UNION: "union";
26
26
  readonly UNDISCRIMINATED_UNION: "undiscriminatedUnion";
27
+ readonly NULLABLE: "nullable";
27
28
  readonly OPTIONAL: "optional";
29
+ readonly OPTIONAL_NULLABLE: "optionalNullable";
28
30
  };
29
31
  export type SchemaType = (typeof SchemaType)[keyof typeof SchemaType];
30
32
  export type MaybeValid<T> = Valid<T> | Invalid;
@@ -18,5 +18,7 @@ exports.SchemaType = {
18
18
  SET: "set",
19
19
  UNION: "union",
20
20
  UNDISCRIMINATED_UNION: "undiscriminatedUnion",
21
+ NULLABLE: "nullable",
21
22
  OPTIONAL: "optional",
23
+ OPTIONAL_NULLABLE: "optionalNullable",
22
24
  };
@@ -1,2 +1,2 @@
1
1
  import { Schema } from "../../Schema";
2
- export declare function bigint(): Schema<string, bigint>;
2
+ export declare function bigint(): Schema<bigint | number, bigint>;
@@ -8,30 +8,30 @@ const schema_utils_1 = require("../schema-utils");
8
8
  function bigint() {
9
9
  const baseSchema = {
10
10
  parse: (raw, { breadcrumbsPrefix = [] } = {}) => {
11
- if (typeof raw !== "string") {
11
+ if (typeof raw === "bigint") {
12
12
  return {
13
- ok: false,
14
- errors: [
15
- {
16
- path: breadcrumbsPrefix,
17
- message: (0, getErrorMessageForIncorrectType_1.getErrorMessageForIncorrectType)(raw, "string"),
18
- },
19
- ],
13
+ ok: true,
14
+ value: raw,
20
15
  };
21
16
  }
22
- return {
23
- ok: true,
24
- value: BigInt(raw),
25
- };
26
- },
27
- json: (bigint, { breadcrumbsPrefix = [] } = {}) => {
28
- if (typeof bigint === "bigint") {
17
+ if (typeof raw === "number") {
29
18
  return {
30
19
  ok: true,
31
- value: bigint.toString(),
20
+ value: BigInt(raw),
32
21
  };
33
22
  }
34
- else {
23
+ return {
24
+ ok: false,
25
+ errors: [
26
+ {
27
+ path: breadcrumbsPrefix,
28
+ message: (0, getErrorMessageForIncorrectType_1.getErrorMessageForIncorrectType)(raw, "bigint | number"),
29
+ },
30
+ ],
31
+ };
32
+ },
33
+ json: (bigint, { breadcrumbsPrefix = [] } = {}) => {
34
+ if (typeof bigint !== "bigint") {
35
35
  return {
36
36
  ok: false,
37
37
  errors: [
@@ -42,6 +42,10 @@ function bigint() {
42
42
  ],
43
43
  };
44
44
  }
45
+ return {
46
+ ok: true,
47
+ value: bigint,
48
+ };
45
49
  },
46
50
  getType: () => Schema_1.SchemaType.BIGINT,
47
51
  };
@@ -253,6 +253,7 @@ function isSchemaOptional(schema) {
253
253
  case Schema_1.SchemaType.ANY:
254
254
  case Schema_1.SchemaType.UNKNOWN:
255
255
  case Schema_1.SchemaType.OPTIONAL:
256
+ case Schema_1.SchemaType.OPTIONAL_NULLABLE:
256
257
  return true;
257
258
  default:
258
259
  return false;
@@ -56,8 +56,7 @@ function validateAndTransformRecord({ value, isKeyNumeric, transformKey, transfo
56
56
  };
57
57
  }
58
58
  return (0, entries_1.entries)(value).reduce((accPromise, [stringKey, value]) => {
59
- // skip nullish keys
60
- if (value == null) {
59
+ if (value === undefined) {
61
60
  return accPromise;
62
61
  }
63
62
  const acc = accPromise;
@@ -1,6 +1,8 @@
1
1
  import { BaseSchema, Schema, SchemaOptions } from "../../Schema";
2
2
  export interface SchemaUtils<Raw, Parsed> {
3
+ nullable: () => Schema<Raw | null, Parsed | null>;
3
4
  optional: () => Schema<Raw | null | undefined, Parsed | undefined>;
5
+ optionalNullable: () => Schema<Raw | null | undefined, Parsed | null | undefined>;
4
6
  transform: <Transformed>(transformer: SchemaTransformer<Parsed, Transformed>) => Schema<Raw, Transformed>;
5
7
  parseOrThrow: (raw: unknown, opts?: SchemaOptions) => Parsed;
6
8
  jsonOrThrow: (raw: unknown, opts?: SchemaOptions) => Raw;
@@ -13,5 +15,7 @@ export declare function getSchemaUtils<Raw, Parsed>(schema: BaseSchema<Raw, Pars
13
15
  /**
14
16
  * schema utils are defined in one file to resolve issues with circular imports
15
17
  */
18
+ export declare function nullable<Raw, Parsed>(schema: BaseSchema<Raw, Parsed>): Schema<Raw | null, Parsed | null>;
16
19
  export declare function optional<Raw, Parsed>(schema: BaseSchema<Raw, Parsed>): Schema<Raw | null | undefined, Parsed | undefined>;
20
+ export declare function optionalNullable<Raw, Parsed>(schema: BaseSchema<Raw, Parsed>): Schema<Raw | null | undefined, Parsed | null | undefined>;
17
21
  export declare function transform<Raw, Parsed, Transformed>(schema: BaseSchema<Raw, Parsed>, transformer: SchemaTransformer<Parsed, Transformed>): Schema<Raw, Transformed>;
@@ -1,14 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getSchemaUtils = getSchemaUtils;
4
+ exports.nullable = nullable;
4
5
  exports.optional = optional;
6
+ exports.optionalNullable = optionalNullable;
5
7
  exports.transform = transform;
6
8
  const Schema_1 = require("../../Schema");
7
9
  const JsonError_1 = require("./JsonError");
8
10
  const ParseError_1 = require("./ParseError");
9
11
  function getSchemaUtils(schema) {
10
12
  return {
13
+ nullable: () => nullable(schema),
11
14
  optional: () => optional(schema),
15
+ optionalNullable: () => optionalNullable(schema),
12
16
  transform: (transformer) => transform(schema, transformer),
13
17
  parseOrThrow: (raw, opts) => {
14
18
  const parsed = schema.parse(raw, opts);
@@ -29,6 +33,30 @@ function getSchemaUtils(schema) {
29
33
  /**
30
34
  * schema utils are defined in one file to resolve issues with circular imports
31
35
  */
36
+ function nullable(schema) {
37
+ const baseSchema = {
38
+ parse: (raw, opts) => {
39
+ if (raw == null) {
40
+ return {
41
+ ok: true,
42
+ value: null,
43
+ };
44
+ }
45
+ return schema.parse(raw, opts);
46
+ },
47
+ json: (parsed, opts) => {
48
+ if (parsed == null) {
49
+ return {
50
+ ok: true,
51
+ value: null,
52
+ };
53
+ }
54
+ return schema.json(parsed, opts);
55
+ },
56
+ getType: () => Schema_1.SchemaType.NULLABLE,
57
+ };
58
+ return Object.assign(Object.assign({}, baseSchema), getSchemaUtils(baseSchema));
59
+ }
32
60
  function optional(schema) {
33
61
  const baseSchema = {
34
62
  parse: (raw, opts) => {
@@ -59,6 +87,42 @@ function optional(schema) {
59
87
  };
60
88
  return Object.assign(Object.assign({}, baseSchema), getSchemaUtils(baseSchema));
61
89
  }
90
+ function optionalNullable(schema) {
91
+ const baseSchema = {
92
+ parse: (raw, opts) => {
93
+ if (raw === undefined) {
94
+ return {
95
+ ok: true,
96
+ value: undefined,
97
+ };
98
+ }
99
+ if (raw === null) {
100
+ return {
101
+ ok: true,
102
+ value: null,
103
+ };
104
+ }
105
+ return schema.parse(raw, opts);
106
+ },
107
+ json: (parsed, opts) => {
108
+ if (parsed === undefined) {
109
+ return {
110
+ ok: true,
111
+ value: undefined,
112
+ };
113
+ }
114
+ if (parsed === null) {
115
+ return {
116
+ ok: true,
117
+ value: null,
118
+ };
119
+ }
120
+ return schema.json(parsed, opts);
121
+ },
122
+ getType: () => Schema_1.SchemaType.OPTIONAL_NULLABLE,
123
+ };
124
+ return Object.assign(Object.assign({}, baseSchema), getSchemaUtils(baseSchema));
125
+ }
62
126
  function transform(schema, transformer) {
63
127
  const baseSchema = {
64
128
  parse: (raw, opts) => {
@@ -2,6 +2,6 @@ export type addQuestionMarksToNullableProperties<T> = {
2
2
  [K in OptionalKeys<T>]?: T[K];
3
3
  } & Pick<T, RequiredKeys<T>>;
4
4
  export type OptionalKeys<T> = {
5
- [K in keyof T]-?: undefined extends T[K] ? K : null extends T[K] ? K : 1 extends (any extends T[K] ? 0 : 1) ? never : K;
5
+ [K in keyof T]-?: undefined extends T[K] ? K : never;
6
6
  }[keyof T];
7
7
  export type RequiredKeys<T> = Exclude<keyof T, OptionalKeys<T>>;
@@ -2,6 +2,7 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as errors from "../../errors/index";
5
+ import * as core from "../../core";
5
6
  export declare class BadRequestError extends errors.LettaError {
6
- constructor(body?: unknown);
7
+ constructor(body?: unknown, rawResponse?: core.RawResponse);
7
8
  }
@@ -39,11 +39,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.BadRequestError = void 0;
40
40
  const errors = __importStar(require("../../errors/index"));
41
41
  class BadRequestError extends errors.LettaError {
42
- constructor(body) {
42
+ constructor(body, rawResponse) {
43
43
  super({
44
44
  message: "BadRequestError",
45
45
  statusCode: 400,
46
46
  body: body,
47
+ rawResponse: rawResponse,
47
48
  });
48
49
  Object.setPrototypeOf(this, BadRequestError.prototype);
49
50
  }
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import * as errors from "../../errors/index";
5
5
  import * as Letta from "../index";
6
+ import * as core from "../../core";
6
7
  export declare class ConflictError extends errors.LettaError {
7
- constructor(body: Letta.ConflictErrorBody);
8
+ constructor(body: Letta.ConflictErrorBody, rawResponse?: core.RawResponse);
8
9
  }
@@ -39,11 +39,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.ConflictError = void 0;
40
40
  const errors = __importStar(require("../../errors/index"));
41
41
  class ConflictError extends errors.LettaError {
42
- constructor(body) {
42
+ constructor(body, rawResponse) {
43
43
  super({
44
44
  message: "ConflictError",
45
45
  statusCode: 409,
46
46
  body: body,
47
+ rawResponse: rawResponse,
47
48
  });
48
49
  Object.setPrototypeOf(this, ConflictError.prototype);
49
50
  }
@@ -2,6 +2,7 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as errors from "../../errors/index";
5
+ import * as core from "../../core";
5
6
  export declare class InternalServerError extends errors.LettaError {
6
- constructor(body?: unknown);
7
+ constructor(body?: unknown, rawResponse?: core.RawResponse);
7
8
  }
@@ -39,11 +39,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.InternalServerError = void 0;
40
40
  const errors = __importStar(require("../../errors/index"));
41
41
  class InternalServerError extends errors.LettaError {
42
- constructor(body) {
42
+ constructor(body, rawResponse) {
43
43
  super({
44
44
  message: "InternalServerError",
45
45
  statusCode: 500,
46
46
  body: body,
47
+ rawResponse: rawResponse,
47
48
  });
48
49
  Object.setPrototypeOf(this, InternalServerError.prototype);
49
50
  }
@@ -2,6 +2,7 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as errors from "../../errors/index";
5
+ import * as core from "../../core";
5
6
  export declare class NotFoundError extends errors.LettaError {
6
- constructor(body?: unknown);
7
+ constructor(body?: unknown, rawResponse?: core.RawResponse);
7
8
  }
@@ -39,11 +39,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.NotFoundError = void 0;
40
40
  const errors = __importStar(require("../../errors/index"));
41
41
  class NotFoundError extends errors.LettaError {
42
- constructor(body) {
42
+ constructor(body, rawResponse) {
43
43
  super({
44
44
  message: "NotFoundError",
45
45
  statusCode: 404,
46
46
  body: body,
47
+ rawResponse: rawResponse,
47
48
  });
48
49
  Object.setPrototypeOf(this, NotFoundError.prototype);
49
50
  }
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import * as errors from "../../errors/index";
5
5
  import * as Letta from "../index";
6
+ import * as core from "../../core";
6
7
  export declare class PaymentRequiredError extends errors.LettaError {
7
- constructor(body: Letta.PaymentRequiredErrorBody);
8
+ constructor(body: Letta.PaymentRequiredErrorBody, rawResponse?: core.RawResponse);
8
9
  }
@@ -39,11 +39,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.PaymentRequiredError = void 0;
40
40
  const errors = __importStar(require("../../errors/index"));
41
41
  class PaymentRequiredError extends errors.LettaError {
42
- constructor(body) {
42
+ constructor(body, rawResponse) {
43
43
  super({
44
44
  message: "PaymentRequiredError",
45
45
  statusCode: 402,
46
46
  body: body,
47
+ rawResponse: rawResponse,
47
48
  });
48
49
  Object.setPrototypeOf(this, PaymentRequiredError.prototype);
49
50
  }
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import * as errors from "../../errors/index";
5
5
  import * as Letta from "../index";
6
+ import * as core from "../../core";
6
7
  export declare class UnprocessableEntityError extends errors.LettaError {
7
- constructor(body: Letta.HttpValidationError);
8
+ constructor(body: Letta.HttpValidationError, rawResponse?: core.RawResponse);
8
9
  }
@@ -39,11 +39,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.UnprocessableEntityError = void 0;
40
40
  const errors = __importStar(require("../../errors/index"));
41
41
  class UnprocessableEntityError extends errors.LettaError {
42
- constructor(body) {
42
+ constructor(body, rawResponse) {
43
43
  super({
44
44
  message: "UnprocessableEntityError",
45
45
  statusCode: 422,
46
46
  body: body,
47
+ rawResponse: rawResponse,
47
48
  });
48
49
  Object.setPrototypeOf(this, UnprocessableEntityError.prototype);
49
50
  }
@@ -82,7 +82,8 @@ export declare class Agents {
82
82
  * @example
83
83
  * await client.agents.list()
84
84
  */
85
- list(request?: Letta.AgentsListRequest, requestOptions?: Agents.RequestOptions): Promise<Letta.AgentState[]>;
85
+ list(request?: Letta.AgentsListRequest, requestOptions?: Agents.RequestOptions): core.HttpResponsePromise<Letta.AgentState[]>;
86
+ private __list;
86
87
  /**
87
88
  * Create a new agent with the specified configuration.
88
89
  *
@@ -94,7 +95,8 @@ export declare class Agents {
94
95
  * @example
95
96
  * await client.agents.create()
96
97
  */
97
- create(request?: Letta.CreateAgentRequest, requestOptions?: Agents.RequestOptions): Promise<Letta.AgentState>;
98
+ create(request?: Letta.CreateAgentRequest, requestOptions?: Agents.RequestOptions): core.HttpResponsePromise<Letta.AgentState>;
99
+ private __create;
98
100
  /**
99
101
  * Get the count of all agents associated with a given user.
100
102
  *
@@ -105,7 +107,8 @@ export declare class Agents {
105
107
  * @example
106
108
  * await client.agents.count()
107
109
  */
108
- count(requestOptions?: Agents.RequestOptions): Promise<number>;
110
+ count(requestOptions?: Agents.RequestOptions): core.HttpResponsePromise<number>;
111
+ private __count;
109
112
  /**
110
113
  * Export the serialized JSON representation of an agent, formatted with indentation.
111
114
  *
@@ -117,7 +120,8 @@ export declare class Agents {
117
120
  * @example
118
121
  * await client.agents.exportFile("agent_id")
119
122
  */
120
- exportFile(agentId: string, requestOptions?: Agents.RequestOptions): Promise<string>;
123
+ exportFile(agentId: string, requestOptions?: Agents.RequestOptions): core.HttpResponsePromise<string>;
124
+ private __exportFile;
121
125
  /**
122
126
  * Import a serialized agent file and recreate the agent in the system.
123
127
  *
@@ -130,7 +134,8 @@ export declare class Agents {
130
134
  * @example
131
135
  * await client.agents.importFile(fs.createReadStream("/path/to/your/file"), {})
132
136
  */
133
- importFile(file: File | fs.ReadStream | Blob, request: Letta.BodyImportAgentSerialized, requestOptions?: Agents.RequestOptions): Promise<Letta.AgentState>;
137
+ importFile(file: File | fs.ReadStream | Blob, request: Letta.BodyImportAgentSerialized, requestOptions?: Agents.RequestOptions): core.HttpResponsePromise<Letta.AgentState>;
138
+ private __importFile;
134
139
  /**
135
140
  * Get the state of the agent.
136
141
  *
@@ -143,7 +148,8 @@ export declare class Agents {
143
148
  * @example
144
149
  * await client.agents.retrieve("agent_id")
145
150
  */
146
- retrieve(agentId: string, request?: Letta.AgentsRetrieveRequest, requestOptions?: Agents.RequestOptions): Promise<Letta.AgentState>;
151
+ retrieve(agentId: string, request?: Letta.AgentsRetrieveRequest, requestOptions?: Agents.RequestOptions): core.HttpResponsePromise<Letta.AgentState>;
152
+ private __retrieve;
147
153
  /**
148
154
  * Delete an agent.
149
155
  *
@@ -155,7 +161,8 @@ export declare class Agents {
155
161
  * @example
156
162
  * await client.agents.delete("agent_id")
157
163
  */
158
- delete(agentId: string, requestOptions?: Agents.RequestOptions): Promise<unknown>;
164
+ delete(agentId: string, requestOptions?: Agents.RequestOptions): core.HttpResponsePromise<unknown>;
165
+ private __delete;
159
166
  /**
160
167
  * Update an existing agent
161
168
  *
@@ -168,7 +175,8 @@ export declare class Agents {
168
175
  * @example
169
176
  * await client.agents.modify("agent_id")
170
177
  */
171
- modify(agentId: string, request?: Letta.UpdateAgent, requestOptions?: Agents.RequestOptions): Promise<Letta.AgentState>;
178
+ modify(agentId: string, request?: Letta.UpdateAgent, requestOptions?: Agents.RequestOptions): core.HttpResponsePromise<Letta.AgentState>;
179
+ private __modify;
172
180
  /**
173
181
  * Summarize an agent's conversation history to a target message length.
174
182
  *
@@ -186,7 +194,8 @@ export declare class Agents {
186
194
  * maxMessageLength: 1
187
195
  * })
188
196
  */
189
- summarizeAgentConversation(agentId: string, request: Letta.SummarizeAgentConversationRequest, requestOptions?: Agents.RequestOptions): Promise<void>;
197
+ summarizeAgentConversation(agentId: string, request: Letta.SummarizeAgentConversationRequest, requestOptions?: Agents.RequestOptions): core.HttpResponsePromise<void>;
198
+ private __summarizeAgentConversation;
190
199
  /**
191
200
  * <Note>This endpoint is only available on Letta Cloud.</Note>
192
201
  *
@@ -198,7 +207,8 @@ export declare class Agents {
198
207
  * @example
199
208
  * await client.agents.search()
200
209
  */
201
- search(request?: Letta.AgentsSearchRequest, requestOptions?: Agents.RequestOptions): Promise<Letta.AgentsSearchResponse>;
210
+ search(request?: Letta.AgentsSearchRequest, requestOptions?: Agents.RequestOptions): core.HttpResponsePromise<Letta.AgentsSearchResponse>;
211
+ private __search;
202
212
  protected _getCustomAuthorizationHeaders(): Promise<{
203
213
  Authorization: string;
204
214
  }>;