@letta-ai/letta-client 0.1.100 → 0.1.102

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 (270) hide show
  1. package/Client.d.ts +3 -9
  2. package/Client.js +11 -21
  3. package/api/resources/agents/client/Client.d.ts +1 -9
  4. package/api/resources/agents/client/Client.js +11 -55
  5. package/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -0
  6. package/api/resources/agents/client/requests/UpdateAgent.d.ts +2 -0
  7. package/api/resources/agents/resources/blocks/client/Client.js +5 -5
  8. package/api/resources/agents/resources/context/client/Client.js +1 -1
  9. package/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  10. package/api/resources/agents/resources/groups/client/Client.js +1 -1
  11. package/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  12. package/api/resources/agents/resources/messages/client/Client.js +6 -6
  13. package/api/resources/agents/resources/passages/client/Client.js +4 -4
  14. package/api/resources/agents/resources/sources/client/Client.js +3 -3
  15. package/api/resources/agents/resources/templates/client/Client.js +3 -3
  16. package/api/resources/agents/resources/tools/client/Client.js +3 -3
  17. package/api/resources/agents/types/CreateAgentRequestResponseFormat.d.ts +5 -0
  18. package/api/resources/agents/types/UpdateAgentResponseFormat.d.ts +5 -0
  19. package/api/resources/agents/types/index.d.ts +2 -0
  20. package/api/resources/agents/types/index.js +2 -0
  21. package/api/resources/batches/client/Client.d.ts +5 -1
  22. package/api/resources/batches/client/Client.js +26 -11
  23. package/api/resources/blocks/client/Client.js +5 -5
  24. package/api/resources/blocks/resources/agents/client/Client.js +1 -1
  25. package/api/resources/clientSideAccessTokens/client/Client.js +2 -2
  26. package/api/resources/embeddings/client/Client.js +1 -1
  27. package/api/resources/groups/client/Client.js +5 -5
  28. package/api/resources/groups/resources/messages/client/Client.js +5 -5
  29. package/api/resources/health/client/Client.js +1 -1
  30. package/api/resources/identities/client/Client.js +6 -6
  31. package/api/resources/identities/resources/properties/client/Client.js +1 -1
  32. package/api/resources/index.d.ts +2 -4
  33. package/api/resources/index.js +3 -5
  34. package/api/resources/jobs/client/Client.js +4 -4
  35. package/api/resources/models/client/Client.js +1 -1
  36. package/api/resources/projects/client/Client.js +1 -1
  37. package/api/resources/providers/client/Client.d.ts +6 -24
  38. package/api/resources/providers/client/Client.js +13 -107
  39. package/api/resources/providers/client/requests/ProviderUpdate.d.ts +0 -3
  40. package/api/resources/providers/client/requests/index.d.ts +0 -1
  41. package/api/resources/runs/client/Client.d.ts +3 -10
  42. package/api/resources/runs/client/Client.js +8 -51
  43. package/{dist/api/resources/runs/client/requests/ListRunsRequest.d.ts → api/resources/runs/client/requests/RunsListRequest.d.ts} +1 -1
  44. package/api/resources/runs/client/requests/index.d.ts +1 -1
  45. package/api/resources/runs/resources/messages/client/Client.js +1 -1
  46. package/api/resources/runs/resources/steps/client/Client.js +1 -1
  47. package/api/resources/runs/resources/usage/client/Client.js +1 -1
  48. package/api/resources/sources/client/Client.js +6 -6
  49. package/api/resources/sources/resources/files/client/Client.js +3 -3
  50. package/api/resources/sources/resources/passages/client/Client.js +1 -1
  51. package/api/resources/steps/client/Client.js +3 -3
  52. package/api/resources/tags/client/Client.d.ts +7 -1
  53. package/api/resources/tags/client/Client.js +46 -10
  54. package/api/resources/tags/client/index.d.ts +1 -1
  55. package/api/resources/tags/client/index.js +15 -0
  56. package/api/resources/{tag/client/requests/ListTagsRequest.d.ts → tags/client/requests/TagsListRequest.d.ts} +1 -1
  57. package/api/resources/tags/client/requests/index.d.ts +1 -0
  58. package/api/resources/templates/client/Client.js +1 -1
  59. package/api/resources/templates/resources/agents/client/Client.js +1 -1
  60. package/api/resources/tools/client/Client.js +16 -16
  61. package/api/resources/voice/client/Client.js +1 -1
  62. package/api/types/AgentState.d.ts +2 -0
  63. package/api/types/AgentStateResponseFormat.d.ts +5 -0
  64. package/api/types/JsonObjectResponseFormat.d.ts +9 -0
  65. package/api/types/JsonSchemaResponseFormat.d.ts +11 -0
  66. package/api/types/JsonSchemaResponseFormat.js +5 -0
  67. package/api/types/TextResponseFormat.d.ts +9 -0
  68. package/api/types/TextResponseFormat.js +5 -0
  69. package/api/types/index.d.ts +4 -0
  70. package/api/types/index.js +4 -0
  71. package/dist/Client.d.ts +3 -9
  72. package/dist/Client.js +11 -21
  73. package/dist/api/resources/agents/client/Client.d.ts +1 -9
  74. package/dist/api/resources/agents/client/Client.js +11 -55
  75. package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -0
  76. package/dist/api/resources/agents/client/requests/UpdateAgent.d.ts +2 -0
  77. package/dist/api/resources/agents/resources/blocks/client/Client.js +5 -5
  78. package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
  79. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  80. package/dist/api/resources/agents/resources/groups/client/Client.js +1 -1
  81. package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  82. package/dist/api/resources/agents/resources/messages/client/Client.js +6 -6
  83. package/dist/api/resources/agents/resources/passages/client/Client.js +4 -4
  84. package/dist/api/resources/agents/resources/sources/client/Client.js +3 -3
  85. package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
  86. package/dist/api/resources/agents/resources/tools/client/Client.js +3 -3
  87. package/dist/api/resources/agents/types/CreateAgentRequestResponseFormat.d.ts +5 -0
  88. package/dist/api/resources/agents/types/CreateAgentRequestResponseFormat.js +5 -0
  89. package/dist/api/resources/agents/types/UpdateAgentResponseFormat.d.ts +5 -0
  90. package/dist/api/resources/agents/types/UpdateAgentResponseFormat.js +5 -0
  91. package/dist/api/resources/agents/types/index.d.ts +2 -0
  92. package/dist/api/resources/agents/types/index.js +2 -0
  93. package/dist/api/resources/batches/client/Client.d.ts +5 -1
  94. package/dist/api/resources/batches/client/Client.js +26 -11
  95. package/dist/api/resources/blocks/client/Client.js +5 -5
  96. package/dist/api/resources/blocks/resources/agents/client/Client.js +1 -1
  97. package/dist/api/resources/clientSideAccessTokens/client/Client.js +2 -2
  98. package/dist/api/resources/embeddings/client/Client.js +1 -1
  99. package/dist/api/resources/groups/client/Client.js +5 -5
  100. package/dist/api/resources/groups/resources/messages/client/Client.js +5 -5
  101. package/dist/api/resources/health/client/Client.js +1 -1
  102. package/dist/api/resources/identities/client/Client.js +6 -6
  103. package/dist/api/resources/identities/resources/properties/client/Client.js +1 -1
  104. package/dist/api/resources/index.d.ts +2 -4
  105. package/dist/api/resources/index.js +3 -5
  106. package/dist/api/resources/jobs/client/Client.js +4 -4
  107. package/dist/api/resources/models/client/Client.js +1 -1
  108. package/dist/api/resources/projects/client/Client.js +1 -1
  109. package/dist/api/resources/providers/client/Client.d.ts +6 -24
  110. package/dist/api/resources/providers/client/Client.js +13 -107
  111. package/dist/api/resources/providers/client/requests/ProviderUpdate.d.ts +0 -3
  112. package/dist/api/resources/providers/client/requests/index.d.ts +0 -1
  113. package/dist/api/resources/runs/client/Client.d.ts +3 -10
  114. package/dist/api/resources/runs/client/Client.js +8 -51
  115. package/{api/resources/runs/client/requests/ListRunsRequest.d.ts → dist/api/resources/runs/client/requests/RunsListRequest.d.ts} +1 -1
  116. package/dist/api/resources/runs/client/requests/RunsListRequest.js +5 -0
  117. package/dist/api/resources/runs/client/requests/index.d.ts +1 -1
  118. package/dist/api/resources/runs/resources/messages/client/Client.js +1 -1
  119. package/dist/api/resources/runs/resources/steps/client/Client.js +1 -1
  120. package/dist/api/resources/runs/resources/usage/client/Client.js +1 -1
  121. package/dist/api/resources/sources/client/Client.js +6 -6
  122. package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
  123. package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
  124. package/dist/api/resources/steps/client/Client.js +3 -3
  125. package/dist/api/resources/tags/client/Client.d.ts +7 -1
  126. package/dist/api/resources/tags/client/Client.js +46 -10
  127. package/dist/api/resources/tags/client/index.d.ts +1 -1
  128. package/dist/api/resources/tags/client/index.js +15 -0
  129. package/dist/api/resources/{tag/client/requests/ListTagsRequest.d.ts → tags/client/requests/TagsListRequest.d.ts} +1 -1
  130. package/dist/api/resources/tags/client/requests/TagsListRequest.js +5 -0
  131. package/dist/api/resources/tags/client/requests/index.d.ts +1 -0
  132. package/dist/api/resources/templates/client/Client.js +1 -1
  133. package/dist/api/resources/templates/resources/agents/client/Client.js +1 -1
  134. package/dist/api/resources/tools/client/Client.js +16 -16
  135. package/dist/api/resources/voice/client/Client.js +1 -1
  136. package/dist/api/types/AgentState.d.ts +2 -0
  137. package/dist/api/types/AgentStateResponseFormat.d.ts +5 -0
  138. package/dist/api/types/AgentStateResponseFormat.js +5 -0
  139. package/dist/api/types/JsonObjectResponseFormat.d.ts +9 -0
  140. package/dist/api/types/JsonObjectResponseFormat.js +5 -0
  141. package/dist/api/types/JsonSchemaResponseFormat.d.ts +11 -0
  142. package/dist/api/types/JsonSchemaResponseFormat.js +5 -0
  143. package/dist/api/types/TextResponseFormat.d.ts +9 -0
  144. package/dist/api/types/TextResponseFormat.js +5 -0
  145. package/dist/api/types/index.d.ts +4 -0
  146. package/dist/api/types/index.js +4 -0
  147. package/dist/serialization/resources/agents/client/{exportAgentSerialized.d.ts → export.d.ts} +1 -1
  148. package/dist/serialization/resources/agents/client/index.d.ts +1 -1
  149. package/dist/serialization/resources/agents/client/index.js +2 -2
  150. package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -0
  151. package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.js +2 -0
  152. package/dist/serialization/resources/agents/client/requests/UpdateAgent.d.ts +2 -0
  153. package/dist/serialization/resources/agents/client/requests/UpdateAgent.js +2 -0
  154. package/dist/serialization/resources/agents/types/CreateAgentRequestResponseFormat.d.ts +13 -0
  155. package/dist/serialization/resources/agents/types/CreateAgentRequestResponseFormat.js +44 -0
  156. package/dist/serialization/resources/agents/types/UpdateAgentResponseFormat.d.ts +13 -0
  157. package/dist/serialization/resources/agents/types/UpdateAgentResponseFormat.js +44 -0
  158. package/dist/serialization/resources/agents/types/index.d.ts +2 -0
  159. package/dist/serialization/resources/agents/types/index.js +2 -0
  160. package/dist/serialization/resources/index.d.ts +1 -1
  161. package/dist/serialization/resources/index.js +2 -2
  162. package/dist/serialization/resources/providers/client/requests/ProviderUpdate.d.ts +0 -1
  163. package/dist/serialization/resources/providers/client/requests/ProviderUpdate.js +0 -1
  164. package/dist/serialization/resources/runs/client/index.d.ts +1 -1
  165. package/dist/serialization/resources/runs/client/index.js +2 -2
  166. package/{serialization/resources/runs/client/listRuns.d.ts → dist/serialization/resources/runs/client/list.d.ts} +1 -1
  167. package/dist/serialization/resources/tags/client/index.d.ts +1 -0
  168. package/dist/serialization/resources/{tag → tags}/client/index.js +2 -2
  169. package/{serialization/resources/tag/client/listTags.d.ts → dist/serialization/resources/tags/client/list.d.ts} +1 -1
  170. package/dist/serialization/types/AgentState.d.ts +2 -0
  171. package/dist/serialization/types/AgentState.js +2 -0
  172. package/dist/serialization/types/AgentStateResponseFormat.d.ts +13 -0
  173. package/dist/serialization/types/AgentStateResponseFormat.js +44 -0
  174. package/dist/serialization/types/JsonObjectResponseFormat.d.ts +12 -0
  175. package/dist/serialization/types/JsonObjectResponseFormat.js +43 -0
  176. package/dist/serialization/types/JsonSchemaResponseFormat.d.ts +13 -0
  177. package/dist/serialization/types/JsonSchemaResponseFormat.js +44 -0
  178. package/dist/serialization/types/TextResponseFormat.d.ts +12 -0
  179. package/dist/serialization/types/TextResponseFormat.js +43 -0
  180. package/dist/serialization/types/index.d.ts +4 -0
  181. package/dist/serialization/types/index.js +4 -0
  182. package/dist/version.d.ts +1 -1
  183. package/dist/version.js +1 -1
  184. package/package.json +1 -1
  185. package/reference.md +18 -289
  186. package/serialization/resources/agents/client/{exportAgentSerialized.d.ts → export.d.ts} +1 -1
  187. package/serialization/resources/agents/client/index.d.ts +1 -1
  188. package/serialization/resources/agents/client/index.js +2 -2
  189. package/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -0
  190. package/serialization/resources/agents/client/requests/CreateAgentRequest.js +2 -0
  191. package/serialization/resources/agents/client/requests/UpdateAgent.d.ts +2 -0
  192. package/serialization/resources/agents/client/requests/UpdateAgent.js +2 -0
  193. package/serialization/resources/agents/types/CreateAgentRequestResponseFormat.d.ts +13 -0
  194. package/serialization/resources/agents/types/CreateAgentRequestResponseFormat.js +44 -0
  195. package/serialization/resources/agents/types/UpdateAgentResponseFormat.d.ts +13 -0
  196. package/serialization/resources/agents/types/UpdateAgentResponseFormat.js +44 -0
  197. package/serialization/resources/agents/types/index.d.ts +2 -0
  198. package/serialization/resources/agents/types/index.js +2 -0
  199. package/serialization/resources/index.d.ts +1 -1
  200. package/serialization/resources/index.js +2 -2
  201. package/serialization/resources/providers/client/requests/ProviderUpdate.d.ts +0 -1
  202. package/serialization/resources/providers/client/requests/ProviderUpdate.js +0 -1
  203. package/serialization/resources/runs/client/index.d.ts +1 -1
  204. package/serialization/resources/runs/client/index.js +2 -2
  205. package/{dist/serialization/resources/runs/client/listRuns.d.ts → serialization/resources/runs/client/list.d.ts} +1 -1
  206. package/serialization/resources/tags/client/index.d.ts +1 -0
  207. package/serialization/resources/{tag → tags}/client/index.js +2 -2
  208. package/{dist/serialization/resources/tag/client/listTags.d.ts → serialization/resources/tags/client/list.d.ts} +1 -1
  209. package/serialization/types/AgentState.d.ts +2 -0
  210. package/serialization/types/AgentState.js +2 -0
  211. package/serialization/types/AgentStateResponseFormat.d.ts +13 -0
  212. package/serialization/types/AgentStateResponseFormat.js +44 -0
  213. package/serialization/types/JsonObjectResponseFormat.d.ts +12 -0
  214. package/serialization/types/JsonObjectResponseFormat.js +43 -0
  215. package/serialization/types/JsonSchemaResponseFormat.d.ts +13 -0
  216. package/serialization/types/JsonSchemaResponseFormat.js +44 -0
  217. package/serialization/types/TextResponseFormat.d.ts +12 -0
  218. package/serialization/types/TextResponseFormat.js +43 -0
  219. package/serialization/types/index.d.ts +4 -0
  220. package/serialization/types/index.js +4 -0
  221. package/version.d.ts +1 -1
  222. package/version.js +1 -1
  223. package/api/resources/messages/client/Client.d.ts +0 -43
  224. package/api/resources/messages/client/Client.js +0 -128
  225. package/api/resources/messages/client/index.d.ts +0 -1
  226. package/api/resources/providers/client/requests/DeleteProviderRequest.d.ts +0 -15
  227. package/api/resources/tag/client/Client.d.ts +0 -44
  228. package/api/resources/tag/client/Client.js +0 -146
  229. package/api/resources/tag/client/index.d.ts +0 -1
  230. package/api/resources/tag/client/index.js +0 -17
  231. package/api/resources/tag/client/requests/index.d.ts +0 -1
  232. package/dist/api/resources/messages/client/Client.d.ts +0 -43
  233. package/dist/api/resources/messages/client/Client.js +0 -128
  234. package/dist/api/resources/messages/client/index.d.ts +0 -1
  235. package/dist/api/resources/messages/client/index.js +0 -2
  236. package/dist/api/resources/messages/index.d.ts +0 -1
  237. package/dist/api/resources/messages/index.js +0 -17
  238. package/dist/api/resources/providers/client/requests/DeleteProviderRequest.d.ts +0 -15
  239. package/dist/api/resources/tag/client/Client.d.ts +0 -44
  240. package/dist/api/resources/tag/client/Client.js +0 -146
  241. package/dist/api/resources/tag/client/index.d.ts +0 -1
  242. package/dist/api/resources/tag/client/index.js +0 -17
  243. package/dist/api/resources/tag/client/requests/index.d.ts +0 -1
  244. package/dist/api/resources/tag/client/requests/index.js +0 -2
  245. package/dist/api/resources/tag/index.d.ts +0 -1
  246. package/dist/api/resources/tag/index.js +0 -17
  247. package/dist/serialization/resources/tag/client/index.d.ts +0 -1
  248. package/dist/serialization/resources/tag/index.d.ts +0 -1
  249. package/dist/serialization/resources/tag/index.js +0 -17
  250. package/serialization/resources/tag/client/index.d.ts +0 -1
  251. package/serialization/resources/tag/index.d.ts +0 -1
  252. package/serialization/resources/tag/index.js +0 -17
  253. /package/api/resources/{providers/client/requests/DeleteProviderRequest.js → agents/types/CreateAgentRequestResponseFormat.js} +0 -0
  254. /package/api/resources/{runs/client/requests/ListRunsRequest.js → agents/types/UpdateAgentResponseFormat.js} +0 -0
  255. /package/api/resources/{tag/client/requests/ListTagsRequest.js → runs/client/requests/RunsListRequest.js} +0 -0
  256. /package/{dist/api/resources/providers/client/requests/DeleteProviderRequest.js → api/resources/tags/client/requests/TagsListRequest.js} +0 -0
  257. /package/api/resources/{messages/client → tags/client/requests}/index.js +0 -0
  258. /package/{dist/api/resources/runs/client/requests/ListRunsRequest.js → api/types/AgentStateResponseFormat.js} +0 -0
  259. /package/{dist/api/resources/tag/client/requests/ListTagsRequest.js → api/types/JsonObjectResponseFormat.js} +0 -0
  260. /package/{api/resources/tag → dist/api/resources/tags}/client/requests/index.js +0 -0
  261. /package/dist/serialization/resources/agents/client/{exportAgentSerialized.js → export.js} +0 -0
  262. /package/dist/serialization/resources/runs/client/{listRuns.js → list.js} +0 -0
  263. /package/dist/serialization/resources/{tag/client/listTags.js → tags/client/list.js} +0 -0
  264. /package/{api/resources/messages → dist/serialization/resources/tags}/index.d.ts +0 -0
  265. /package/{api/resources/messages → dist/serialization/resources/tags}/index.js +0 -0
  266. /package/serialization/resources/agents/client/{exportAgentSerialized.js → export.js} +0 -0
  267. /package/serialization/resources/runs/client/{listRuns.js → list.js} +0 -0
  268. /package/serialization/resources/{tag/client/listTags.js → tags/client/list.js} +0 -0
  269. /package/{api/resources/tag → serialization/resources/tags}/index.d.ts +0 -0
  270. /package/{api/resources/tag → serialization/resources/tags}/index.js +0 -0
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Letta from "../../../index";
5
+ export type UpdateAgentResponseFormat = Letta.JsonObjectResponseFormat | Letta.JsonSchemaResponseFormat | Letta.TextResponseFormat;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +1,7 @@
1
1
  export * from "./CreateAgentRequestToolRulesItem";
2
+ export * from "./CreateAgentRequestResponseFormat";
2
3
  export * from "./UpdateAgentToolRulesItem";
4
+ export * from "./UpdateAgentResponseFormat";
3
5
  export * from "./AgentsSearchRequestSearchItemZero";
4
6
  export * from "./AgentsSearchRequestSearchItemOneOperator";
5
7
  export * from "./AgentsSearchRequestSearchItemOne";
@@ -15,7 +15,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./CreateAgentRequestToolRulesItem"), exports);
18
+ __exportStar(require("./CreateAgentRequestResponseFormat"), exports);
18
19
  __exportStar(require("./UpdateAgentToolRulesItem"), exports);
20
+ __exportStar(require("./UpdateAgentResponseFormat"), exports);
19
21
  __exportStar(require("./AgentsSearchRequestSearchItemZero"), exports);
20
22
  __exportStar(require("./AgentsSearchRequestSearchItemOneOperator"), exports);
21
23
  __exportStar(require("./AgentsSearchRequestSearchItemOne"), exports);
@@ -74,13 +74,17 @@ export declare class Batches {
74
74
  */
75
75
  retrieve(batchId: string, requestOptions?: Batches.RequestOptions): Promise<Letta.BatchJob>;
76
76
  /**
77
+ * Cancel a batch run.
78
+ *
77
79
  * @param {string} batchId
78
80
  * @param {Batches.RequestOptions} requestOptions - Request-specific configuration.
79
81
  *
82
+ * @throws {@link Letta.UnprocessableEntityError}
83
+ *
80
84
  * @example
81
85
  * await client.batches.cancel("batch_id")
82
86
  */
83
- cancel(batchId: string, requestOptions?: Batches.RequestOptions): Promise<void>;
87
+ cancel(batchId: string, requestOptions?: Batches.RequestOptions): Promise<unknown>;
84
88
  protected _getCustomAuthorizationHeaders(): Promise<{
85
89
  Authorization: string;
86
90
  }>;
@@ -75,7 +75,7 @@ class Batches {
75
75
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
76
76
  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/messages/batches"),
77
77
  method: "GET",
78
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "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),
78
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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),
79
79
  contentType: "application/json",
80
80
  requestType: "json",
81
81
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -152,7 +152,7 @@ class Batches {
152
152
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
153
153
  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/messages/batches"),
154
154
  method: "POST",
155
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "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),
155
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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),
156
156
  contentType: "application/json",
157
157
  requestType: "json",
158
158
  body: serializers.CreateBatch.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -218,7 +218,7 @@ class Batches {
218
218
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
219
219
  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/messages/batches/${encodeURIComponent(batchId)}`),
220
220
  method: "GET",
221
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "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),
221
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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),
222
222
  contentType: "application/json",
223
223
  requestType: "json",
224
224
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -267,9 +267,13 @@ class Batches {
267
267
  });
268
268
  }
269
269
  /**
270
+ * Cancel a batch run.
271
+ *
270
272
  * @param {string} batchId
271
273
  * @param {Batches.RequestOptions} requestOptions - Request-specific configuration.
272
274
  *
275
+ * @throws {@link Letta.UnprocessableEntityError}
276
+ *
273
277
  * @example
274
278
  * await client.batches.cancel("batch_id")
275
279
  */
@@ -277,9 +281,9 @@ class Batches {
277
281
  return __awaiter(this, void 0, void 0, function* () {
278
282
  var _a, _b, _c;
279
283
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
280
- 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/messages/batches/${encodeURIComponent(batchId)}`),
284
+ 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/messages/batches/${encodeURIComponent(batchId)}/cancel`),
281
285
  method: "PATCH",
282
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "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),
286
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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),
283
287
  contentType: "application/json",
284
288
  requestType: "json",
285
289
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -287,13 +291,24 @@ class Batches {
287
291
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
288
292
  });
289
293
  if (_response.ok) {
290
- return;
294
+ return _response.body;
291
295
  }
292
296
  if (_response.error.reason === "status-code") {
293
- throw new errors.LettaError({
294
- statusCode: _response.error.statusCode,
295
- body: _response.error.body,
296
- });
297
+ switch (_response.error.statusCode) {
298
+ case 422:
299
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
300
+ unrecognizedObjectKeys: "passthrough",
301
+ allowUnrecognizedUnionMembers: true,
302
+ allowUnrecognizedEnumValues: true,
303
+ skipValidation: true,
304
+ breadcrumbsPrefix: ["response"],
305
+ }));
306
+ default:
307
+ throw new errors.LettaError({
308
+ statusCode: _response.error.statusCode,
309
+ body: _response.error.body,
310
+ });
311
+ }
297
312
  }
298
313
  switch (_response.error.reason) {
299
314
  case "non-json":
@@ -302,7 +317,7 @@ class Batches {
302
317
  body: _response.error.rawBody,
303
318
  });
304
319
  case "timeout":
305
- throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/messages/batches/{batch_id}.");
320
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/messages/batches/{batch_id}/cancel.");
306
321
  case "unknown":
307
322
  throw new errors.LettaError({
308
323
  message: _response.error.errorMessage,
@@ -101,7 +101,7 @@ class Blocks {
101
101
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
102
102
  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/blocks/"),
103
103
  method: "GET",
104
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "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),
104
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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),
105
105
  contentType: "application/json",
106
106
  queryParameters: _queryParams,
107
107
  requestType: "json",
@@ -168,7 +168,7 @@ class Blocks {
168
168
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
169
169
  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/blocks/"),
170
170
  method: "POST",
171
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "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
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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),
172
172
  contentType: "application/json",
173
173
  requestType: "json",
174
174
  body: serializers.CreateBlock.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -232,7 +232,7 @@ class Blocks {
232
232
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
233
233
  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/blocks/${encodeURIComponent(blockId)}`),
234
234
  method: "GET",
235
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "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),
235
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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),
236
236
  contentType: "application/json",
237
237
  requestType: "json",
238
238
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -295,7 +295,7 @@ class Blocks {
295
295
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
296
296
  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/blocks/${encodeURIComponent(blockId)}`),
297
297
  method: "DELETE",
298
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "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),
298
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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),
299
299
  contentType: "application/json",
300
300
  requestType: "json",
301
301
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -359,7 +359,7 @@ class Blocks {
359
359
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
360
360
  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/blocks/${encodeURIComponent(blockId)}`),
361
361
  method: "PATCH",
362
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "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),
362
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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),
363
363
  contentType: "application/json",
364
364
  requestType: "json",
365
365
  body: serializers.BlockUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -77,7 +77,7 @@ class Agents {
77
77
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
78
78
  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/blocks/${encodeURIComponent(blockId)}/agents`),
79
79
  method: "GET",
80
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "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),
80
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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
81
  contentType: "application/json",
82
82
  requestType: "json",
83
83
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -83,7 +83,7 @@ class ClientSideAccessTokens {
83
83
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
84
84
  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/client-side-access-tokens"),
85
85
  method: "POST",
86
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "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),
86
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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),
87
87
  contentType: "application/json",
88
88
  requestType: "json",
89
89
  body: serializers.ClientSideAccessTokensCreateRequest.jsonOrThrow(request, {
@@ -148,7 +148,7 @@ class ClientSideAccessTokens {
148
148
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
149
149
  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/client-side-access-tokens/${encodeURIComponent(token)}`),
150
150
  method: "DELETE",
151
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "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),
151
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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),
152
152
  contentType: "application/json",
153
153
  requestType: "json",
154
154
  body: request,
@@ -70,7 +70,7 @@ class Embeddings {
70
70
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
71
71
  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/models/embedding"),
72
72
  method: "GET",
73
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "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),
73
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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),
74
74
  contentType: "application/json",
75
75
  requestType: "json",
76
76
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -109,7 +109,7 @@ class Groups {
109
109
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
110
110
  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/groups/"),
111
111
  method: "GET",
112
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "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),
112
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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),
113
113
  contentType: "application/json",
114
114
  queryParameters: _queryParams,
115
115
  requestType: "json",
@@ -179,7 +179,7 @@ class Groups {
179
179
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
180
180
  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/groups/"),
181
181
  method: "POST",
182
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "X-Project": project != null ? project : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
182
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "X-Project": project != null ? project : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
183
183
  contentType: "application/json",
184
184
  requestType: "json",
185
185
  body: serializers.GroupCreate.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
@@ -245,7 +245,7 @@ class Groups {
245
245
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
246
246
  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/groups/${encodeURIComponent(groupId)}`),
247
247
  method: "GET",
248
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "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
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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),
249
249
  contentType: "application/json",
250
250
  requestType: "json",
251
251
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -310,7 +310,7 @@ class Groups {
310
310
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
311
311
  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/groups/${encodeURIComponent(groupId)}`),
312
312
  method: "DELETE",
313
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "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),
313
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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),
314
314
  contentType: "application/json",
315
315
  requestType: "json",
316
316
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -371,7 +371,7 @@ class Groups {
371
371
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
372
372
  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/groups/${encodeURIComponent(groupId)}`),
373
373
  method: "PATCH",
374
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "X-Project": project != null ? project : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
374
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "X-Project": project != null ? project : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
375
375
  contentType: "application/json",
376
376
  requestType: "json",
377
377
  body: serializers.GroupUpdate.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
@@ -97,7 +97,7 @@ class Messages {
97
97
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
98
98
  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/groups/${encodeURIComponent(groupId)}/messages`),
99
99
  method: "GET",
100
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "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),
100
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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),
101
101
  contentType: "application/json",
102
102
  queryParameters: _queryParams,
103
103
  requestType: "json",
@@ -173,7 +173,7 @@ class Messages {
173
173
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
174
174
  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/groups/${encodeURIComponent(groupId)}/messages`),
175
175
  method: "POST",
176
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "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),
176
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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),
177
177
  contentType: "application/json",
178
178
  requestType: "json",
179
179
  body: serializers.LettaRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -233,7 +233,7 @@ class Messages {
233
233
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
234
234
  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/groups/${encodeURIComponent(groupId)}/messages/stream`),
235
235
  method: "POST",
236
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "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),
236
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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),
237
237
  contentType: "application/json",
238
238
  requestType: "json",
239
239
  body: serializers.LettaStreamingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -314,7 +314,7 @@ class Messages {
314
314
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
315
315
  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/groups/${encodeURIComponent(groupId)}/messages/${encodeURIComponent(messageId)}`),
316
316
  method: "PATCH",
317
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "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),
317
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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),
318
318
  contentType: "application/json",
319
319
  requestType: "json",
320
320
  body: serializers.groups.MessagesModifyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -380,7 +380,7 @@ class Messages {
380
380
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
381
381
  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/groups/${encodeURIComponent(groupId)}/reset-messages`),
382
382
  method: "PATCH",
383
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "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),
383
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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),
384
384
  contentType: "application/json",
385
385
  requestType: "json",
386
386
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -70,7 +70,7 @@ class Health {
70
70
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
71
71
  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/health/"),
72
72
  method: "GET",
73
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "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),
73
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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),
74
74
  contentType: "application/json",
75
75
  requestType: "json",
76
76
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -115,7 +115,7 @@ class Identities {
115
115
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
116
116
  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/identities/"),
117
117
  method: "GET",
118
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "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),
118
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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),
119
119
  contentType: "application/json",
120
120
  queryParameters: _queryParams,
121
121
  requestType: "json",
@@ -184,7 +184,7 @@ class Identities {
184
184
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
185
185
  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/identities/"),
186
186
  method: "POST",
187
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "X-Project": project != null ? project : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
187
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "X-Project": project != null ? project : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
188
188
  contentType: "application/json",
189
189
  requestType: "json",
190
190
  body: serializers.IdentityCreate.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
@@ -253,7 +253,7 @@ class Identities {
253
253
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
254
254
  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/identities/"),
255
255
  method: "PUT",
256
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "X-Project": project != null ? project : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
256
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "X-Project": project != null ? project : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
257
257
  contentType: "application/json",
258
258
  requestType: "json",
259
259
  body: serializers.IdentityUpsert.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
@@ -317,7 +317,7 @@ class Identities {
317
317
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
318
318
  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/identities/${encodeURIComponent(identityId)}`),
319
319
  method: "GET",
320
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "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),
320
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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),
321
321
  contentType: "application/json",
322
322
  requestType: "json",
323
323
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -382,7 +382,7 @@ class Identities {
382
382
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
383
383
  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/identities/${encodeURIComponent(identityId)}`),
384
384
  method: "DELETE",
385
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "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),
385
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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),
386
386
  contentType: "application/json",
387
387
  requestType: "json",
388
388
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -440,7 +440,7 @@ class Identities {
440
440
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
441
441
  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/identities/${encodeURIComponent(identityId)}`),
442
442
  method: "PATCH",
443
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "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),
443
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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),
444
444
  contentType: "application/json",
445
445
  requestType: "json",
446
446
  body: serializers.IdentityUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -79,7 +79,7 @@ class Properties {
79
79
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
80
80
  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/identities/${encodeURIComponent(identityId)}/properties`),
81
81
  method: "PUT",
82
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "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
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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
83
  contentType: "application/json",
84
84
  requestType: "json",
85
85
  body: serializers.identities.properties.upsert.Request.jsonOrThrow(request, {
@@ -22,10 +22,8 @@ export * as health from "./health";
22
22
  export * as providers from "./providers";
23
23
  export * as runs from "./runs";
24
24
  export * as steps from "./steps";
25
- export * as tag from "./tag";
26
- export * as batches from "./batches";
27
- export * as messages from "./messages";
28
25
  export * as tags from "./tags";
26
+ export * as batches from "./batches";
29
27
  export * from "./tools/client/requests";
30
28
  export * from "./sources/client/requests";
31
29
  export * from "./agents/client/requests";
@@ -36,7 +34,7 @@ export * from "./jobs/client/requests";
36
34
  export * from "./providers/client/requests";
37
35
  export * from "./runs/client/requests";
38
36
  export * from "./steps/client/requests";
39
- export * from "./tag/client/requests";
37
+ export * from "./tags/client/requests";
40
38
  export * from "./batches/client/requests";
41
39
  export * from "./voice/client/requests";
42
40
  export * from "./templates/client/requests";
@@ -36,7 +36,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.tags = exports.messages = exports.batches = exports.tag = exports.steps = exports.runs = exports.providers = exports.health = exports.jobs = exports.blocks = exports.embeddings = exports.models = exports.identities = exports.sources = exports.projects = exports.clientSideAccessTokens = exports.templates = exports.voice = exports.groups = exports.agents = exports.tools = void 0;
39
+ exports.batches = exports.tags = exports.steps = exports.runs = exports.providers = exports.health = exports.jobs = exports.blocks = exports.embeddings = exports.models = exports.identities = exports.sources = exports.projects = exports.clientSideAccessTokens = exports.templates = exports.voice = exports.groups = exports.agents = exports.tools = void 0;
40
40
  exports.tools = __importStar(require("./tools"));
41
41
  __exportStar(require("./tools/types"), exports);
42
42
  exports.agents = __importStar(require("./agents"));
@@ -61,10 +61,8 @@ exports.health = __importStar(require("./health"));
61
61
  exports.providers = __importStar(require("./providers"));
62
62
  exports.runs = __importStar(require("./runs"));
63
63
  exports.steps = __importStar(require("./steps"));
64
- exports.tag = __importStar(require("./tag"));
65
- exports.batches = __importStar(require("./batches"));
66
- exports.messages = __importStar(require("./messages"));
67
64
  exports.tags = __importStar(require("./tags"));
65
+ exports.batches = __importStar(require("./batches"));
68
66
  __exportStar(require("./tools/client/requests"), exports);
69
67
  __exportStar(require("./sources/client/requests"), exports);
70
68
  __exportStar(require("./agents/client/requests"), exports);
@@ -75,7 +73,7 @@ __exportStar(require("./jobs/client/requests"), exports);
75
73
  __exportStar(require("./providers/client/requests"), exports);
76
74
  __exportStar(require("./runs/client/requests"), exports);
77
75
  __exportStar(require("./steps/client/requests"), exports);
78
- __exportStar(require("./tag/client/requests"), exports);
76
+ __exportStar(require("./tags/client/requests"), exports);
79
77
  __exportStar(require("./batches/client/requests"), exports);
80
78
  __exportStar(require("./voice/client/requests"), exports);
81
79
  __exportStar(require("./templates/client/requests"), exports);
@@ -81,7 +81,7 @@ class Jobs {
81
81
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
82
82
  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/jobs/"),
83
83
  method: "GET",
84
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "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
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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),
85
85
  contentType: "application/json",
86
86
  queryParameters: _queryParams,
87
87
  requestType: "json",
@@ -146,7 +146,7 @@ class Jobs {
146
146
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
147
147
  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/jobs/active"),
148
148
  method: "GET",
149
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "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),
149
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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
150
  contentType: "application/json",
151
151
  requestType: "json",
152
152
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -211,7 +211,7 @@ class Jobs {
211
211
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
212
212
  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/jobs/${encodeURIComponent(jobId)}`),
213
213
  method: "GET",
214
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "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),
214
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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),
215
215
  contentType: "application/json",
216
216
  requestType: "json",
217
217
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -276,7 +276,7 @@ class Jobs {
276
276
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
277
277
  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/jobs/${encodeURIComponent(jobId)}`),
278
278
  method: "DELETE",
279
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "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),
279
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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),
280
280
  contentType: "application/json",
281
281
  requestType: "json",
282
282
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -70,7 +70,7 @@ class Models {
70
70
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
71
71
  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/models/"),
72
72
  method: "GET",
73
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "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),
73
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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),
74
74
  contentType: "application/json",
75
75
  requestType: "json",
76
76
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -84,7 +84,7 @@ class Projects {
84
84
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
85
85
  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/projects"),
86
86
  method: "GET",
87
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "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),
87
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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),
88
88
  contentType: "application/json",
89
89
  queryParameters: _queryParams,
90
90
  requestType: "json",