@letta-ai/letta-client 0.0.68655 → 0.0.68657

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 (261) hide show
  1. package/Client.d.ts +3 -0
  2. package/Client.js +45 -40
  3. package/README.md +9 -9
  4. package/api/resources/agents/client/Client.js +9 -9
  5. package/api/resources/agents/client/requests/CreateAgentRequest.d.ts +3 -1
  6. package/api/resources/agents/client/requests/UpdateAgent.d.ts +3 -1
  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/files/client/Client.js +4 -4
  11. package/api/resources/agents/resources/folders/client/Client.js +3 -3
  12. package/api/resources/agents/resources/groups/client/Client.js +1 -1
  13. package/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  14. package/api/resources/agents/resources/messages/client/Client.js +10 -10
  15. package/api/resources/agents/resources/passages/client/Client.js +5 -5
  16. package/api/resources/agents/resources/sources/client/Client.js +3 -3
  17. package/api/resources/agents/resources/templates/client/Client.js +3 -3
  18. package/api/resources/agents/resources/tools/client/Client.js +4 -4
  19. package/api/resources/archives/client/Client.d.ts +78 -0
  20. package/api/resources/archives/client/Client.js +325 -0
  21. package/api/resources/archives/client/index.d.ts +1 -0
  22. package/api/resources/archives/client/index.js +17 -0
  23. package/api/resources/archives/client/requests/ArchiveCreateRequest.d.ts +13 -0
  24. package/api/resources/archives/client/requests/ArchiveCreateRequest.js +5 -0
  25. package/api/resources/archives/client/requests/ArchiveUpdateRequest.d.ts +11 -0
  26. package/api/resources/archives/client/requests/ArchiveUpdateRequest.js +5 -0
  27. package/api/resources/archives/client/requests/ListArchivesRequest.d.ts +34 -0
  28. package/api/resources/archives/client/requests/ListArchivesRequest.js +5 -0
  29. package/api/resources/archives/client/requests/index.d.ts +3 -0
  30. package/api/resources/archives/client/requests/index.js +2 -0
  31. package/api/resources/archives/index.d.ts +2 -0
  32. package/api/resources/archives/index.js +18 -0
  33. package/api/resources/archives/types/ListArchivesRequestOrder.d.ts +11 -0
  34. package/api/resources/archives/types/ListArchivesRequestOrder.js +10 -0
  35. package/api/resources/archives/types/index.d.ts +1 -0
  36. package/api/resources/archives/types/index.js +17 -0
  37. package/api/resources/batches/client/Client.js +4 -4
  38. package/api/resources/batches/resources/messages/client/Client.js +1 -1
  39. package/api/resources/blocks/client/Client.js +6 -6
  40. package/api/resources/blocks/resources/agents/client/Client.js +1 -1
  41. package/api/resources/clientSideAccessTokens/client/Client.js +3 -3
  42. package/api/resources/folders/client/Client.d.ts +1 -1
  43. package/api/resources/folders/client/Client.js +9 -9
  44. package/api/resources/folders/resources/agents/client/Client.js +1 -1
  45. package/api/resources/folders/resources/files/client/Client.js +3 -3
  46. package/api/resources/folders/resources/passages/client/Client.js +1 -1
  47. package/api/resources/groups/client/Client.js +6 -6
  48. package/api/resources/groups/resources/messages/client/Client.js +5 -5
  49. package/api/resources/health/client/Client.js +1 -1
  50. package/api/resources/identities/client/Client.js +7 -7
  51. package/api/resources/identities/resources/agents/client/Client.js +1 -1
  52. package/api/resources/identities/resources/blocks/client/Client.js +1 -1
  53. package/api/resources/identities/resources/properties/client/Client.js +1 -1
  54. package/api/resources/index.d.ts +3 -0
  55. package/api/resources/index.js +4 -1
  56. package/api/resources/jobs/client/Client.d.ts +0 -1
  57. package/api/resources/jobs/client/Client.js +9 -7
  58. package/api/resources/jobs/client/requests/JobsListRequest.d.ts +4 -0
  59. package/api/resources/models/client/Client.js +2 -2
  60. package/api/resources/models/resources/embeddings/client/Client.js +1 -1
  61. package/api/resources/projects/client/Client.js +1 -1
  62. package/api/resources/providers/client/Client.js +6 -6
  63. package/api/resources/runs/client/Client.js +15 -7
  64. package/api/resources/runs/client/requests/RunsListRequest.d.ts +9 -0
  65. package/api/resources/runs/resources/messages/client/Client.js +1 -1
  66. package/api/resources/runs/resources/steps/client/Client.js +1 -1
  67. package/api/resources/runs/resources/usage/client/Client.js +1 -1
  68. package/api/resources/sources/client/Client.js +10 -10
  69. package/api/resources/sources/resources/files/client/Client.js +3 -3
  70. package/api/resources/sources/resources/passages/client/Client.js +1 -1
  71. package/api/resources/steps/client/Client.js +2 -2
  72. package/api/resources/steps/resources/feedback/client/Client.js +1 -1
  73. package/api/resources/steps/resources/metrics/client/Client.js +1 -1
  74. package/api/resources/steps/resources/trace/client/Client.js +1 -1
  75. package/api/resources/tags/client/Client.js +1 -1
  76. package/api/resources/telemetry/client/Client.js +1 -1
  77. package/api/resources/templates/client/Client.js +9 -9
  78. package/api/resources/templates/resources/agents/client/Client.js +1 -1
  79. package/api/resources/tools/client/Client.js +20 -20
  80. package/api/resources/voice/client/Client.js +1 -1
  81. package/api/types/AgentState.d.ts +3 -1
  82. package/api/types/Archive.d.ts +35 -0
  83. package/api/types/Archive.js +5 -0
  84. package/api/types/BatchJob.d.ts +2 -0
  85. package/api/types/InternalTemplateAgentCreate.d.ts +3 -1
  86. package/api/types/Job.d.ts +2 -0
  87. package/api/types/LettaSchemasAgentFileAgentSchema.d.ts +3 -1
  88. package/api/types/Run.d.ts +2 -0
  89. package/api/types/index.d.ts +1 -0
  90. package/api/types/index.js +1 -0
  91. package/dist/Client.d.ts +3 -0
  92. package/dist/Client.js +45 -40
  93. package/dist/api/resources/agents/client/Client.js +9 -9
  94. package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +3 -1
  95. package/dist/api/resources/agents/client/requests/UpdateAgent.d.ts +3 -1
  96. package/dist/api/resources/agents/resources/blocks/client/Client.js +5 -5
  97. package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
  98. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  99. package/dist/api/resources/agents/resources/files/client/Client.js +4 -4
  100. package/dist/api/resources/agents/resources/folders/client/Client.js +3 -3
  101. package/dist/api/resources/agents/resources/groups/client/Client.js +1 -1
  102. package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  103. package/dist/api/resources/agents/resources/messages/client/Client.js +10 -10
  104. package/dist/api/resources/agents/resources/passages/client/Client.js +5 -5
  105. package/dist/api/resources/agents/resources/sources/client/Client.js +3 -3
  106. package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
  107. package/dist/api/resources/agents/resources/tools/client/Client.js +4 -4
  108. package/dist/api/resources/archives/client/Client.d.ts +78 -0
  109. package/dist/api/resources/archives/client/Client.js +325 -0
  110. package/dist/api/resources/archives/client/index.d.ts +1 -0
  111. package/dist/api/resources/archives/client/index.js +17 -0
  112. package/dist/api/resources/archives/client/requests/ArchiveCreateRequest.d.ts +13 -0
  113. package/dist/api/resources/archives/client/requests/ArchiveCreateRequest.js +5 -0
  114. package/dist/api/resources/archives/client/requests/ArchiveUpdateRequest.d.ts +11 -0
  115. package/dist/api/resources/archives/client/requests/ArchiveUpdateRequest.js +5 -0
  116. package/dist/api/resources/archives/client/requests/ListArchivesRequest.d.ts +34 -0
  117. package/dist/api/resources/archives/client/requests/ListArchivesRequest.js +5 -0
  118. package/dist/api/resources/archives/client/requests/index.d.ts +3 -0
  119. package/dist/api/resources/archives/client/requests/index.js +2 -0
  120. package/dist/api/resources/archives/index.d.ts +2 -0
  121. package/dist/api/resources/archives/index.js +18 -0
  122. package/dist/api/resources/archives/types/ListArchivesRequestOrder.d.ts +11 -0
  123. package/dist/api/resources/archives/types/ListArchivesRequestOrder.js +10 -0
  124. package/dist/api/resources/archives/types/index.d.ts +1 -0
  125. package/dist/api/resources/archives/types/index.js +17 -0
  126. package/dist/api/resources/batches/client/Client.js +4 -4
  127. package/dist/api/resources/batches/resources/messages/client/Client.js +1 -1
  128. package/dist/api/resources/blocks/client/Client.js +6 -6
  129. package/dist/api/resources/blocks/resources/agents/client/Client.js +1 -1
  130. package/dist/api/resources/clientSideAccessTokens/client/Client.js +3 -3
  131. package/dist/api/resources/folders/client/Client.d.ts +1 -1
  132. package/dist/api/resources/folders/client/Client.js +9 -9
  133. package/dist/api/resources/folders/resources/agents/client/Client.js +1 -1
  134. package/dist/api/resources/folders/resources/files/client/Client.js +3 -3
  135. package/dist/api/resources/folders/resources/passages/client/Client.js +1 -1
  136. package/dist/api/resources/groups/client/Client.js +6 -6
  137. package/dist/api/resources/groups/resources/messages/client/Client.js +5 -5
  138. package/dist/api/resources/health/client/Client.js +1 -1
  139. package/dist/api/resources/identities/client/Client.js +7 -7
  140. package/dist/api/resources/identities/resources/agents/client/Client.js +1 -1
  141. package/dist/api/resources/identities/resources/blocks/client/Client.js +1 -1
  142. package/dist/api/resources/identities/resources/properties/client/Client.js +1 -1
  143. package/dist/api/resources/index.d.ts +3 -0
  144. package/dist/api/resources/index.js +4 -1
  145. package/dist/api/resources/jobs/client/Client.d.ts +0 -1
  146. package/dist/api/resources/jobs/client/Client.js +9 -7
  147. package/dist/api/resources/jobs/client/requests/JobsListRequest.d.ts +4 -0
  148. package/dist/api/resources/models/client/Client.js +2 -2
  149. package/dist/api/resources/models/resources/embeddings/client/Client.js +1 -1
  150. package/dist/api/resources/projects/client/Client.js +1 -1
  151. package/dist/api/resources/providers/client/Client.js +6 -6
  152. package/dist/api/resources/runs/client/Client.js +15 -7
  153. package/dist/api/resources/runs/client/requests/RunsListRequest.d.ts +9 -0
  154. package/dist/api/resources/runs/resources/messages/client/Client.js +1 -1
  155. package/dist/api/resources/runs/resources/steps/client/Client.js +1 -1
  156. package/dist/api/resources/runs/resources/usage/client/Client.js +1 -1
  157. package/dist/api/resources/sources/client/Client.js +10 -10
  158. package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
  159. package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
  160. package/dist/api/resources/steps/client/Client.js +2 -2
  161. package/dist/api/resources/steps/resources/feedback/client/Client.js +1 -1
  162. package/dist/api/resources/steps/resources/metrics/client/Client.js +1 -1
  163. package/dist/api/resources/steps/resources/trace/client/Client.js +1 -1
  164. package/dist/api/resources/tags/client/Client.js +1 -1
  165. package/dist/api/resources/telemetry/client/Client.js +1 -1
  166. package/dist/api/resources/templates/client/Client.js +9 -9
  167. package/dist/api/resources/templates/resources/agents/client/Client.js +1 -1
  168. package/dist/api/resources/tools/client/Client.js +20 -20
  169. package/dist/api/resources/voice/client/Client.js +1 -1
  170. package/dist/api/types/AgentState.d.ts +3 -1
  171. package/dist/api/types/Archive.d.ts +35 -0
  172. package/dist/api/types/Archive.js +5 -0
  173. package/dist/api/types/BatchJob.d.ts +2 -0
  174. package/dist/api/types/InternalTemplateAgentCreate.d.ts +3 -1
  175. package/dist/api/types/Job.d.ts +2 -0
  176. package/dist/api/types/LettaSchemasAgentFileAgentSchema.d.ts +3 -1
  177. package/dist/api/types/Run.d.ts +2 -0
  178. package/dist/api/types/index.d.ts +1 -0
  179. package/dist/api/types/index.js +1 -0
  180. package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -0
  181. package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.js +1 -0
  182. package/dist/serialization/resources/agents/client/requests/UpdateAgent.d.ts +1 -0
  183. package/dist/serialization/resources/agents/client/requests/UpdateAgent.js +3 -0
  184. package/dist/serialization/resources/archives/client/index.d.ts +2 -0
  185. package/dist/serialization/resources/archives/client/index.js +41 -0
  186. package/dist/serialization/resources/archives/client/listArchives.d.ts +11 -0
  187. package/dist/serialization/resources/archives/client/listArchives.js +42 -0
  188. package/dist/serialization/resources/archives/client/requests/ArchiveCreateRequest.d.ts +13 -0
  189. package/dist/serialization/resources/archives/client/requests/ArchiveCreateRequest.js +44 -0
  190. package/dist/serialization/resources/archives/client/requests/ArchiveUpdateRequest.d.ts +13 -0
  191. package/dist/serialization/resources/archives/client/requests/ArchiveUpdateRequest.js +44 -0
  192. package/dist/serialization/resources/archives/client/requests/index.d.ts +2 -0
  193. package/dist/serialization/resources/archives/client/requests/index.js +7 -0
  194. package/dist/serialization/resources/archives/index.d.ts +2 -0
  195. package/dist/serialization/resources/archives/index.js +18 -0
  196. package/dist/serialization/resources/archives/types/ListArchivesRequestOrder.d.ts +10 -0
  197. package/dist/serialization/resources/archives/types/ListArchivesRequestOrder.js +41 -0
  198. package/dist/serialization/resources/archives/types/index.d.ts +1 -0
  199. package/dist/serialization/resources/archives/types/index.js +17 -0
  200. package/dist/serialization/resources/index.d.ts +3 -0
  201. package/dist/serialization/resources/index.js +4 -1
  202. package/dist/serialization/types/AgentState.d.ts +1 -0
  203. package/dist/serialization/types/AgentState.js +1 -0
  204. package/dist/serialization/types/Archive.d.ts +21 -0
  205. package/dist/serialization/types/Archive.js +52 -0
  206. package/dist/serialization/types/BatchJob.d.ts +2 -0
  207. package/dist/serialization/types/BatchJob.js +2 -0
  208. package/dist/serialization/types/InternalTemplateAgentCreate.d.ts +1 -0
  209. package/dist/serialization/types/InternalTemplateAgentCreate.js +1 -0
  210. package/dist/serialization/types/Job.d.ts +2 -0
  211. package/dist/serialization/types/Job.js +2 -0
  212. package/dist/serialization/types/LettaSchemasAgentFileAgentSchema.d.ts +1 -0
  213. package/dist/serialization/types/LettaSchemasAgentFileAgentSchema.js +1 -0
  214. package/dist/serialization/types/Run.d.ts +2 -0
  215. package/dist/serialization/types/Run.js +2 -0
  216. package/dist/serialization/types/index.d.ts +1 -0
  217. package/dist/serialization/types/index.js +1 -0
  218. package/dist/version.d.ts +1 -1
  219. package/dist/version.js +1 -1
  220. package/package.json +1 -1
  221. package/reference.md +202 -2
  222. package/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -0
  223. package/serialization/resources/agents/client/requests/CreateAgentRequest.js +1 -0
  224. package/serialization/resources/agents/client/requests/UpdateAgent.d.ts +1 -0
  225. package/serialization/resources/agents/client/requests/UpdateAgent.js +3 -0
  226. package/serialization/resources/archives/client/index.d.ts +2 -0
  227. package/serialization/resources/archives/client/index.js +41 -0
  228. package/serialization/resources/archives/client/listArchives.d.ts +11 -0
  229. package/serialization/resources/archives/client/listArchives.js +42 -0
  230. package/serialization/resources/archives/client/requests/ArchiveCreateRequest.d.ts +13 -0
  231. package/serialization/resources/archives/client/requests/ArchiveCreateRequest.js +44 -0
  232. package/serialization/resources/archives/client/requests/ArchiveUpdateRequest.d.ts +13 -0
  233. package/serialization/resources/archives/client/requests/ArchiveUpdateRequest.js +44 -0
  234. package/serialization/resources/archives/client/requests/index.d.ts +2 -0
  235. package/serialization/resources/archives/client/requests/index.js +7 -0
  236. package/serialization/resources/archives/index.d.ts +2 -0
  237. package/serialization/resources/archives/index.js +18 -0
  238. package/serialization/resources/archives/types/ListArchivesRequestOrder.d.ts +10 -0
  239. package/serialization/resources/archives/types/ListArchivesRequestOrder.js +41 -0
  240. package/serialization/resources/archives/types/index.d.ts +1 -0
  241. package/serialization/resources/archives/types/index.js +17 -0
  242. package/serialization/resources/index.d.ts +3 -0
  243. package/serialization/resources/index.js +4 -1
  244. package/serialization/types/AgentState.d.ts +1 -0
  245. package/serialization/types/AgentState.js +1 -0
  246. package/serialization/types/Archive.d.ts +21 -0
  247. package/serialization/types/Archive.js +52 -0
  248. package/serialization/types/BatchJob.d.ts +2 -0
  249. package/serialization/types/BatchJob.js +2 -0
  250. package/serialization/types/InternalTemplateAgentCreate.d.ts +1 -0
  251. package/serialization/types/InternalTemplateAgentCreate.js +1 -0
  252. package/serialization/types/Job.d.ts +2 -0
  253. package/serialization/types/Job.js +2 -0
  254. package/serialization/types/LettaSchemasAgentFileAgentSchema.d.ts +1 -0
  255. package/serialization/types/LettaSchemasAgentFileAgentSchema.js +1 -0
  256. package/serialization/types/Run.d.ts +2 -0
  257. package/serialization/types/Run.js +2 -0
  258. package/serialization/types/index.d.ts +1 -0
  259. package/serialization/types/index.js +1 -0
  260. package/version.d.ts +1 -1
  261. package/version.js +1 -1
@@ -0,0 +1,78 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../environments";
5
+ import * as core from "../../../../core";
6
+ import * as Letta from "../../../index";
7
+ export declare namespace Archives {
8
+ interface Options {
9
+ environment?: core.Supplier<environments.LettaEnvironment | string>;
10
+ /** Specify a custom URL to connect the client to. */
11
+ baseUrl?: core.Supplier<string>;
12
+ token?: core.Supplier<string | undefined>;
13
+ /** Override the X-Project header */
14
+ project?: core.Supplier<string | undefined>;
15
+ fetcher?: core.FetchFunction;
16
+ }
17
+ interface RequestOptions {
18
+ /** The maximum time to wait for a response in seconds. */
19
+ timeoutInSeconds?: number;
20
+ /** The number of times to retry the request. Defaults to 2. */
21
+ maxRetries?: number;
22
+ /** A hook to abort the request. */
23
+ abortSignal?: AbortSignal;
24
+ /** Override the X-Project header */
25
+ project?: string | undefined;
26
+ /** Additional headers to include in the request. */
27
+ headers?: Record<string, string>;
28
+ }
29
+ }
30
+ export declare class Archives {
31
+ protected readonly _options: Archives.Options;
32
+ constructor(_options?: Archives.Options);
33
+ /**
34
+ * Get a list of all archives for the current organization with optional filters and pagination.
35
+ *
36
+ * @param {Letta.ListArchivesRequest} request
37
+ * @param {Archives.RequestOptions} requestOptions - Request-specific configuration.
38
+ *
39
+ * @throws {@link Letta.UnprocessableEntityError}
40
+ *
41
+ * @example
42
+ * await client.archives.listArchives()
43
+ */
44
+ listArchives(request?: Letta.ListArchivesRequest, requestOptions?: Archives.RequestOptions): core.HttpResponsePromise<Letta.Archive[]>;
45
+ private __listArchives;
46
+ /**
47
+ * Create a new archive.
48
+ *
49
+ * @param {Letta.ArchiveCreateRequest} request
50
+ * @param {Archives.RequestOptions} requestOptions - Request-specific configuration.
51
+ *
52
+ * @throws {@link Letta.UnprocessableEntityError}
53
+ *
54
+ * @example
55
+ * await client.archives.createArchive({
56
+ * name: "name"
57
+ * })
58
+ */
59
+ createArchive(request: Letta.ArchiveCreateRequest, requestOptions?: Archives.RequestOptions): core.HttpResponsePromise<Letta.Archive>;
60
+ private __createArchive;
61
+ /**
62
+ * Update an existing archive's name and/or description.
63
+ *
64
+ * @param {string} archiveId
65
+ * @param {Letta.ArchiveUpdateRequest} request
66
+ * @param {Archives.RequestOptions} requestOptions - Request-specific configuration.
67
+ *
68
+ * @throws {@link Letta.UnprocessableEntityError}
69
+ *
70
+ * @example
71
+ * await client.archives.modifyArchive("archive_id")
72
+ */
73
+ modifyArchive(archiveId: string, request?: Letta.ArchiveUpdateRequest, requestOptions?: Archives.RequestOptions): core.HttpResponsePromise<Letta.Archive>;
74
+ private __modifyArchive;
75
+ protected _getCustomAuthorizationHeaders(): Promise<{
76
+ Authorization: string;
77
+ }>;
78
+ }
@@ -0,0 +1,325 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
39
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
40
+ return new (P || (P = Promise))(function (resolve, reject) {
41
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
42
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
43
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
44
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
45
+ });
46
+ };
47
+ var __importDefault = (this && this.__importDefault) || function (mod) {
48
+ return (mod && mod.__esModule) ? mod : { "default": mod };
49
+ };
50
+ Object.defineProperty(exports, "__esModule", { value: true });
51
+ exports.Archives = void 0;
52
+ const environments = __importStar(require("../../../../environments"));
53
+ const core = __importStar(require("../../../../core"));
54
+ const Letta = __importStar(require("../../../index"));
55
+ const serializers = __importStar(require("../../../../serialization/index"));
56
+ const url_join_1 = __importDefault(require("url-join"));
57
+ const errors = __importStar(require("../../../../errors/index"));
58
+ class Archives {
59
+ constructor(_options = {}) {
60
+ this._options = _options;
61
+ }
62
+ /**
63
+ * Get a list of all archives for the current organization with optional filters and pagination.
64
+ *
65
+ * @param {Letta.ListArchivesRequest} request
66
+ * @param {Archives.RequestOptions} requestOptions - Request-specific configuration.
67
+ *
68
+ * @throws {@link Letta.UnprocessableEntityError}
69
+ *
70
+ * @example
71
+ * await client.archives.listArchives()
72
+ */
73
+ listArchives(request = {}, requestOptions) {
74
+ return core.HttpResponsePromise.fromPromise(this.__listArchives(request, requestOptions));
75
+ }
76
+ __listArchives() {
77
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
78
+ var _a, _b, _c;
79
+ const { before, after, limit, order, name, agentId } = request;
80
+ const _queryParams = {};
81
+ if (before != null) {
82
+ _queryParams["before"] = before;
83
+ }
84
+ if (after != null) {
85
+ _queryParams["after"] = after;
86
+ }
87
+ if (limit != null) {
88
+ _queryParams["limit"] = limit.toString();
89
+ }
90
+ if (order != null) {
91
+ _queryParams["order"] = serializers.ListArchivesRequestOrder.jsonOrThrow(order, {
92
+ unrecognizedObjectKeys: "strip",
93
+ });
94
+ }
95
+ if (name != null) {
96
+ _queryParams["name"] = name;
97
+ }
98
+ if (agentId != null) {
99
+ _queryParams["agent_id"] = agentId;
100
+ }
101
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
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/archives/"),
103
+ method: "GET",
104
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
105
+ ? yield core.Supplier.get(this._options.project)
106
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68657", "User-Agent": "@letta-ai/letta-client/0.0.68657", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
107
+ contentType: "application/json",
108
+ queryParameters: _queryParams,
109
+ requestType: "json",
110
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
111
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
112
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
113
+ });
114
+ if (_response.ok) {
115
+ return {
116
+ data: serializers.archives.listArchives.Response.parseOrThrow(_response.body, {
117
+ unrecognizedObjectKeys: "passthrough",
118
+ allowUnrecognizedUnionMembers: true,
119
+ allowUnrecognizedEnumValues: true,
120
+ skipValidation: true,
121
+ breadcrumbsPrefix: ["response"],
122
+ }),
123
+ rawResponse: _response.rawResponse,
124
+ };
125
+ }
126
+ if (_response.error.reason === "status-code") {
127
+ switch (_response.error.statusCode) {
128
+ case 422:
129
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
130
+ unrecognizedObjectKeys: "passthrough",
131
+ allowUnrecognizedUnionMembers: true,
132
+ allowUnrecognizedEnumValues: true,
133
+ skipValidation: true,
134
+ breadcrumbsPrefix: ["response"],
135
+ }), _response.rawResponse);
136
+ default:
137
+ throw new errors.LettaError({
138
+ statusCode: _response.error.statusCode,
139
+ body: _response.error.body,
140
+ rawResponse: _response.rawResponse,
141
+ });
142
+ }
143
+ }
144
+ switch (_response.error.reason) {
145
+ case "non-json":
146
+ throw new errors.LettaError({
147
+ statusCode: _response.error.statusCode,
148
+ body: _response.error.rawBody,
149
+ rawResponse: _response.rawResponse,
150
+ });
151
+ case "timeout":
152
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/archives/.");
153
+ case "unknown":
154
+ throw new errors.LettaError({
155
+ message: _response.error.errorMessage,
156
+ rawResponse: _response.rawResponse,
157
+ });
158
+ }
159
+ });
160
+ }
161
+ /**
162
+ * Create a new archive.
163
+ *
164
+ * @param {Letta.ArchiveCreateRequest} request
165
+ * @param {Archives.RequestOptions} requestOptions - Request-specific configuration.
166
+ *
167
+ * @throws {@link Letta.UnprocessableEntityError}
168
+ *
169
+ * @example
170
+ * await client.archives.createArchive({
171
+ * name: "name"
172
+ * })
173
+ */
174
+ createArchive(request, requestOptions) {
175
+ return core.HttpResponsePromise.fromPromise(this.__createArchive(request, requestOptions));
176
+ }
177
+ __createArchive(request, requestOptions) {
178
+ return __awaiter(this, void 0, void 0, function* () {
179
+ var _a, _b, _c;
180
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
181
+ 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/archives/"),
182
+ method: "POST",
183
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
184
+ ? yield core.Supplier.get(this._options.project)
185
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68657", "User-Agent": "@letta-ai/letta-client/0.0.68657", "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),
186
+ contentType: "application/json",
187
+ requestType: "json",
188
+ body: serializers.ArchiveCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
189
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
190
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
191
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
192
+ });
193
+ if (_response.ok) {
194
+ return {
195
+ data: serializers.Archive.parseOrThrow(_response.body, {
196
+ unrecognizedObjectKeys: "passthrough",
197
+ allowUnrecognizedUnionMembers: true,
198
+ allowUnrecognizedEnumValues: true,
199
+ skipValidation: true,
200
+ breadcrumbsPrefix: ["response"],
201
+ }),
202
+ rawResponse: _response.rawResponse,
203
+ };
204
+ }
205
+ if (_response.error.reason === "status-code") {
206
+ switch (_response.error.statusCode) {
207
+ case 422:
208
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
209
+ unrecognizedObjectKeys: "passthrough",
210
+ allowUnrecognizedUnionMembers: true,
211
+ allowUnrecognizedEnumValues: true,
212
+ skipValidation: true,
213
+ breadcrumbsPrefix: ["response"],
214
+ }), _response.rawResponse);
215
+ default:
216
+ throw new errors.LettaError({
217
+ statusCode: _response.error.statusCode,
218
+ body: _response.error.body,
219
+ rawResponse: _response.rawResponse,
220
+ });
221
+ }
222
+ }
223
+ switch (_response.error.reason) {
224
+ case "non-json":
225
+ throw new errors.LettaError({
226
+ statusCode: _response.error.statusCode,
227
+ body: _response.error.rawBody,
228
+ rawResponse: _response.rawResponse,
229
+ });
230
+ case "timeout":
231
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/archives/.");
232
+ case "unknown":
233
+ throw new errors.LettaError({
234
+ message: _response.error.errorMessage,
235
+ rawResponse: _response.rawResponse,
236
+ });
237
+ }
238
+ });
239
+ }
240
+ /**
241
+ * Update an existing archive's name and/or description.
242
+ *
243
+ * @param {string} archiveId
244
+ * @param {Letta.ArchiveUpdateRequest} request
245
+ * @param {Archives.RequestOptions} requestOptions - Request-specific configuration.
246
+ *
247
+ * @throws {@link Letta.UnprocessableEntityError}
248
+ *
249
+ * @example
250
+ * await client.archives.modifyArchive("archive_id")
251
+ */
252
+ modifyArchive(archiveId, request = {}, requestOptions) {
253
+ return core.HttpResponsePromise.fromPromise(this.__modifyArchive(archiveId, request, requestOptions));
254
+ }
255
+ __modifyArchive(archiveId_1) {
256
+ return __awaiter(this, arguments, void 0, function* (archiveId, request = {}, requestOptions) {
257
+ var _a, _b, _c;
258
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
259
+ 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/archives/${encodeURIComponent(archiveId)}`),
260
+ method: "PATCH",
261
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
262
+ ? yield core.Supplier.get(this._options.project)
263
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68657", "User-Agent": "@letta-ai/letta-client/0.0.68657", "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),
264
+ contentType: "application/json",
265
+ requestType: "json",
266
+ body: serializers.ArchiveUpdateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
267
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
268
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
269
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
270
+ });
271
+ if (_response.ok) {
272
+ return {
273
+ data: serializers.Archive.parseOrThrow(_response.body, {
274
+ unrecognizedObjectKeys: "passthrough",
275
+ allowUnrecognizedUnionMembers: true,
276
+ allowUnrecognizedEnumValues: true,
277
+ skipValidation: true,
278
+ breadcrumbsPrefix: ["response"],
279
+ }),
280
+ rawResponse: _response.rawResponse,
281
+ };
282
+ }
283
+ if (_response.error.reason === "status-code") {
284
+ switch (_response.error.statusCode) {
285
+ case 422:
286
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
287
+ unrecognizedObjectKeys: "passthrough",
288
+ allowUnrecognizedUnionMembers: true,
289
+ allowUnrecognizedEnumValues: true,
290
+ skipValidation: true,
291
+ breadcrumbsPrefix: ["response"],
292
+ }), _response.rawResponse);
293
+ default:
294
+ throw new errors.LettaError({
295
+ statusCode: _response.error.statusCode,
296
+ body: _response.error.body,
297
+ rawResponse: _response.rawResponse,
298
+ });
299
+ }
300
+ }
301
+ switch (_response.error.reason) {
302
+ case "non-json":
303
+ throw new errors.LettaError({
304
+ statusCode: _response.error.statusCode,
305
+ body: _response.error.rawBody,
306
+ rawResponse: _response.rawResponse,
307
+ });
308
+ case "timeout":
309
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/archives/{archive_id}.");
310
+ case "unknown":
311
+ throw new errors.LettaError({
312
+ message: _response.error.errorMessage,
313
+ rawResponse: _response.rawResponse,
314
+ });
315
+ }
316
+ });
317
+ }
318
+ _getCustomAuthorizationHeaders() {
319
+ return __awaiter(this, void 0, void 0, function* () {
320
+ const tokenValue = yield core.Supplier.get(this._options.token);
321
+ return { Authorization: `Bearer ${tokenValue}` };
322
+ });
323
+ }
324
+ }
325
+ exports.Archives = Archives;
@@ -0,0 +1 @@
1
+ export * from "./requests";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests"), exports);
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * name: "name"
8
+ * }
9
+ */
10
+ export interface ArchiveCreateRequest {
11
+ name: string;
12
+ description?: string;
13
+ }
@@ -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 });
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {}
7
+ */
8
+ export interface ArchiveUpdateRequest {
9
+ name?: string;
10
+ description?: string;
11
+ }
@@ -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 });
@@ -0,0 +1,34 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Letta from "../../../../index";
5
+ /**
6
+ * @example
7
+ * {}
8
+ */
9
+ export interface ListArchivesRequest {
10
+ /**
11
+ * Archive ID cursor for pagination. Returns archives that come before this archive ID in the specified sort order
12
+ */
13
+ before?: string;
14
+ /**
15
+ * Archive ID cursor for pagination. Returns archives that come after this archive ID in the specified sort order
16
+ */
17
+ after?: string;
18
+ /**
19
+ * Maximum number of archives to return
20
+ */
21
+ limit?: number;
22
+ /**
23
+ * Sort order for archives by creation time. 'asc' for oldest first, 'desc' for newest first
24
+ */
25
+ order?: Letta.ListArchivesRequestOrder;
26
+ /**
27
+ * Filter by archive name (exact match)
28
+ */
29
+ name?: string;
30
+ /**
31
+ * Only archives attached to this agent ID
32
+ */
33
+ agentId?: string;
34
+ }
@@ -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 });
@@ -0,0 +1,3 @@
1
+ export { type ListArchivesRequest } from "./ListArchivesRequest";
2
+ export { type ArchiveCreateRequest } from "./ArchiveCreateRequest";
3
+ export { type ArchiveUpdateRequest } from "./ArchiveUpdateRequest";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export * from "./types";
2
+ export * from "./client";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./types"), exports);
18
+ __exportStar(require("./client"), exports);
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * Sort order for archives by creation time. 'asc' for oldest first, 'desc' for newest first
6
+ */
7
+ export type ListArchivesRequestOrder = "asc" | "desc";
8
+ export declare const ListArchivesRequestOrder: {
9
+ readonly Asc: "asc";
10
+ readonly Desc: "desc";
11
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ListArchivesRequestOrder = void 0;
7
+ exports.ListArchivesRequestOrder = {
8
+ Asc: "asc",
9
+ Desc: "desc",
10
+ };
@@ -0,0 +1 @@
1
+ export * from "./ListArchivesRequestOrder";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./ListArchivesRequestOrder"), exports);
@@ -105,7 +105,7 @@ class Batches {
105
105
  method: "GET",
106
106
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
107
107
  ? yield core.Supplier.get(this._options.project)
108
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68655", "User-Agent": "@letta-ai/letta-client/0.0.68655", "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),
108
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68657", "User-Agent": "@letta-ai/letta-client/0.0.68657", "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),
109
109
  contentType: "application/json",
110
110
  queryParameters: _queryParams,
111
111
  requestType: "json",
@@ -196,7 +196,7 @@ class Batches {
196
196
  method: "POST",
197
197
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
198
198
  ? yield core.Supplier.get(this._options.project)
199
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68655", "User-Agent": "@letta-ai/letta-client/0.0.68655", "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),
199
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68657", "User-Agent": "@letta-ai/letta-client/0.0.68657", "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),
200
200
  contentType: "application/json",
201
201
  requestType: "json",
202
202
  body: serializers.CreateBatch.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -273,7 +273,7 @@ class Batches {
273
273
  method: "GET",
274
274
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
275
275
  ? yield core.Supplier.get(this._options.project)
276
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68655", "User-Agent": "@letta-ai/letta-client/0.0.68655", "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),
276
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68657", "User-Agent": "@letta-ai/letta-client/0.0.68657", "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),
277
277
  contentType: "application/json",
278
278
  requestType: "json",
279
279
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -349,7 +349,7 @@ class Batches {
349
349
  method: "PATCH",
350
350
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
351
351
  ? yield core.Supplier.get(this._options.project)
352
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68655", "User-Agent": "@letta-ai/letta-client/0.0.68655", "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),
352
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68657", "User-Agent": "@letta-ai/letta-client/0.0.68657", "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),
353
353
  contentType: "application/json",
354
354
  requestType: "json",
355
355
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -104,7 +104,7 @@ class Messages {
104
104
  method: "GET",
105
105
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
106
106
  ? yield core.Supplier.get(this._options.project)
107
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68655", "User-Agent": "@letta-ai/letta-client/0.0.68655", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
107
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68657", "User-Agent": "@letta-ai/letta-client/0.0.68657", "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),
108
108
  contentType: "application/json",
109
109
  queryParameters: _queryParams,
110
110
  requestType: "json",