@letta-ai/letta-client 0.1.104 → 0.1.105

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 (100) hide show
  1. package/api/resources/agents/client/Client.js +9 -9
  2. package/api/resources/agents/resources/blocks/client/Client.js +5 -5
  3. package/api/resources/agents/resources/context/client/Client.js +1 -1
  4. package/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  5. package/api/resources/agents/resources/groups/client/Client.js +1 -1
  6. package/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  7. package/api/resources/agents/resources/messages/client/Client.js +6 -6
  8. package/api/resources/agents/resources/passages/client/Client.js +4 -4
  9. package/api/resources/agents/resources/sources/client/Client.js +3 -3
  10. package/api/resources/agents/resources/templates/client/Client.js +3 -3
  11. package/api/resources/agents/resources/tools/client/Client.js +3 -3
  12. package/api/resources/batches/client/Client.js +4 -4
  13. package/api/resources/blocks/client/Client.js +5 -5
  14. package/api/resources/blocks/resources/agents/client/Client.js +1 -1
  15. package/api/resources/clientSideAccessTokens/client/Client.js +2 -2
  16. package/api/resources/embeddings/client/Client.js +1 -1
  17. package/api/resources/groups/client/Client.js +5 -5
  18. package/api/resources/groups/resources/messages/client/Client.js +5 -5
  19. package/api/resources/health/client/Client.js +1 -1
  20. package/api/resources/identities/client/Client.js +7 -7
  21. package/api/resources/identities/resources/properties/client/Client.js +1 -1
  22. package/api/resources/jobs/client/Client.js +4 -4
  23. package/api/resources/models/client/Client.js +1 -1
  24. package/api/resources/projects/client/Client.js +1 -1
  25. package/api/resources/providers/client/Client.js +4 -4
  26. package/api/resources/runs/client/Client.js +4 -4
  27. package/api/resources/runs/resources/messages/client/Client.js +1 -1
  28. package/api/resources/runs/resources/steps/client/Client.js +1 -1
  29. package/api/resources/runs/resources/usage/client/Client.js +1 -1
  30. package/api/resources/sources/client/Client.d.ts +11 -11
  31. package/api/resources/sources/client/Client.js +67 -67
  32. package/api/resources/sources/resources/files/client/Client.js +3 -3
  33. package/api/resources/sources/resources/passages/client/Client.js +1 -1
  34. package/api/resources/steps/client/Client.js +3 -3
  35. package/api/resources/tags/client/Client.js +1 -1
  36. package/api/resources/templates/client/Client.js +1 -1
  37. package/api/resources/templates/resources/agents/client/Client.js +1 -1
  38. package/api/resources/tools/client/Client.d.ts +12 -11
  39. package/api/resources/tools/client/Client.js +63 -56
  40. package/api/resources/tools/client/requests/ToolsCountRequest.d.ts +13 -0
  41. package/api/resources/tools/client/requests/ToolsCountRequest.js +5 -0
  42. package/api/resources/tools/client/requests/index.d.ts +1 -0
  43. package/api/resources/voice/client/Client.js +1 -1
  44. package/dist/api/resources/agents/client/Client.js +9 -9
  45. package/dist/api/resources/agents/resources/blocks/client/Client.js +5 -5
  46. package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
  47. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  48. package/dist/api/resources/agents/resources/groups/client/Client.js +1 -1
  49. package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  50. package/dist/api/resources/agents/resources/messages/client/Client.js +6 -6
  51. package/dist/api/resources/agents/resources/passages/client/Client.js +4 -4
  52. package/dist/api/resources/agents/resources/sources/client/Client.js +3 -3
  53. package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
  54. package/dist/api/resources/agents/resources/tools/client/Client.js +3 -3
  55. package/dist/api/resources/batches/client/Client.js +4 -4
  56. package/dist/api/resources/blocks/client/Client.js +5 -5
  57. package/dist/api/resources/blocks/resources/agents/client/Client.js +1 -1
  58. package/dist/api/resources/clientSideAccessTokens/client/Client.js +2 -2
  59. package/dist/api/resources/embeddings/client/Client.js +1 -1
  60. package/dist/api/resources/groups/client/Client.js +5 -5
  61. package/dist/api/resources/groups/resources/messages/client/Client.js +5 -5
  62. package/dist/api/resources/health/client/Client.js +1 -1
  63. package/dist/api/resources/identities/client/Client.js +7 -7
  64. package/dist/api/resources/identities/resources/properties/client/Client.js +1 -1
  65. package/dist/api/resources/jobs/client/Client.js +4 -4
  66. package/dist/api/resources/models/client/Client.js +1 -1
  67. package/dist/api/resources/projects/client/Client.js +1 -1
  68. package/dist/api/resources/providers/client/Client.js +4 -4
  69. package/dist/api/resources/runs/client/Client.js +4 -4
  70. package/dist/api/resources/runs/resources/messages/client/Client.js +1 -1
  71. package/dist/api/resources/runs/resources/steps/client/Client.js +1 -1
  72. package/dist/api/resources/runs/resources/usage/client/Client.js +1 -1
  73. package/dist/api/resources/sources/client/Client.d.ts +11 -11
  74. package/dist/api/resources/sources/client/Client.js +67 -67
  75. package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
  76. package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
  77. package/dist/api/resources/steps/client/Client.js +3 -3
  78. package/dist/api/resources/tags/client/Client.js +1 -1
  79. package/dist/api/resources/templates/client/Client.js +1 -1
  80. package/dist/api/resources/templates/resources/agents/client/Client.js +1 -1
  81. package/dist/api/resources/tools/client/Client.d.ts +12 -11
  82. package/dist/api/resources/tools/client/Client.js +63 -56
  83. package/dist/api/resources/tools/client/requests/ToolsCountRequest.d.ts +13 -0
  84. package/dist/api/resources/tools/client/requests/ToolsCountRequest.js +5 -0
  85. package/dist/api/resources/tools/client/requests/index.d.ts +1 -0
  86. package/dist/api/resources/voice/client/Client.js +1 -1
  87. package/dist/serialization/resources/sources/client/index.d.ts +1 -1
  88. package/dist/serialization/resources/sources/client/index.js +2 -2
  89. package/dist/serialization/resources/tools/client/index.d.ts +1 -1
  90. package/dist/serialization/resources/tools/client/index.js +2 -2
  91. package/dist/version.d.ts +1 -1
  92. package/dist/version.js +1 -1
  93. package/package.json +1 -1
  94. package/reference.md +72 -64
  95. package/serialization/resources/sources/client/index.d.ts +1 -1
  96. package/serialization/resources/sources/client/index.js +2 -2
  97. package/serialization/resources/tools/client/index.d.ts +1 -1
  98. package/serialization/resources/tools/client/index.js +2 -2
  99. package/version.d.ts +1 -1
  100. package/version.js +1 -1
@@ -70,23 +70,22 @@ class Sources {
70
70
  return ((_a = this._passages) !== null && _a !== void 0 ? _a : (this._passages = new Client_2.Passages(this._options)));
71
71
  }
72
72
  /**
73
- * Get all sources
73
+ * Count all data sources created by a user.
74
74
  *
75
- * @param {string} sourceId
76
75
  * @param {Sources.RequestOptions} requestOptions - Request-specific configuration.
77
76
  *
78
77
  * @throws {@link Letta.UnprocessableEntityError}
79
78
  *
80
79
  * @example
81
- * await client.sources.retrieve("source_id")
80
+ * await client.sources.count()
82
81
  */
83
- retrieve(sourceId, requestOptions) {
82
+ count(requestOptions) {
84
83
  return __awaiter(this, void 0, void 0, function* () {
85
84
  var _a, _b, _c;
86
85
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
87
- 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/sources/${encodeURIComponent(sourceId)}`),
86
+ 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/sources/count"),
88
87
  method: "GET",
89
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.104", "User-Agent": "@letta-ai/letta-client/0.1.104", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
88
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.105", "User-Agent": "@letta-ai/letta-client/0.1.105", "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),
90
89
  contentType: "application/json",
91
90
  requestType: "json",
92
91
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -94,7 +93,7 @@ class Sources {
94
93
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
95
94
  });
96
95
  if (_response.ok) {
97
- return serializers.Source.parseOrThrow(_response.body, {
96
+ return serializers.sources.count.Response.parseOrThrow(_response.body, {
98
97
  unrecognizedObjectKeys: "passthrough",
99
98
  allowUnrecognizedUnionMembers: true,
100
99
  allowUnrecognizedEnumValues: true,
@@ -126,7 +125,7 @@ class Sources {
126
125
  body: _response.error.rawBody,
127
126
  });
128
127
  case "timeout":
129
- throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/sources/{source_id}.");
128
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/sources/count.");
130
129
  case "unknown":
131
130
  throw new errors.LettaError({
132
131
  message: _response.error.errorMessage,
@@ -135,7 +134,7 @@ class Sources {
135
134
  });
136
135
  }
137
136
  /**
138
- * Delete a data source.
137
+ * Get all sources
139
138
  *
140
139
  * @param {string} sourceId
141
140
  * @param {Sources.RequestOptions} requestOptions - Request-specific configuration.
@@ -143,15 +142,15 @@ class Sources {
143
142
  * @throws {@link Letta.UnprocessableEntityError}
144
143
  *
145
144
  * @example
146
- * await client.sources.delete("source_id")
145
+ * await client.sources.retrieve("source_id")
147
146
  */
148
- delete(sourceId, requestOptions) {
147
+ retrieve(sourceId, requestOptions) {
149
148
  return __awaiter(this, void 0, void 0, function* () {
150
149
  var _a, _b, _c;
151
150
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
152
151
  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/sources/${encodeURIComponent(sourceId)}`),
153
- method: "DELETE",
154
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.104", "User-Agent": "@letta-ai/letta-client/0.1.104", "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
+ method: "GET",
153
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.105", "User-Agent": "@letta-ai/letta-client/0.1.105", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
155
154
  contentType: "application/json",
156
155
  requestType: "json",
157
156
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -159,7 +158,13 @@ class Sources {
159
158
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
160
159
  });
161
160
  if (_response.ok) {
162
- return _response.body;
161
+ return serializers.Source.parseOrThrow(_response.body, {
162
+ unrecognizedObjectKeys: "passthrough",
163
+ allowUnrecognizedUnionMembers: true,
164
+ allowUnrecognizedEnumValues: true,
165
+ skipValidation: true,
166
+ breadcrumbsPrefix: ["response"],
167
+ });
163
168
  }
164
169
  if (_response.error.reason === "status-code") {
165
170
  switch (_response.error.statusCode) {
@@ -185,7 +190,7 @@ class Sources {
185
190
  body: _response.error.rawBody,
186
191
  });
187
192
  case "timeout":
188
- throw new errors.LettaTimeoutError("Timeout exceeded when calling DELETE /v1/sources/{source_id}.");
193
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/sources/{source_id}.");
189
194
  case "unknown":
190
195
  throw new errors.LettaError({
191
196
  message: _response.error.errorMessage,
@@ -194,39 +199,31 @@ class Sources {
194
199
  });
195
200
  }
196
201
  /**
197
- * Update the name or documentation of an existing data source.
202
+ * Delete a data source.
198
203
  *
199
204
  * @param {string} sourceId
200
- * @param {Letta.SourceUpdate} request
201
205
  * @param {Sources.RequestOptions} requestOptions - Request-specific configuration.
202
206
  *
203
207
  * @throws {@link Letta.UnprocessableEntityError}
204
208
  *
205
209
  * @example
206
- * await client.sources.modify("source_id")
210
+ * await client.sources.delete("source_id")
207
211
  */
208
- modify(sourceId_1) {
209
- return __awaiter(this, arguments, void 0, function* (sourceId, request = {}, requestOptions) {
212
+ delete(sourceId, requestOptions) {
213
+ return __awaiter(this, void 0, void 0, function* () {
210
214
  var _a, _b, _c;
211
215
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
212
216
  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/sources/${encodeURIComponent(sourceId)}`),
213
- method: "PATCH",
214
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.104", "User-Agent": "@letta-ai/letta-client/0.1.104", "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),
217
+ method: "DELETE",
218
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.105", "User-Agent": "@letta-ai/letta-client/0.1.105", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
215
219
  contentType: "application/json",
216
220
  requestType: "json",
217
- body: serializers.SourceUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
218
221
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
219
222
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
220
223
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
221
224
  });
222
225
  if (_response.ok) {
223
- return serializers.Source.parseOrThrow(_response.body, {
224
- unrecognizedObjectKeys: "passthrough",
225
- allowUnrecognizedUnionMembers: true,
226
- allowUnrecognizedEnumValues: true,
227
- skipValidation: true,
228
- breadcrumbsPrefix: ["response"],
229
- });
226
+ return _response.body;
230
227
  }
231
228
  if (_response.error.reason === "status-code") {
232
229
  switch (_response.error.statusCode) {
@@ -252,7 +249,7 @@ class Sources {
252
249
  body: _response.error.rawBody,
253
250
  });
254
251
  case "timeout":
255
- throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/sources/{source_id}.");
252
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling DELETE /v1/sources/{source_id}.");
256
253
  case "unknown":
257
254
  throw new errors.LettaError({
258
255
  message: _response.error.errorMessage,
@@ -261,31 +258,33 @@ class Sources {
261
258
  });
262
259
  }
263
260
  /**
264
- * Get a source by name
261
+ * Update the name or documentation of an existing data source.
265
262
  *
266
- * @param {string} sourceName
263
+ * @param {string} sourceId
264
+ * @param {Letta.SourceUpdate} request
267
265
  * @param {Sources.RequestOptions} requestOptions - Request-specific configuration.
268
266
  *
269
267
  * @throws {@link Letta.UnprocessableEntityError}
270
268
  *
271
269
  * @example
272
- * await client.sources.retrieveByName("source_name")
270
+ * await client.sources.modify("source_id")
273
271
  */
274
- retrieveByName(sourceName, requestOptions) {
275
- return __awaiter(this, void 0, void 0, function* () {
272
+ modify(sourceId_1) {
273
+ return __awaiter(this, arguments, void 0, function* (sourceId, request = {}, requestOptions) {
276
274
  var _a, _b, _c;
277
275
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
278
- 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/sources/name/${encodeURIComponent(sourceName)}`),
279
- method: "GET",
280
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.104", "User-Agent": "@letta-ai/letta-client/0.1.104", "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
+ 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/sources/${encodeURIComponent(sourceId)}`),
277
+ method: "PATCH",
278
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.105", "User-Agent": "@letta-ai/letta-client/0.1.105", "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),
281
279
  contentType: "application/json",
282
280
  requestType: "json",
281
+ body: serializers.SourceUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
283
282
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
284
283
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
285
284
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
286
285
  });
287
286
  if (_response.ok) {
288
- return serializers.sources.retrieveByName.Response.parseOrThrow(_response.body, {
287
+ return serializers.Source.parseOrThrow(_response.body, {
289
288
  unrecognizedObjectKeys: "passthrough",
290
289
  allowUnrecognizedUnionMembers: true,
291
290
  allowUnrecognizedEnumValues: true,
@@ -317,7 +316,7 @@ class Sources {
317
316
  body: _response.error.rawBody,
318
317
  });
319
318
  case "timeout":
320
- throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/sources/name/{source_name}.");
319
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/sources/{source_id}.");
321
320
  case "unknown":
322
321
  throw new errors.LettaError({
323
322
  message: _response.error.errorMessage,
@@ -326,22 +325,23 @@ class Sources {
326
325
  });
327
326
  }
328
327
  /**
329
- * List all data sources created by a user.
328
+ * Get a source by name
330
329
  *
330
+ * @param {string} sourceName
331
331
  * @param {Sources.RequestOptions} requestOptions - Request-specific configuration.
332
332
  *
333
333
  * @throws {@link Letta.UnprocessableEntityError}
334
334
  *
335
335
  * @example
336
- * await client.sources.list()
336
+ * await client.sources.retrieveByName("source_name")
337
337
  */
338
- list(requestOptions) {
338
+ retrieveByName(sourceName, requestOptions) {
339
339
  return __awaiter(this, void 0, void 0, function* () {
340
340
  var _a, _b, _c;
341
341
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
342
- 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/sources/"),
342
+ 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/sources/name/${encodeURIComponent(sourceName)}`),
343
343
  method: "GET",
344
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.104", "User-Agent": "@letta-ai/letta-client/0.1.104", "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),
344
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.105", "User-Agent": "@letta-ai/letta-client/0.1.105", "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),
345
345
  contentType: "application/json",
346
346
  requestType: "json",
347
347
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -349,7 +349,7 @@ class Sources {
349
349
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
350
350
  });
351
351
  if (_response.ok) {
352
- return serializers.sources.list.Response.parseOrThrow(_response.body, {
352
+ return serializers.sources.retrieveByName.Response.parseOrThrow(_response.body, {
353
353
  unrecognizedObjectKeys: "passthrough",
354
354
  allowUnrecognizedUnionMembers: true,
355
355
  allowUnrecognizedEnumValues: true,
@@ -381,7 +381,7 @@ class Sources {
381
381
  body: _response.error.rawBody,
382
382
  });
383
383
  case "timeout":
384
- throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/sources/.");
384
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/sources/name/{source_name}.");
385
385
  case "unknown":
386
386
  throw new errors.LettaError({
387
387
  message: _response.error.errorMessage,
@@ -390,34 +390,30 @@ class Sources {
390
390
  });
391
391
  }
392
392
  /**
393
- * Create a new data source.
393
+ * List all data sources created by a user.
394
394
  *
395
- * @param {Letta.SourceCreate} request
396
395
  * @param {Sources.RequestOptions} requestOptions - Request-specific configuration.
397
396
  *
398
397
  * @throws {@link Letta.UnprocessableEntityError}
399
398
  *
400
399
  * @example
401
- * await client.sources.create({
402
- * name: "name"
403
- * })
400
+ * await client.sources.list()
404
401
  */
405
- create(request, requestOptions) {
402
+ list(requestOptions) {
406
403
  return __awaiter(this, void 0, void 0, function* () {
407
404
  var _a, _b, _c;
408
405
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
409
406
  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/sources/"),
410
- method: "POST",
411
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.104", "User-Agent": "@letta-ai/letta-client/0.1.104", "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),
407
+ method: "GET",
408
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.105", "User-Agent": "@letta-ai/letta-client/0.1.105", "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),
412
409
  contentType: "application/json",
413
410
  requestType: "json",
414
- body: serializers.SourceCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
415
411
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
416
412
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
417
413
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
418
414
  });
419
415
  if (_response.ok) {
420
- return serializers.Source.parseOrThrow(_response.body, {
416
+ return serializers.sources.list.Response.parseOrThrow(_response.body, {
421
417
  unrecognizedObjectKeys: "passthrough",
422
418
  allowUnrecognizedUnionMembers: true,
423
419
  allowUnrecognizedEnumValues: true,
@@ -449,7 +445,7 @@ class Sources {
449
445
  body: _response.error.rawBody,
450
446
  });
451
447
  case "timeout":
452
- throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/sources/.");
448
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/sources/.");
453
449
  case "unknown":
454
450
  throw new errors.LettaError({
455
451
  message: _response.error.errorMessage,
@@ -458,30 +454,34 @@ class Sources {
458
454
  });
459
455
  }
460
456
  /**
461
- * Count all data sources created by a user.
457
+ * Create a new data source.
462
458
  *
459
+ * @param {Letta.SourceCreate} request
463
460
  * @param {Sources.RequestOptions} requestOptions - Request-specific configuration.
464
461
  *
465
462
  * @throws {@link Letta.UnprocessableEntityError}
466
463
  *
467
464
  * @example
468
- * await client.sources.count()
465
+ * await client.sources.create({
466
+ * name: "name"
467
+ * })
469
468
  */
470
- count(requestOptions) {
469
+ create(request, requestOptions) {
471
470
  return __awaiter(this, void 0, void 0, function* () {
472
471
  var _a, _b, _c;
473
472
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
474
- 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/sources/count"),
475
- method: "GET",
476
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.104", "User-Agent": "@letta-ai/letta-client/0.1.104", "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),
473
+ 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/sources/"),
474
+ method: "POST",
475
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.105", "User-Agent": "@letta-ai/letta-client/0.1.105", "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),
477
476
  contentType: "application/json",
478
477
  requestType: "json",
478
+ body: serializers.SourceCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
479
479
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
480
480
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
481
481
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
482
482
  });
483
483
  if (_response.ok) {
484
- return serializers.sources.count.Response.parseOrThrow(_response.body, {
484
+ return serializers.Source.parseOrThrow(_response.body, {
485
485
  unrecognizedObjectKeys: "passthrough",
486
486
  allowUnrecognizedUnionMembers: true,
487
487
  allowUnrecognizedEnumValues: true,
@@ -513,7 +513,7 @@ class Sources {
513
513
  body: _response.error.rawBody,
514
514
  });
515
515
  case "timeout":
516
- throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/sources/count.");
516
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/sources/.");
517
517
  case "unknown":
518
518
  throw new errors.LettaError({
519
519
  message: _response.error.errorMessage,
@@ -80,7 +80,7 @@ class Files {
80
80
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
81
81
  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/sources/${encodeURIComponent(sourceId)}/upload`),
82
82
  method: "POST",
83
- headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.104", "User-Agent": "@letta-ai/letta-client/0.1.104", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
83
+ headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.105", "User-Agent": "@letta-ai/letta-client/0.1.105", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
84
84
  requestType: "file",
85
85
  duplex: _maybeEncodedRequest.duplex,
86
86
  body: _maybeEncodedRequest.body,
@@ -155,7 +155,7 @@ class Files {
155
155
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
156
156
  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/sources/${encodeURIComponent(sourceId)}/files`),
157
157
  method: "GET",
158
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.104", "User-Agent": "@letta-ai/letta-client/0.1.104", "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),
158
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.105", "User-Agent": "@letta-ai/letta-client/0.1.105", "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),
159
159
  contentType: "application/json",
160
160
  queryParameters: _queryParams,
161
161
  requestType: "json",
@@ -222,7 +222,7 @@ class Files {
222
222
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
223
223
  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/sources/${encodeURIComponent(sourceId)}/${encodeURIComponent(fileId)}`),
224
224
  method: "DELETE",
225
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.104", "User-Agent": "@letta-ai/letta-client/0.1.104", "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),
225
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.105", "User-Agent": "@letta-ai/letta-client/0.1.105", "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),
226
226
  contentType: "application/json",
227
227
  requestType: "json",
228
228
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -76,7 +76,7 @@ class Passages {
76
76
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
77
77
  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/sources/${encodeURIComponent(sourceId)}/passages`),
78
78
  method: "GET",
79
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.104", "User-Agent": "@letta-ai/letta-client/0.1.104", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
79
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.105", "User-Agent": "@letta-ai/letta-client/0.1.105", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
80
80
  contentType: "application/json",
81
81
  requestType: "json",
82
82
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -103,7 +103,7 @@ class Steps {
103
103
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
104
104
  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/steps"),
105
105
  method: "GET",
106
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.104", "User-Agent": "@letta-ai/letta-client/0.1.104", "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),
106
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.105", "User-Agent": "@letta-ai/letta-client/0.1.105", "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
107
  contentType: "application/json",
108
108
  queryParameters: _queryParams,
109
109
  requestType: "json",
@@ -169,7 +169,7 @@ class Steps {
169
169
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
170
170
  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/steps/${encodeURIComponent(stepId)}`),
171
171
  method: "GET",
172
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.104", "User-Agent": "@letta-ai/letta-client/0.1.104", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
172
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.105", "User-Agent": "@letta-ai/letta-client/0.1.105", "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),
173
173
  contentType: "application/json",
174
174
  requestType: "json",
175
175
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -229,7 +229,7 @@ class Steps {
229
229
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
230
230
  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/steps/"),
231
231
  method: "GET",
232
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.104", "User-Agent": "@letta-ai/letta-client/0.1.104", "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),
232
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.105", "User-Agent": "@letta-ai/letta-client/0.1.105", "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),
233
233
  contentType: "application/json",
234
234
  requestType: "json",
235
235
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -87,7 +87,7 @@ class Tags {
87
87
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
88
88
  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/tags/"),
89
89
  method: "GET",
90
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.104", "User-Agent": "@letta-ai/letta-client/0.1.104", "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),
90
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.105", "User-Agent": "@letta-ai/letta-client/0.1.105", "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),
91
91
  contentType: "application/json",
92
92
  queryParameters: _queryParams,
93
93
  requestType: "json",
@@ -92,7 +92,7 @@ class Templates {
92
92
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
93
93
  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/templates"),
94
94
  method: "GET",
95
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.104", "User-Agent": "@letta-ai/letta-client/0.1.104", "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),
95
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.105", "User-Agent": "@letta-ai/letta-client/0.1.105", "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),
96
96
  contentType: "application/json",
97
97
  queryParameters: _queryParams,
98
98
  requestType: "json",
@@ -75,7 +75,7 @@ class Agents {
75
75
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
76
76
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/templates/${encodeURIComponent(project)}/${encodeURIComponent(templateVersion)}/agents`),
77
77
  method: "POST",
78
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.104", "User-Agent": "@letta-ai/letta-client/0.1.104", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
78
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.105", "User-Agent": "@letta-ai/letta-client/0.1.105", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
79
79
  contentType: "application/json",
80
80
  requestType: "json",
81
81
  body: serializers.templates.AgentsCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -63,6 +63,18 @@ export declare class Tools {
63
63
  * await client.tools.modify("tool_id")
64
64
  */
65
65
  modify(toolId: string, request?: Letta.ToolUpdate, requestOptions?: Tools.RequestOptions): Promise<Letta.Tool>;
66
+ /**
67
+ * Get a count of all tools available to agents belonging to the org of the user.
68
+ *
69
+ * @param {Letta.ToolsCountRequest} request
70
+ * @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
71
+ *
72
+ * @throws {@link Letta.UnprocessableEntityError}
73
+ *
74
+ * @example
75
+ * await client.tools.count()
76
+ */
77
+ count(request?: Letta.ToolsCountRequest, requestOptions?: Tools.RequestOptions): Promise<number>;
66
78
  /**
67
79
  * Get a list of all tools available to agents belonging to the org of the user
68
80
  *
@@ -103,17 +115,6 @@ export declare class Tools {
103
115
  * })
104
116
  */
105
117
  upsert(request: Letta.ToolCreate, requestOptions?: Tools.RequestOptions): Promise<Letta.Tool>;
106
- /**
107
- * Get a count of all tools available to agents belonging to the org of the user
108
- *
109
- * @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
110
- *
111
- * @throws {@link Letta.UnprocessableEntityError}
112
- *
113
- * @example
114
- * await client.tools.count()
115
- */
116
- count(requestOptions?: Tools.RequestOptions): Promise<number>;
117
118
  /**
118
119
  * Upsert base tools
119
120
  *