@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
@@ -79,7 +79,7 @@ class Properties {
79
79
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
80
80
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/identities/${encodeURIComponent(identityId)}/properties`),
81
81
  method: "PUT",
82
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.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),
82
+ 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),
83
83
  contentType: "application/json",
84
84
  requestType: "json",
85
85
  body: serializers.identities.properties.upsert.Request.jsonOrThrow(request, {
@@ -81,7 +81,7 @@ class Jobs {
81
81
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
82
82
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/jobs/"),
83
83
  method: "GET",
84
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.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),
84
+ 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),
85
85
  contentType: "application/json",
86
86
  queryParameters: _queryParams,
87
87
  requestType: "json",
@@ -146,7 +146,7 @@ class Jobs {
146
146
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
147
147
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/jobs/active"),
148
148
  method: "GET",
149
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.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),
149
+ 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),
150
150
  contentType: "application/json",
151
151
  requestType: "json",
152
152
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -211,7 +211,7 @@ class Jobs {
211
211
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
212
212
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/jobs/${encodeURIComponent(jobId)}`),
213
213
  method: "GET",
214
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.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),
214
+ 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
215
  contentType: "application/json",
216
216
  requestType: "json",
217
217
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -276,7 +276,7 @@ class Jobs {
276
276
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
277
277
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/jobs/${encodeURIComponent(jobId)}`),
278
278
  method: "DELETE",
279
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.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),
279
+ 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),
280
280
  contentType: "application/json",
281
281
  requestType: "json",
282
282
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -70,7 +70,7 @@ class Models {
70
70
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
71
71
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/models/"),
72
72
  method: "GET",
73
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.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),
73
+ 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),
74
74
  contentType: "application/json",
75
75
  requestType: "json",
76
76
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -84,7 +84,7 @@ class Projects {
84
84
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
85
85
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/projects"),
86
86
  method: "GET",
87
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.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),
87
+ 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),
88
88
  contentType: "application/json",
89
89
  queryParameters: _queryParams,
90
90
  requestType: "json",
@@ -84,7 +84,7 @@ class Providers {
84
84
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
85
85
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/providers/"),
86
86
  method: "GET",
87
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.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),
87
+ 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),
88
88
  contentType: "application/json",
89
89
  queryParameters: _queryParams,
90
90
  requestType: "json",
@@ -153,7 +153,7 @@ class Providers {
153
153
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
154
154
  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/providers/"),
155
155
  method: "POST",
156
- 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),
156
+ 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),
157
157
  contentType: "application/json",
158
158
  requestType: "json",
159
159
  body: serializers.ProviderCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -219,7 +219,7 @@ class Providers {
219
219
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
220
220
  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/providers/${encodeURIComponent(providerId)}`),
221
221
  method: "DELETE",
222
- 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),
222
+ 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),
223
223
  contentType: "application/json",
224
224
  requestType: "json",
225
225
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -281,7 +281,7 @@ class Providers {
281
281
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
282
282
  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/providers/${encodeURIComponent(providerId)}`),
283
283
  method: "PATCH",
284
- 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),
284
+ 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),
285
285
  contentType: "application/json",
286
286
  requestType: "json",
287
287
  body: serializers.ProviderUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -101,7 +101,7 @@ class Runs {
101
101
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
102
102
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/runs/"),
103
103
  method: "GET",
104
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.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),
104
+ 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),
105
105
  contentType: "application/json",
106
106
  queryParameters: _queryParams,
107
107
  requestType: "json",
@@ -177,7 +177,7 @@ class Runs {
177
177
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
178
178
  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/runs/active"),
179
179
  method: "GET",
180
- 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),
180
+ 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),
181
181
  contentType: "application/json",
182
182
  queryParameters: _queryParams,
183
183
  requestType: "json",
@@ -243,7 +243,7 @@ class Runs {
243
243
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
244
244
  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/runs/${encodeURIComponent(runId)}`),
245
245
  method: "GET",
246
- 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),
246
+ 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),
247
247
  contentType: "application/json",
248
248
  requestType: "json",
249
249
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -308,7 +308,7 @@ class Runs {
308
308
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
309
309
  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/runs/${encodeURIComponent(runId)}`),
310
310
  method: "DELETE",
311
- 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),
311
+ 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),
312
312
  contentType: "application/json",
313
313
  requestType: "json",
314
314
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -107,7 +107,7 @@ class Messages {
107
107
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
108
108
  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/runs/${encodeURIComponent(runId)}/messages`),
109
109
  method: "GET",
110
- 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),
110
+ 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),
111
111
  contentType: "application/json",
112
112
  queryParameters: _queryParams,
113
113
  requestType: "json",
@@ -101,7 +101,7 @@ class Steps {
101
101
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
102
102
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/runs/${encodeURIComponent(runId)}/steps`),
103
103
  method: "GET",
104
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.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),
104
+ 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),
105
105
  contentType: "application/json",
106
106
  queryParameters: _queryParams,
107
107
  requestType: "json",
@@ -76,7 +76,7 @@ class Usage {
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/runs/${encodeURIComponent(runId)}/usage`),
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,
@@ -32,6 +32,17 @@ export declare class Sources {
32
32
  constructor(_options?: Sources.Options);
33
33
  get files(): Files;
34
34
  get passages(): Passages;
35
+ /**
36
+ * Count all data sources created by a user.
37
+ *
38
+ * @param {Sources.RequestOptions} requestOptions - Request-specific configuration.
39
+ *
40
+ * @throws {@link Letta.UnprocessableEntityError}
41
+ *
42
+ * @example
43
+ * await client.sources.count()
44
+ */
45
+ count(requestOptions?: Sources.RequestOptions): Promise<number>;
35
46
  /**
36
47
  * Get all sources
37
48
  *
@@ -106,17 +117,6 @@ export declare class Sources {
106
117
  * })
107
118
  */
108
119
  create(request: Letta.SourceCreate, requestOptions?: Sources.RequestOptions): Promise<Letta.Source>;
109
- /**
110
- * Count all data sources created by a user.
111
- *
112
- * @param {Sources.RequestOptions} requestOptions - Request-specific configuration.
113
- *
114
- * @throws {@link Letta.UnprocessableEntityError}
115
- *
116
- * @example
117
- * await client.sources.count()
118
- */
119
- count(requestOptions?: Sources.RequestOptions): Promise<number>;
120
120
  protected _getCustomAuthorizationHeaders(): Promise<{
121
121
  Authorization: string;
122
122
  }>;
@@ -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,