@letta-ai/letta-client 0.1.1 → 0.1.2

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 (114) hide show
  1. package/api/resources/agents/client/Client.d.ts +13 -1
  2. package/api/resources/agents/client/Client.js +79 -26
  3. package/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -0
  4. package/api/resources/agents/resources/archivalMemory/client/Client.js +8 -8
  5. package/api/resources/agents/resources/context/client/Client.js +2 -2
  6. package/api/resources/agents/resources/memory/client/Client.js +2 -2
  7. package/api/resources/agents/resources/memory/resources/messages/client/Client.js +2 -2
  8. package/api/resources/agents/resources/memoryBlocks/client/Client.js +4 -4
  9. package/api/resources/agents/resources/messages/client/Client.js +8 -8
  10. package/api/resources/agents/resources/recallMemory/client/Client.js +2 -2
  11. package/api/resources/agents/resources/sources/client/Client.js +2 -2
  12. package/api/resources/agents/resources/tools/client/Client.js +6 -6
  13. package/api/resources/agents/types/AgentsGetAgentVariablesResponse.d.ts +6 -0
  14. package/api/resources/agents/types/index.d.ts +1 -0
  15. package/api/resources/agents/types/index.js +1 -0
  16. package/api/resources/blocks/client/Client.js +14 -14
  17. package/api/resources/health/client/Client.js +2 -2
  18. package/api/resources/jobs/client/Client.js +8 -8
  19. package/api/resources/models/client/Client.js +4 -4
  20. package/api/resources/sources/client/Client.js +16 -16
  21. package/api/resources/sources/resources/files/client/Client.js +6 -6
  22. package/api/resources/sources/resources/passages/client/Client.js +2 -2
  23. package/api/resources/tools/client/Client.js +24 -24
  24. package/api/types/LettaResponse.d.ts +12 -62
  25. package/api/types/index.d.ts +0 -13
  26. package/api/types/index.js +0 -13
  27. package/dist/api/resources/agents/client/Client.d.ts +13 -1
  28. package/dist/api/resources/agents/client/Client.js +79 -26
  29. package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -0
  30. package/dist/api/resources/agents/resources/archivalMemory/client/Client.js +8 -8
  31. package/dist/api/resources/agents/resources/context/client/Client.js +2 -2
  32. package/dist/api/resources/agents/resources/memory/client/Client.js +2 -2
  33. package/dist/api/resources/agents/resources/memory/resources/messages/client/Client.js +2 -2
  34. package/dist/api/resources/agents/resources/memoryBlocks/client/Client.js +4 -4
  35. package/dist/api/resources/agents/resources/messages/client/Client.js +8 -8
  36. package/dist/api/resources/agents/resources/recallMemory/client/Client.js +2 -2
  37. package/dist/api/resources/agents/resources/sources/client/Client.js +2 -2
  38. package/dist/api/resources/agents/resources/tools/client/Client.js +6 -6
  39. package/dist/api/resources/agents/types/AgentsGetAgentVariablesResponse.d.ts +6 -0
  40. package/dist/api/resources/agents/types/index.d.ts +1 -0
  41. package/dist/api/resources/agents/types/index.js +1 -0
  42. package/dist/api/resources/blocks/client/Client.js +14 -14
  43. package/dist/api/resources/health/client/Client.js +2 -2
  44. package/dist/api/resources/jobs/client/Client.js +8 -8
  45. package/dist/api/resources/models/client/Client.js +4 -4
  46. package/dist/api/resources/sources/client/Client.js +16 -16
  47. package/dist/api/resources/sources/resources/files/client/Client.js +6 -6
  48. package/dist/api/resources/sources/resources/passages/client/Client.js +2 -2
  49. package/dist/api/resources/tools/client/Client.js +24 -24
  50. package/dist/api/types/LettaResponse.d.ts +12 -62
  51. package/dist/api/types/index.d.ts +0 -13
  52. package/dist/api/types/index.js +0 -13
  53. package/dist/environments.d.ts +2 -2
  54. package/dist/environments.js +1 -1
  55. package/dist/version.d.ts +1 -1
  56. package/dist/version.js +1 -1
  57. package/environments.d.ts +2 -2
  58. package/environments.js +1 -1
  59. package/package.json +1 -1
  60. package/reference.md +64 -1
  61. package/version.d.ts +1 -1
  62. package/version.js +1 -1
  63. package/api/types/LettaResponseAssistantMessage.d.ts +0 -9
  64. package/api/types/LettaResponseLettaUsageStatistics.d.ts +0 -23
  65. package/api/types/LettaResponseReasoningMessage.d.ts +0 -17
  66. package/api/types/LettaResponseReasoningMessage.js +0 -5
  67. package/api/types/LettaResponseSystemMessage.d.ts +0 -17
  68. package/api/types/LettaResponseSystemMessage.js +0 -5
  69. package/api/types/LettaResponseToolCall.d.ts +0 -8
  70. package/api/types/LettaResponseToolCall.js +0 -5
  71. package/api/types/LettaResponseToolCallDelta.d.ts +0 -8
  72. package/api/types/LettaResponseToolCallDelta.js +0 -5
  73. package/api/types/LettaResponseToolCallMessage.d.ts +0 -18
  74. package/api/types/LettaResponseToolCallMessage.js +0 -5
  75. package/api/types/LettaResponseToolCallMessageToolCall.d.ts +0 -5
  76. package/api/types/LettaResponseToolCallMessageToolCall.js +0 -5
  77. package/api/types/LettaResponseToolCallMessageToolCallOne.d.ts +0 -8
  78. package/api/types/LettaResponseToolCallMessageToolCallOne.js +0 -5
  79. package/api/types/LettaResponseToolCallMessageToolCallZero.d.ts +0 -8
  80. package/api/types/LettaResponseToolCallMessageToolCallZero.js +0 -5
  81. package/api/types/LettaResponseToolReturnMessage.d.ts +0 -26
  82. package/api/types/LettaResponseToolReturnMessage.js +0 -5
  83. package/api/types/LettaResponseToolReturnMessageStatus.d.ts +0 -8
  84. package/api/types/LettaResponseToolReturnMessageStatus.js +0 -10
  85. package/api/types/LettaResponseUserMessage.d.ts +0 -17
  86. package/api/types/LettaResponseUserMessage.js +0 -5
  87. package/dist/api/types/LettaResponseAssistantMessage.d.ts +0 -9
  88. package/dist/api/types/LettaResponseAssistantMessage.js +0 -5
  89. package/dist/api/types/LettaResponseLettaUsageStatistics.d.ts +0 -23
  90. package/dist/api/types/LettaResponseLettaUsageStatistics.js +0 -5
  91. package/dist/api/types/LettaResponseReasoningMessage.d.ts +0 -17
  92. package/dist/api/types/LettaResponseReasoningMessage.js +0 -5
  93. package/dist/api/types/LettaResponseSystemMessage.d.ts +0 -17
  94. package/dist/api/types/LettaResponseSystemMessage.js +0 -5
  95. package/dist/api/types/LettaResponseToolCall.d.ts +0 -8
  96. package/dist/api/types/LettaResponseToolCall.js +0 -5
  97. package/dist/api/types/LettaResponseToolCallDelta.d.ts +0 -8
  98. package/dist/api/types/LettaResponseToolCallDelta.js +0 -5
  99. package/dist/api/types/LettaResponseToolCallMessage.d.ts +0 -18
  100. package/dist/api/types/LettaResponseToolCallMessage.js +0 -5
  101. package/dist/api/types/LettaResponseToolCallMessageToolCall.d.ts +0 -5
  102. package/dist/api/types/LettaResponseToolCallMessageToolCall.js +0 -5
  103. package/dist/api/types/LettaResponseToolCallMessageToolCallOne.d.ts +0 -8
  104. package/dist/api/types/LettaResponseToolCallMessageToolCallOne.js +0 -5
  105. package/dist/api/types/LettaResponseToolCallMessageToolCallZero.d.ts +0 -8
  106. package/dist/api/types/LettaResponseToolCallMessageToolCallZero.js +0 -5
  107. package/dist/api/types/LettaResponseToolReturnMessage.d.ts +0 -26
  108. package/dist/api/types/LettaResponseToolReturnMessage.js +0 -5
  109. package/dist/api/types/LettaResponseToolReturnMessageStatus.d.ts +0 -8
  110. package/dist/api/types/LettaResponseToolReturnMessageStatus.js +0 -10
  111. package/dist/api/types/LettaResponseUserMessage.d.ts +0 -17
  112. package/dist/api/types/LettaResponseUserMessage.js +0 -5
  113. /package/api/{types/LettaResponseAssistantMessage.js → resources/agents/types/AgentsGetAgentVariablesResponse.js} +0 -0
  114. /package/{api/types/LettaResponseLettaUsageStatistics.js → dist/api/resources/agents/types/AgentsGetAgentVariablesResponse.js} +0 -0
@@ -63,9 +63,9 @@ class Sources {
63
63
  var _a, _b;
64
64
  return __awaiter(this, void 0, void 0, function* () {
65
65
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
66
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/sources`),
66
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/sources`),
67
67
  method: "GET",
68
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
68
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
69
69
  contentType: "application/json",
70
70
  requestType: "json",
71
71
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -63,9 +63,9 @@ class Tools {
63
63
  var _a, _b;
64
64
  return __awaiter(this, void 0, void 0, function* () {
65
65
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
66
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/tools`),
66
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/tools`),
67
67
  method: "GET",
68
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
68
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
69
69
  contentType: "application/json",
70
70
  requestType: "json",
71
71
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -117,9 +117,9 @@ class Tools {
117
117
  var _a, _b;
118
118
  return __awaiter(this, void 0, void 0, function* () {
119
119
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
120
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/add-tool/${encodeURIComponent(toolId)}`),
120
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/add-tool/${encodeURIComponent(toolId)}`),
121
121
  method: "PATCH",
122
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
122
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
123
123
  contentType: "application/json",
124
124
  requestType: "json",
125
125
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -171,9 +171,9 @@ class Tools {
171
171
  var _a, _b;
172
172
  return __awaiter(this, void 0, void 0, function* () {
173
173
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
174
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/remove-tool/${encodeURIComponent(toolId)}`),
174
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/remove-tool/${encodeURIComponent(toolId)}`),
175
175
  method: "PATCH",
176
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
176
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
177
177
  contentType: "application/json",
178
178
  requestType: "json",
179
179
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface AgentsGetAgentVariablesResponse {
5
+ variables: Record<string, string>;
6
+ }
@@ -9,3 +9,4 @@ export * from "./AgentsSearchDeployedAgentsRequestSearchItemDirection";
9
9
  export * from "./AgentsSearchDeployedAgentsRequestSearchItem";
10
10
  export * from "./AgentsSearchDeployedAgentsRequestCombinator";
11
11
  export * from "./AgentsMigrateResponse";
12
+ export * from "./AgentsGetAgentVariablesResponse";
@@ -25,3 +25,4 @@ __exportStar(require("./AgentsSearchDeployedAgentsRequestSearchItemDirection"),
25
25
  __exportStar(require("./AgentsSearchDeployedAgentsRequestSearchItem"), exports);
26
26
  __exportStar(require("./AgentsSearchDeployedAgentsRequestCombinator"), exports);
27
27
  __exportStar(require("./AgentsMigrateResponse"), exports);
28
+ __exportStar(require("./AgentsGetAgentVariablesResponse"), exports);
@@ -72,9 +72,9 @@ class Blocks {
72
72
  _queryParams["name"] = name;
73
73
  }
74
74
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
75
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, "v1/blocks/"),
75
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/blocks/"),
76
76
  method: "GET",
77
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
77
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
78
78
  contentType: "application/json",
79
79
  queryParameters: _queryParams,
80
80
  requestType: "json",
@@ -127,9 +127,9 @@ class Blocks {
127
127
  var _a, _b;
128
128
  return __awaiter(this, void 0, void 0, function* () {
129
129
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
130
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, "v1/blocks/"),
130
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/blocks/"),
131
131
  method: "POST",
132
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
132
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
133
133
  contentType: "application/json",
134
134
  requestType: "json",
135
135
  body: request,
@@ -179,9 +179,9 @@ class Blocks {
179
179
  var _a, _b;
180
180
  return __awaiter(this, void 0, void 0, function* () {
181
181
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
182
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/blocks/${encodeURIComponent(blockId)}`),
182
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/blocks/${encodeURIComponent(blockId)}`),
183
183
  method: "GET",
184
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
184
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
185
185
  contentType: "application/json",
186
186
  requestType: "json",
187
187
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -230,9 +230,9 @@ class Blocks {
230
230
  var _a, _b;
231
231
  return __awaiter(this, void 0, void 0, function* () {
232
232
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
233
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/blocks/${encodeURIComponent(blockId)}`),
233
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/blocks/${encodeURIComponent(blockId)}`),
234
234
  method: "DELETE",
235
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
235
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
236
236
  contentType: "application/json",
237
237
  requestType: "json",
238
238
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -282,9 +282,9 @@ class Blocks {
282
282
  var _a, _b;
283
283
  return __awaiter(this, void 0, void 0, function* () {
284
284
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
285
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/blocks/${encodeURIComponent(blockId)}`),
285
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/blocks/${encodeURIComponent(blockId)}`),
286
286
  method: "PATCH",
287
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
287
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
288
288
  contentType: "application/json",
289
289
  requestType: "json",
290
290
  body: request,
@@ -342,9 +342,9 @@ class Blocks {
342
342
  const _queryParams = {};
343
343
  _queryParams["agent_id"] = agentId;
344
344
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
345
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/blocks/${encodeURIComponent(blockId)}/attach`),
345
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/blocks/${encodeURIComponent(blockId)}/attach`),
346
346
  method: "PATCH",
347
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
347
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
348
348
  contentType: "application/json",
349
349
  queryParameters: _queryParams,
350
350
  requestType: "json",
@@ -402,9 +402,9 @@ class Blocks {
402
402
  const _queryParams = {};
403
403
  _queryParams["agent_id"] = agentId;
404
404
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
405
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/blocks/${encodeURIComponent(blockId)}/detach`),
405
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/blocks/${encodeURIComponent(blockId)}/detach`),
406
406
  method: "PATCH",
407
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
407
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
408
408
  contentType: "application/json",
409
409
  queryParameters: _queryParams,
410
410
  requestType: "json",
@@ -57,9 +57,9 @@ class Health {
57
57
  var _a, _b;
58
58
  return __awaiter(this, void 0, void 0, function* () {
59
59
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
60
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, "v1/health/"),
60
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/health/"),
61
61
  method: "GET",
62
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
62
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
63
63
  contentType: "application/json",
64
64
  requestType: "json",
65
65
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -68,9 +68,9 @@ class Jobs {
68
68
  _queryParams["source_id"] = sourceId;
69
69
  }
70
70
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
71
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, "v1/jobs/"),
71
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/jobs/"),
72
72
  method: "GET",
73
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
73
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
74
74
  contentType: "application/json",
75
75
  queryParameters: _queryParams,
76
76
  requestType: "json",
@@ -121,9 +121,9 @@ class Jobs {
121
121
  var _a, _b;
122
122
  return __awaiter(this, void 0, void 0, function* () {
123
123
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
124
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, "v1/jobs/active"),
124
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/jobs/active"),
125
125
  method: "GET",
126
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
126
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
127
127
  contentType: "application/json",
128
128
  requestType: "json",
129
129
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -174,9 +174,9 @@ class Jobs {
174
174
  var _a, _b;
175
175
  return __awaiter(this, void 0, void 0, function* () {
176
176
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
177
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/jobs/${encodeURIComponent(jobId)}`),
177
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/jobs/${encodeURIComponent(jobId)}`),
178
178
  method: "GET",
179
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
179
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
180
180
  contentType: "application/json",
181
181
  requestType: "json",
182
182
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -227,9 +227,9 @@ class Jobs {
227
227
  var _a, _b;
228
228
  return __awaiter(this, void 0, void 0, function* () {
229
229
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
230
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/jobs/${encodeURIComponent(jobId)}`),
230
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/jobs/${encodeURIComponent(jobId)}`),
231
231
  method: "DELETE",
232
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
232
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, 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,
@@ -57,9 +57,9 @@ class Models {
57
57
  var _a, _b;
58
58
  return __awaiter(this, void 0, void 0, function* () {
59
59
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
60
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, "v1/models/"),
60
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/models/"),
61
61
  method: "GET",
62
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
62
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
63
63
  contentType: "application/json",
64
64
  requestType: "json",
65
65
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -100,9 +100,9 @@ class Models {
100
100
  var _a, _b;
101
101
  return __awaiter(this, void 0, void 0, function* () {
102
102
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
103
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, "v1/models/embedding"),
103
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/models/embedding"),
104
104
  method: "GET",
105
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
105
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
106
106
  contentType: "application/json",
107
107
  requestType: "json",
108
108
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -73,9 +73,9 @@ class Sources {
73
73
  var _a, _b;
74
74
  return __awaiter(this, void 0, void 0, function* () {
75
75
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
76
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/sources/${encodeURIComponent(sourceId)}`),
76
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}`),
77
77
  method: "GET",
78
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
78
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
79
79
  contentType: "application/json",
80
80
  requestType: "json",
81
81
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -126,9 +126,9 @@ class Sources {
126
126
  var _a, _b;
127
127
  return __awaiter(this, void 0, void 0, function* () {
128
128
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
129
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/sources/${encodeURIComponent(sourceId)}`),
129
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}`),
130
130
  method: "DELETE",
131
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
131
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
132
132
  contentType: "application/json",
133
133
  requestType: "json",
134
134
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -180,9 +180,9 @@ class Sources {
180
180
  var _a, _b;
181
181
  return __awaiter(this, void 0, void 0, function* () {
182
182
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
183
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/sources/${encodeURIComponent(sourceId)}`),
183
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}`),
184
184
  method: "PATCH",
185
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
185
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
186
186
  contentType: "application/json",
187
187
  requestType: "json",
188
188
  body: request,
@@ -234,9 +234,9 @@ class Sources {
234
234
  var _a, _b;
235
235
  return __awaiter(this, void 0, void 0, function* () {
236
236
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
237
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/sources/name/${encodeURIComponent(sourceName)}`),
237
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/sources/name/${encodeURIComponent(sourceName)}`),
238
238
  method: "GET",
239
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
239
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
240
240
  contentType: "application/json",
241
241
  requestType: "json",
242
242
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -286,9 +286,9 @@ class Sources {
286
286
  var _a, _b;
287
287
  return __awaiter(this, void 0, void 0, function* () {
288
288
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
289
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, "v1/sources/"),
289
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/sources/"),
290
290
  method: "GET",
291
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
291
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
292
292
  contentType: "application/json",
293
293
  requestType: "json",
294
294
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -341,9 +341,9 @@ class Sources {
341
341
  var _a, _b;
342
342
  return __awaiter(this, void 0, void 0, function* () {
343
343
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
344
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, "v1/sources/"),
344
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/sources/"),
345
345
  method: "POST",
346
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
346
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
347
347
  contentType: "application/json",
348
348
  requestType: "json",
349
349
  body: request,
@@ -401,9 +401,9 @@ class Sources {
401
401
  const _queryParams = {};
402
402
  _queryParams["agent_id"] = agentId;
403
403
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
404
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/sources/${encodeURIComponent(sourceId)}/attach`),
404
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/attach`),
405
405
  method: "POST",
406
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
406
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
407
407
  contentType: "application/json",
408
408
  queryParameters: _queryParams,
409
409
  requestType: "json",
@@ -461,9 +461,9 @@ class Sources {
461
461
  const _queryParams = {};
462
462
  _queryParams["agent_id"] = agentId;
463
463
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
464
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/sources/${encodeURIComponent(sourceId)}/detach`),
464
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/detach`),
465
465
  method: "POST",
466
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
466
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
467
467
  contentType: "application/json",
468
468
  queryParameters: _queryParams,
469
469
  requestType: "json",
@@ -67,9 +67,9 @@ class Files {
67
67
  yield _request.appendFile("file", file);
68
68
  const _maybeEncodedRequest = yield _request.getRequest();
69
69
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
70
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/sources/${encodeURIComponent(sourceId)}/upload`),
70
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/upload`),
71
71
  method: "POST",
72
- headers: Object.assign(Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
72
+ headers: Object.assign(Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
73
73
  requestType: "file",
74
74
  duplex: _maybeEncodedRequest.duplex,
75
75
  body: _maybeEncodedRequest.body,
@@ -130,9 +130,9 @@ class Files {
130
130
  _queryParams["cursor"] = cursor;
131
131
  }
132
132
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
133
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/sources/${encodeURIComponent(sourceId)}/files`),
133
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/files`),
134
134
  method: "GET",
135
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
135
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
136
136
  contentType: "application/json",
137
137
  queryParameters: _queryParams,
138
138
  requestType: "json",
@@ -185,9 +185,9 @@ class Files {
185
185
  var _a, _b;
186
186
  return __awaiter(this, void 0, void 0, function* () {
187
187
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
188
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/sources/${encodeURIComponent(sourceId)}/${encodeURIComponent(fileId)}`),
188
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/${encodeURIComponent(fileId)}`),
189
189
  method: "DELETE",
190
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
190
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
191
191
  contentType: "application/json",
192
192
  requestType: "json",
193
193
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -63,9 +63,9 @@ class Passages {
63
63
  var _a, _b;
64
64
  return __awaiter(this, void 0, void 0, function* () {
65
65
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
66
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/sources/${encodeURIComponent(sourceId)}/passages`),
66
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/passages`),
67
67
  method: "GET",
68
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
68
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
69
69
  contentType: "application/json",
70
70
  requestType: "json",
71
71
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,