@letta-ai/letta-client 0.0.68656 → 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 (229) 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/resources/blocks/client/Client.js +5 -5
  6. package/api/resources/agents/resources/context/client/Client.js +1 -1
  7. package/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  8. package/api/resources/agents/resources/files/client/Client.js +4 -4
  9. package/api/resources/agents/resources/folders/client/Client.js +3 -3
  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 +10 -10
  13. package/api/resources/agents/resources/passages/client/Client.js +5 -5
  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 +4 -4
  17. package/api/resources/archives/client/Client.d.ts +78 -0
  18. package/api/resources/archives/client/Client.js +325 -0
  19. package/api/resources/archives/client/index.d.ts +1 -0
  20. package/api/resources/archives/client/index.js +17 -0
  21. package/api/resources/archives/client/requests/ArchiveCreateRequest.d.ts +13 -0
  22. package/api/resources/archives/client/requests/ArchiveCreateRequest.js +5 -0
  23. package/api/resources/archives/client/requests/ArchiveUpdateRequest.d.ts +11 -0
  24. package/api/resources/archives/client/requests/ArchiveUpdateRequest.js +5 -0
  25. package/api/resources/archives/client/requests/ListArchivesRequest.d.ts +34 -0
  26. package/api/resources/archives/client/requests/ListArchivesRequest.js +5 -0
  27. package/api/resources/archives/client/requests/index.d.ts +3 -0
  28. package/api/resources/archives/client/requests/index.js +2 -0
  29. package/api/resources/archives/index.d.ts +2 -0
  30. package/api/resources/archives/index.js +18 -0
  31. package/api/resources/archives/types/ListArchivesRequestOrder.d.ts +11 -0
  32. package/api/resources/archives/types/ListArchivesRequestOrder.js +10 -0
  33. package/api/resources/archives/types/index.d.ts +1 -0
  34. package/api/resources/archives/types/index.js +17 -0
  35. package/api/resources/batches/client/Client.js +4 -4
  36. package/api/resources/batches/resources/messages/client/Client.js +1 -1
  37. package/api/resources/blocks/client/Client.js +6 -6
  38. package/api/resources/blocks/resources/agents/client/Client.js +1 -1
  39. package/api/resources/clientSideAccessTokens/client/Client.js +3 -3
  40. package/api/resources/folders/client/Client.js +8 -8
  41. package/api/resources/folders/resources/agents/client/Client.js +1 -1
  42. package/api/resources/folders/resources/files/client/Client.js +3 -3
  43. package/api/resources/folders/resources/passages/client/Client.js +1 -1
  44. package/api/resources/groups/client/Client.js +6 -6
  45. package/api/resources/groups/resources/messages/client/Client.js +5 -5
  46. package/api/resources/health/client/Client.js +1 -1
  47. package/api/resources/identities/client/Client.js +7 -7
  48. package/api/resources/identities/resources/agents/client/Client.js +1 -1
  49. package/api/resources/identities/resources/blocks/client/Client.js +1 -1
  50. package/api/resources/identities/resources/properties/client/Client.js +1 -1
  51. package/api/resources/index.d.ts +3 -0
  52. package/api/resources/index.js +4 -1
  53. package/api/resources/jobs/client/Client.d.ts +0 -1
  54. package/api/resources/jobs/client/Client.js +9 -7
  55. package/api/resources/jobs/client/requests/JobsListRequest.d.ts +4 -0
  56. package/api/resources/models/client/Client.js +2 -2
  57. package/api/resources/models/resources/embeddings/client/Client.js +1 -1
  58. package/api/resources/projects/client/Client.js +1 -1
  59. package/api/resources/providers/client/Client.js +6 -6
  60. package/api/resources/runs/client/Client.js +15 -7
  61. package/api/resources/runs/client/requests/RunsListRequest.d.ts +9 -0
  62. package/api/resources/runs/resources/messages/client/Client.js +1 -1
  63. package/api/resources/runs/resources/steps/client/Client.js +1 -1
  64. package/api/resources/runs/resources/usage/client/Client.js +1 -1
  65. package/api/resources/sources/client/Client.js +10 -10
  66. package/api/resources/sources/resources/files/client/Client.js +3 -3
  67. package/api/resources/sources/resources/passages/client/Client.js +1 -1
  68. package/api/resources/steps/client/Client.js +2 -2
  69. package/api/resources/steps/resources/feedback/client/Client.js +1 -1
  70. package/api/resources/steps/resources/metrics/client/Client.js +1 -1
  71. package/api/resources/steps/resources/trace/client/Client.js +1 -1
  72. package/api/resources/tags/client/Client.js +1 -1
  73. package/api/resources/telemetry/client/Client.js +1 -1
  74. package/api/resources/templates/client/Client.js +9 -9
  75. package/api/resources/templates/resources/agents/client/Client.js +1 -1
  76. package/api/resources/tools/client/Client.js +20 -20
  77. package/api/resources/voice/client/Client.js +1 -1
  78. package/api/types/Archive.d.ts +35 -0
  79. package/api/types/Archive.js +5 -0
  80. package/api/types/BatchJob.d.ts +2 -0
  81. package/api/types/Job.d.ts +2 -0
  82. package/api/types/Run.d.ts +2 -0
  83. package/api/types/index.d.ts +1 -0
  84. package/api/types/index.js +1 -0
  85. package/dist/Client.d.ts +3 -0
  86. package/dist/Client.js +45 -40
  87. package/dist/api/resources/agents/client/Client.js +9 -9
  88. package/dist/api/resources/agents/resources/blocks/client/Client.js +5 -5
  89. package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
  90. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  91. package/dist/api/resources/agents/resources/files/client/Client.js +4 -4
  92. package/dist/api/resources/agents/resources/folders/client/Client.js +3 -3
  93. package/dist/api/resources/agents/resources/groups/client/Client.js +1 -1
  94. package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  95. package/dist/api/resources/agents/resources/messages/client/Client.js +10 -10
  96. package/dist/api/resources/agents/resources/passages/client/Client.js +5 -5
  97. package/dist/api/resources/agents/resources/sources/client/Client.js +3 -3
  98. package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
  99. package/dist/api/resources/agents/resources/tools/client/Client.js +4 -4
  100. package/dist/api/resources/archives/client/Client.d.ts +78 -0
  101. package/dist/api/resources/archives/client/Client.js +325 -0
  102. package/dist/api/resources/archives/client/index.d.ts +1 -0
  103. package/dist/api/resources/archives/client/index.js +17 -0
  104. package/dist/api/resources/archives/client/requests/ArchiveCreateRequest.d.ts +13 -0
  105. package/dist/api/resources/archives/client/requests/ArchiveCreateRequest.js +5 -0
  106. package/dist/api/resources/archives/client/requests/ArchiveUpdateRequest.d.ts +11 -0
  107. package/dist/api/resources/archives/client/requests/ArchiveUpdateRequest.js +5 -0
  108. package/dist/api/resources/archives/client/requests/ListArchivesRequest.d.ts +34 -0
  109. package/dist/api/resources/archives/client/requests/ListArchivesRequest.js +5 -0
  110. package/dist/api/resources/archives/client/requests/index.d.ts +3 -0
  111. package/dist/api/resources/archives/client/requests/index.js +2 -0
  112. package/dist/api/resources/archives/index.d.ts +2 -0
  113. package/dist/api/resources/archives/index.js +18 -0
  114. package/dist/api/resources/archives/types/ListArchivesRequestOrder.d.ts +11 -0
  115. package/dist/api/resources/archives/types/ListArchivesRequestOrder.js +10 -0
  116. package/dist/api/resources/archives/types/index.d.ts +1 -0
  117. package/dist/api/resources/archives/types/index.js +17 -0
  118. package/dist/api/resources/batches/client/Client.js +4 -4
  119. package/dist/api/resources/batches/resources/messages/client/Client.js +1 -1
  120. package/dist/api/resources/blocks/client/Client.js +6 -6
  121. package/dist/api/resources/blocks/resources/agents/client/Client.js +1 -1
  122. package/dist/api/resources/clientSideAccessTokens/client/Client.js +3 -3
  123. package/dist/api/resources/folders/client/Client.js +8 -8
  124. package/dist/api/resources/folders/resources/agents/client/Client.js +1 -1
  125. package/dist/api/resources/folders/resources/files/client/Client.js +3 -3
  126. package/dist/api/resources/folders/resources/passages/client/Client.js +1 -1
  127. package/dist/api/resources/groups/client/Client.js +6 -6
  128. package/dist/api/resources/groups/resources/messages/client/Client.js +5 -5
  129. package/dist/api/resources/health/client/Client.js +1 -1
  130. package/dist/api/resources/identities/client/Client.js +7 -7
  131. package/dist/api/resources/identities/resources/agents/client/Client.js +1 -1
  132. package/dist/api/resources/identities/resources/blocks/client/Client.js +1 -1
  133. package/dist/api/resources/identities/resources/properties/client/Client.js +1 -1
  134. package/dist/api/resources/index.d.ts +3 -0
  135. package/dist/api/resources/index.js +4 -1
  136. package/dist/api/resources/jobs/client/Client.d.ts +0 -1
  137. package/dist/api/resources/jobs/client/Client.js +9 -7
  138. package/dist/api/resources/jobs/client/requests/JobsListRequest.d.ts +4 -0
  139. package/dist/api/resources/models/client/Client.js +2 -2
  140. package/dist/api/resources/models/resources/embeddings/client/Client.js +1 -1
  141. package/dist/api/resources/projects/client/Client.js +1 -1
  142. package/dist/api/resources/providers/client/Client.js +6 -6
  143. package/dist/api/resources/runs/client/Client.js +15 -7
  144. package/dist/api/resources/runs/client/requests/RunsListRequest.d.ts +9 -0
  145. package/dist/api/resources/runs/resources/messages/client/Client.js +1 -1
  146. package/dist/api/resources/runs/resources/steps/client/Client.js +1 -1
  147. package/dist/api/resources/runs/resources/usage/client/Client.js +1 -1
  148. package/dist/api/resources/sources/client/Client.js +10 -10
  149. package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
  150. package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
  151. package/dist/api/resources/steps/client/Client.js +2 -2
  152. package/dist/api/resources/steps/resources/feedback/client/Client.js +1 -1
  153. package/dist/api/resources/steps/resources/metrics/client/Client.js +1 -1
  154. package/dist/api/resources/steps/resources/trace/client/Client.js +1 -1
  155. package/dist/api/resources/tags/client/Client.js +1 -1
  156. package/dist/api/resources/telemetry/client/Client.js +1 -1
  157. package/dist/api/resources/templates/client/Client.js +9 -9
  158. package/dist/api/resources/templates/resources/agents/client/Client.js +1 -1
  159. package/dist/api/resources/tools/client/Client.js +20 -20
  160. package/dist/api/resources/voice/client/Client.js +1 -1
  161. package/dist/api/types/Archive.d.ts +35 -0
  162. package/dist/api/types/Archive.js +5 -0
  163. package/dist/api/types/BatchJob.d.ts +2 -0
  164. package/dist/api/types/Job.d.ts +2 -0
  165. package/dist/api/types/Run.d.ts +2 -0
  166. package/dist/api/types/index.d.ts +1 -0
  167. package/dist/api/types/index.js +1 -0
  168. package/dist/serialization/resources/archives/client/index.d.ts +2 -0
  169. package/dist/serialization/resources/archives/client/index.js +41 -0
  170. package/dist/serialization/resources/archives/client/listArchives.d.ts +11 -0
  171. package/dist/serialization/resources/archives/client/listArchives.js +42 -0
  172. package/dist/serialization/resources/archives/client/requests/ArchiveCreateRequest.d.ts +13 -0
  173. package/dist/serialization/resources/archives/client/requests/ArchiveCreateRequest.js +44 -0
  174. package/dist/serialization/resources/archives/client/requests/ArchiveUpdateRequest.d.ts +13 -0
  175. package/dist/serialization/resources/archives/client/requests/ArchiveUpdateRequest.js +44 -0
  176. package/dist/serialization/resources/archives/client/requests/index.d.ts +2 -0
  177. package/dist/serialization/resources/archives/client/requests/index.js +7 -0
  178. package/dist/serialization/resources/archives/index.d.ts +2 -0
  179. package/dist/serialization/resources/archives/index.js +18 -0
  180. package/dist/serialization/resources/archives/types/ListArchivesRequestOrder.d.ts +10 -0
  181. package/dist/serialization/resources/archives/types/ListArchivesRequestOrder.js +41 -0
  182. package/dist/serialization/resources/archives/types/index.d.ts +1 -0
  183. package/dist/serialization/resources/archives/types/index.js +17 -0
  184. package/dist/serialization/resources/index.d.ts +3 -0
  185. package/dist/serialization/resources/index.js +4 -1
  186. package/dist/serialization/types/Archive.d.ts +21 -0
  187. package/dist/serialization/types/Archive.js +52 -0
  188. package/dist/serialization/types/BatchJob.d.ts +2 -0
  189. package/dist/serialization/types/BatchJob.js +2 -0
  190. package/dist/serialization/types/Job.d.ts +2 -0
  191. package/dist/serialization/types/Job.js +2 -0
  192. package/dist/serialization/types/Run.d.ts +2 -0
  193. package/dist/serialization/types/Run.js +2 -0
  194. package/dist/serialization/types/index.d.ts +1 -0
  195. package/dist/serialization/types/index.js +1 -0
  196. package/dist/version.d.ts +1 -1
  197. package/dist/version.js +1 -1
  198. package/package.json +1 -1
  199. package/reference.md +201 -1
  200. package/serialization/resources/archives/client/index.d.ts +2 -0
  201. package/serialization/resources/archives/client/index.js +41 -0
  202. package/serialization/resources/archives/client/listArchives.d.ts +11 -0
  203. package/serialization/resources/archives/client/listArchives.js +42 -0
  204. package/serialization/resources/archives/client/requests/ArchiveCreateRequest.d.ts +13 -0
  205. package/serialization/resources/archives/client/requests/ArchiveCreateRequest.js +44 -0
  206. package/serialization/resources/archives/client/requests/ArchiveUpdateRequest.d.ts +13 -0
  207. package/serialization/resources/archives/client/requests/ArchiveUpdateRequest.js +44 -0
  208. package/serialization/resources/archives/client/requests/index.d.ts +2 -0
  209. package/serialization/resources/archives/client/requests/index.js +7 -0
  210. package/serialization/resources/archives/index.d.ts +2 -0
  211. package/serialization/resources/archives/index.js +18 -0
  212. package/serialization/resources/archives/types/ListArchivesRequestOrder.d.ts +10 -0
  213. package/serialization/resources/archives/types/ListArchivesRequestOrder.js +41 -0
  214. package/serialization/resources/archives/types/index.d.ts +1 -0
  215. package/serialization/resources/archives/types/index.js +17 -0
  216. package/serialization/resources/index.d.ts +3 -0
  217. package/serialization/resources/index.js +4 -1
  218. package/serialization/types/Archive.d.ts +21 -0
  219. package/serialization/types/Archive.js +52 -0
  220. package/serialization/types/BatchJob.d.ts +2 -0
  221. package/serialization/types/BatchJob.js +2 -0
  222. package/serialization/types/Job.d.ts +2 -0
  223. package/serialization/types/Job.js +2 -0
  224. package/serialization/types/Run.d.ts +2 -0
  225. package/serialization/types/Run.js +2 -0
  226. package/serialization/types/index.d.ts +1 -0
  227. package/serialization/types/index.js +1 -0
  228. package/version.d.ts +1 -1
  229. package/version.js +1 -1
@@ -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.68656", "User-Agent": "@letta-ai/letta-client/0.0.68656", "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.68656", "User-Agent": "@letta-ai/letta-client/0.0.68656", "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.68656", "User-Agent": "@letta-ai/letta-client/0.0.68656", "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.68656", "User-Agent": "@letta-ai/letta-client/0.0.68656", "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.68656", "User-Agent": "@letta-ai/letta-client/0.0.68656", "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",
@@ -149,7 +149,7 @@ class Blocks {
149
149
  method: "GET",
150
150
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
151
151
  ? yield core.Supplier.get(this._options.project)
152
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68656", "User-Agent": "@letta-ai/letta-client/0.0.68656", "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
+ : 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),
153
153
  contentType: "application/json",
154
154
  queryParameters: _queryParams,
155
155
  requestType: "json",
@@ -227,7 +227,7 @@ class Blocks {
227
227
  method: "POST",
228
228
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
229
229
  ? yield core.Supplier.get(this._options.project)
230
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68656", "User-Agent": "@letta-ai/letta-client/0.0.68656", "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),
230
+ : 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),
231
231
  contentType: "application/json",
232
232
  requestType: "json",
233
233
  body: serializers.CreateBlock.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -303,7 +303,7 @@ class Blocks {
303
303
  method: "GET",
304
304
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
305
305
  ? yield core.Supplier.get(this._options.project)
306
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68656", "User-Agent": "@letta-ai/letta-client/0.0.68656", "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),
306
+ : 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),
307
307
  contentType: "application/json",
308
308
  requestType: "json",
309
309
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -377,7 +377,7 @@ class Blocks {
377
377
  method: "GET",
378
378
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
379
379
  ? yield core.Supplier.get(this._options.project)
380
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68656", "User-Agent": "@letta-ai/letta-client/0.0.68656", "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),
380
+ : 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),
381
381
  contentType: "application/json",
382
382
  requestType: "json",
383
383
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -451,7 +451,7 @@ class Blocks {
451
451
  method: "DELETE",
452
452
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
453
453
  ? yield core.Supplier.get(this._options.project)
454
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68656", "User-Agent": "@letta-ai/letta-client/0.0.68656", "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),
454
+ : 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),
455
455
  contentType: "application/json",
456
456
  requestType: "json",
457
457
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -517,7 +517,7 @@ class Blocks {
517
517
  method: "PATCH",
518
518
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
519
519
  ? yield core.Supplier.get(this._options.project)
520
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68656", "User-Agent": "@letta-ai/letta-client/0.0.68656", "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),
520
+ : 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),
521
521
  contentType: "application/json",
522
522
  requestType: "json",
523
523
  body: serializers.BlockUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -110,7 +110,7 @@ class Agents {
110
110
  method: "GET",
111
111
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
112
112
  ? yield core.Supplier.get(this._options.project)
113
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68656", "User-Agent": "@letta-ai/letta-client/0.0.68656", "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
+ : 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),
114
114
  contentType: "application/json",
115
115
  queryParameters: _queryParams,
116
116
  requestType: "json",