@letta-ai/letta-client 0.1.83 → 0.1.84

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 (144) hide show
  1. package/api/resources/agents/client/Client.js +10 -10
  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/memoryVariables/client/Client.js +1 -1
  6. package/api/resources/agents/resources/messages/client/Client.js +5 -5
  7. package/api/resources/agents/resources/passages/client/Client.js +3 -3
  8. package/api/resources/agents/resources/sources/client/Client.js +3 -3
  9. package/api/resources/agents/resources/templates/client/Client.js +3 -3
  10. package/api/resources/agents/resources/tools/client/Client.js +3 -3
  11. package/api/resources/blocks/client/Client.js +6 -6
  12. package/api/resources/groups/client/Client.js +6 -6
  13. package/api/resources/groups/resources/messages/client/Client.js +4 -4
  14. package/api/resources/groups/types/GroupUpdateManagerConfig.d.ts +1 -1
  15. package/api/resources/health/client/Client.js +1 -1
  16. package/api/resources/identities/client/Client.d.ts +25 -14
  17. package/api/resources/identities/client/Client.js +93 -21
  18. package/api/{types → resources/identities/client/requests}/IdentityCreate.d.ts +10 -1
  19. package/api/resources/identities/client/requests/IdentityUpsert.d.ts +29 -0
  20. package/api/resources/identities/client/requests/index.d.ts +2 -2
  21. package/api/resources/jobs/client/Client.js +4 -4
  22. package/api/resources/models/client/Client.js +2 -2
  23. package/api/resources/providers/client/Client.js +4 -4
  24. package/api/resources/runs/client/Client.js +7 -7
  25. package/api/resources/sources/client/Client.js +6 -6
  26. package/api/resources/sources/resources/files/client/Client.js +3 -3
  27. package/api/resources/sources/resources/passages/client/Client.js +1 -1
  28. package/api/resources/steps/client/Client.js +2 -2
  29. package/api/resources/tag/client/Client.js +1 -1
  30. package/api/resources/templates/client/Client.js +1 -1
  31. package/api/resources/tools/client/Client.js +16 -16
  32. package/api/resources/voice/client/Client.js +1 -1
  33. package/api/types/DynamicManagerUpdate.d.ts +12 -0
  34. package/api/types/RoundRobinManagerUpdate.d.ts +8 -0
  35. package/api/types/SleeptimeManagerUpdate.d.ts +10 -0
  36. package/api/types/SupervisorManagerUpdate.d.ts +8 -0
  37. package/api/types/index.d.ts +4 -1
  38. package/api/types/index.js +4 -1
  39. package/dist/api/resources/agents/client/Client.js +10 -10
  40. package/dist/api/resources/agents/resources/blocks/client/Client.js +5 -5
  41. package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
  42. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  43. package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  44. package/dist/api/resources/agents/resources/messages/client/Client.js +5 -5
  45. package/dist/api/resources/agents/resources/passages/client/Client.js +3 -3
  46. package/dist/api/resources/agents/resources/sources/client/Client.js +3 -3
  47. package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
  48. package/dist/api/resources/agents/resources/tools/client/Client.js +3 -3
  49. package/dist/api/resources/blocks/client/Client.js +6 -6
  50. package/dist/api/resources/groups/client/Client.js +6 -6
  51. package/dist/api/resources/groups/resources/messages/client/Client.js +4 -4
  52. package/dist/api/resources/groups/types/GroupUpdateManagerConfig.d.ts +1 -1
  53. package/dist/api/resources/health/client/Client.js +1 -1
  54. package/dist/api/resources/identities/client/Client.d.ts +25 -14
  55. package/dist/api/resources/identities/client/Client.js +93 -21
  56. package/dist/api/{types → resources/identities/client/requests}/IdentityCreate.d.ts +10 -1
  57. package/dist/api/resources/identities/client/requests/IdentityCreate.js +5 -0
  58. package/dist/api/resources/identities/client/requests/IdentityUpsert.d.ts +29 -0
  59. package/dist/api/resources/identities/client/requests/IdentityUpsert.js +5 -0
  60. package/dist/api/resources/identities/client/requests/index.d.ts +2 -2
  61. package/dist/api/resources/jobs/client/Client.js +4 -4
  62. package/dist/api/resources/models/client/Client.js +2 -2
  63. package/dist/api/resources/providers/client/Client.js +4 -4
  64. package/dist/api/resources/runs/client/Client.js +7 -7
  65. package/dist/api/resources/sources/client/Client.js +6 -6
  66. package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
  67. package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
  68. package/dist/api/resources/steps/client/Client.js +2 -2
  69. package/dist/api/resources/tag/client/Client.js +1 -1
  70. package/dist/api/resources/templates/client/Client.js +1 -1
  71. package/dist/api/resources/tools/client/Client.js +16 -16
  72. package/dist/api/resources/voice/client/Client.js +1 -1
  73. package/dist/api/types/DynamicManagerUpdate.d.ts +12 -0
  74. package/dist/api/types/DynamicManagerUpdate.js +5 -0
  75. package/dist/api/types/RoundRobinManagerUpdate.d.ts +8 -0
  76. package/dist/api/types/RoundRobinManagerUpdate.js +5 -0
  77. package/dist/api/types/SleeptimeManagerUpdate.d.ts +10 -0
  78. package/dist/api/types/SleeptimeManagerUpdate.js +5 -0
  79. package/dist/api/types/SupervisorManagerUpdate.d.ts +8 -0
  80. package/dist/api/types/SupervisorManagerUpdate.js +5 -0
  81. package/dist/api/types/index.d.ts +4 -1
  82. package/dist/api/types/index.js +4 -1
  83. package/dist/serialization/resources/groups/types/GroupUpdateManagerConfig.d.ts +5 -5
  84. package/dist/serialization/resources/groups/types/GroupUpdateManagerConfig.js +10 -5
  85. package/dist/serialization/resources/identities/client/index.d.ts +1 -0
  86. package/dist/serialization/resources/identities/client/index.js +2 -1
  87. package/dist/serialization/resources/identities/client/requests/IdentityCreate.d.ts +20 -0
  88. package/dist/serialization/{types → resources/identities/client/requests}/IdentityCreate.js +3 -3
  89. package/dist/serialization/resources/identities/client/requests/IdentityUpsert.d.ts +20 -0
  90. package/dist/serialization/resources/identities/client/requests/IdentityUpsert.js +51 -0
  91. package/dist/serialization/resources/identities/client/requests/index.d.ts +2 -0
  92. package/dist/serialization/resources/identities/client/requests/index.js +5 -1
  93. package/dist/serialization/resources/identities/client/upsertIdentityProperties.d.ts +11 -0
  94. package/dist/serialization/resources/identities/client/upsertIdentityProperties.js +42 -0
  95. package/dist/serialization/types/DynamicManagerUpdate.d.ts +15 -0
  96. package/dist/serialization/types/DynamicManagerUpdate.js +46 -0
  97. package/dist/serialization/types/RoundRobinManagerUpdate.d.ts +13 -0
  98. package/dist/serialization/types/RoundRobinManagerUpdate.js +44 -0
  99. package/dist/serialization/types/SleeptimeManagerUpdate.d.ts +14 -0
  100. package/dist/serialization/types/SleeptimeManagerUpdate.js +45 -0
  101. package/dist/serialization/types/SupervisorManagerUpdate.d.ts +13 -0
  102. package/dist/serialization/types/SupervisorManagerUpdate.js +44 -0
  103. package/dist/serialization/types/index.d.ts +4 -1
  104. package/dist/serialization/types/index.js +4 -1
  105. package/dist/version.d.ts +1 -1
  106. package/dist/version.js +1 -1
  107. package/package.json +1 -1
  108. package/reference.md +70 -12
  109. package/serialization/resources/groups/types/GroupUpdateManagerConfig.d.ts +5 -5
  110. package/serialization/resources/groups/types/GroupUpdateManagerConfig.js +10 -5
  111. package/serialization/resources/identities/client/index.d.ts +1 -0
  112. package/serialization/resources/identities/client/index.js +2 -1
  113. package/serialization/resources/identities/client/requests/IdentityCreate.d.ts +20 -0
  114. package/serialization/{types → resources/identities/client/requests}/IdentityCreate.js +3 -3
  115. package/serialization/resources/identities/client/requests/IdentityUpsert.d.ts +20 -0
  116. package/serialization/resources/identities/client/requests/IdentityUpsert.js +51 -0
  117. package/serialization/resources/identities/client/requests/index.d.ts +2 -0
  118. package/serialization/resources/identities/client/requests/index.js +5 -1
  119. package/serialization/resources/identities/client/upsertIdentityProperties.d.ts +11 -0
  120. package/serialization/resources/identities/client/upsertIdentityProperties.js +42 -0
  121. package/serialization/types/DynamicManagerUpdate.d.ts +15 -0
  122. package/serialization/types/DynamicManagerUpdate.js +46 -0
  123. package/serialization/types/RoundRobinManagerUpdate.d.ts +13 -0
  124. package/serialization/types/RoundRobinManagerUpdate.js +44 -0
  125. package/serialization/types/SleeptimeManagerUpdate.d.ts +14 -0
  126. package/serialization/types/SleeptimeManagerUpdate.js +45 -0
  127. package/serialization/types/SupervisorManagerUpdate.d.ts +13 -0
  128. package/serialization/types/SupervisorManagerUpdate.js +44 -0
  129. package/serialization/types/index.d.ts +4 -1
  130. package/serialization/types/index.js +4 -1
  131. package/version.d.ts +1 -1
  132. package/version.js +1 -1
  133. package/api/resources/identities/client/requests/IdentitiesCreateRequest.d.ts +0 -18
  134. package/api/resources/identities/client/requests/IdentitiesUpsertRequest.d.ts +0 -18
  135. package/dist/api/resources/identities/client/requests/IdentitiesCreateRequest.d.ts +0 -18
  136. package/dist/api/resources/identities/client/requests/IdentitiesUpsertRequest.d.ts +0 -18
  137. package/dist/serialization/types/IdentityCreate.d.ts +0 -20
  138. package/serialization/types/IdentityCreate.d.ts +0 -20
  139. /package/api/{types → resources/identities/client/requests}/IdentityCreate.js +0 -0
  140. /package/api/resources/identities/client/requests/{IdentitiesCreateRequest.js → IdentityUpsert.js} +0 -0
  141. /package/api/{resources/identities/client/requests/IdentitiesUpsertRequest.js → types/DynamicManagerUpdate.js} +0 -0
  142. /package/{dist/api/resources/identities/client/requests/IdentitiesCreateRequest.js → api/types/RoundRobinManagerUpdate.js} +0 -0
  143. /package/{dist/api/resources/identities/client/requests/IdentitiesUpsertRequest.js → api/types/SleeptimeManagerUpdate.js} +0 -0
  144. /package/{dist/api/types/IdentityCreate.js → api/types/SupervisorManagerUpdate.js} +0 -0
@@ -44,6 +44,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
44
44
  step((generator = generator.apply(thisArg, _arguments || [])).next());
45
45
  });
46
46
  };
47
+ var __rest = (this && this.__rest) || function (s, e) {
48
+ var t = {};
49
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
50
+ t[p] = s[p];
51
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
52
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
53
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
54
+ t[p[i]] = s[p[i]];
55
+ }
56
+ return t;
57
+ };
47
58
  var __importDefault = (this && this.__importDefault) || function (mod) {
48
59
  return (mod && mod.__esModule) ? mod : { "default": mod };
49
60
  };
@@ -99,7 +110,7 @@ class Identities {
99
110
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
100
111
  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/"),
101
112
  method: "GET",
102
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.83", "User-Agent": "@letta-ai/letta-client/0.1.83", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
113
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.84", "User-Agent": "@letta-ai/letta-client/0.1.84", "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),
103
114
  contentType: "application/json",
104
115
  queryParameters: _queryParams,
105
116
  requestType: "json",
@@ -149,28 +160,26 @@ class Identities {
149
160
  });
150
161
  }
151
162
  /**
152
- * @param {Letta.IdentitiesCreateRequest} request
163
+ * @param {Letta.IdentityCreate} request
153
164
  * @param {Identities.RequestOptions} requestOptions - Request-specific configuration.
154
165
  *
155
166
  * @throws {@link Letta.UnprocessableEntityError}
156
167
  *
157
168
  * @example
158
169
  * await client.identities.create({
159
- * body: {
160
- * identifierKey: "identifier_key",
161
- * name: "name",
162
- * identityType: "org"
163
- * }
170
+ * identifierKey: "identifier_key",
171
+ * name: "name",
172
+ * identityType: "org"
164
173
  * })
165
174
  */
166
175
  create(request, requestOptions) {
167
176
  return __awaiter(this, void 0, void 0, function* () {
168
177
  var _a, _b, _c;
169
- const { project, body: _body } = request;
178
+ const { project } = request, _body = __rest(request, ["project"]);
170
179
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
171
180
  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/"),
172
181
  method: "POST",
173
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.83", "User-Agent": "@letta-ai/letta-client/0.1.83", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "X-Project": project != null ? project : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
182
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.84", "User-Agent": "@letta-ai/letta-client/0.1.84", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "X-Project": project != null ? project : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
174
183
  contentType: "application/json",
175
184
  requestType: "json",
176
185
  body: serializers.IdentityCreate.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
@@ -220,31 +229,29 @@ class Identities {
220
229
  });
221
230
  }
222
231
  /**
223
- * @param {Letta.IdentitiesUpsertRequest} request
232
+ * @param {Letta.IdentityUpsert} request
224
233
  * @param {Identities.RequestOptions} requestOptions - Request-specific configuration.
225
234
  *
226
235
  * @throws {@link Letta.UnprocessableEntityError}
227
236
  *
228
237
  * @example
229
238
  * await client.identities.upsert({
230
- * body: {
231
- * identifierKey: "identifier_key",
232
- * name: "name",
233
- * identityType: "org"
234
- * }
239
+ * identifierKey: "identifier_key",
240
+ * name: "name",
241
+ * identityType: "org"
235
242
  * })
236
243
  */
237
244
  upsert(request, requestOptions) {
238
245
  return __awaiter(this, void 0, void 0, function* () {
239
246
  var _a, _b, _c;
240
- const { project, body: _body } = request;
247
+ const { project } = request, _body = __rest(request, ["project"]);
241
248
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
242
249
  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/"),
243
250
  method: "PUT",
244
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.83", "User-Agent": "@letta-ai/letta-client/0.1.83", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "X-Project": project != null ? project : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
251
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.84", "User-Agent": "@letta-ai/letta-client/0.1.84", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "X-Project": project != null ? project : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
245
252
  contentType: "application/json",
246
253
  requestType: "json",
247
- body: serializers.IdentityCreate.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
254
+ body: serializers.IdentityUpsert.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
248
255
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
249
256
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
250
257
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -305,7 +312,7 @@ class Identities {
305
312
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
306
313
  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)}`),
307
314
  method: "GET",
308
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.83", "User-Agent": "@letta-ai/letta-client/0.1.83", "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),
315
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.84", "User-Agent": "@letta-ai/letta-client/0.1.84", "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),
309
316
  contentType: "application/json",
310
317
  requestType: "json",
311
318
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -370,7 +377,7 @@ class Identities {
370
377
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
371
378
  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)}`),
372
379
  method: "DELETE",
373
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.83", "User-Agent": "@letta-ai/letta-client/0.1.83", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
380
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.84", "User-Agent": "@letta-ai/letta-client/0.1.84", "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),
374
381
  contentType: "application/json",
375
382
  requestType: "json",
376
383
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -428,7 +435,7 @@ class Identities {
428
435
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
429
436
  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)}`),
430
437
  method: "PATCH",
431
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.83", "User-Agent": "@letta-ai/letta-client/0.1.83", "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),
438
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.84", "User-Agent": "@letta-ai/letta-client/0.1.84", "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),
432
439
  contentType: "application/json",
433
440
  requestType: "json",
434
441
  body: serializers.IdentityUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -477,6 +484,71 @@ class Identities {
477
484
  }
478
485
  });
479
486
  }
487
+ /**
488
+ * @param {string} identityId
489
+ * @param {Letta.IdentityProperty[]} request
490
+ * @param {Identities.RequestOptions} requestOptions - Request-specific configuration.
491
+ *
492
+ * @throws {@link Letta.UnprocessableEntityError}
493
+ *
494
+ * @example
495
+ * await client.identities.upsertIdentityProperties("identity_id", [{
496
+ * key: "key",
497
+ * value: "value",
498
+ * type: "string"
499
+ * }])
500
+ */
501
+ upsertIdentityProperties(identityId, request, requestOptions) {
502
+ return __awaiter(this, void 0, void 0, function* () {
503
+ var _a, _b, _c;
504
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
505
+ 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`),
506
+ method: "PUT",
507
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.84", "User-Agent": "@letta-ai/letta-client/0.1.84", "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),
508
+ contentType: "application/json",
509
+ requestType: "json",
510
+ body: serializers.identities.upsertIdentityProperties.Request.jsonOrThrow(request, {
511
+ unrecognizedObjectKeys: "strip",
512
+ }),
513
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
514
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
515
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
516
+ });
517
+ if (_response.ok) {
518
+ return _response.body;
519
+ }
520
+ if (_response.error.reason === "status-code") {
521
+ switch (_response.error.statusCode) {
522
+ case 422:
523
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
524
+ unrecognizedObjectKeys: "passthrough",
525
+ allowUnrecognizedUnionMembers: true,
526
+ allowUnrecognizedEnumValues: true,
527
+ skipValidation: true,
528
+ breadcrumbsPrefix: ["response"],
529
+ }));
530
+ default:
531
+ throw new errors.LettaError({
532
+ statusCode: _response.error.statusCode,
533
+ body: _response.error.body,
534
+ });
535
+ }
536
+ }
537
+ switch (_response.error.reason) {
538
+ case "non-json":
539
+ throw new errors.LettaError({
540
+ statusCode: _response.error.statusCode,
541
+ body: _response.error.rawBody,
542
+ });
543
+ case "timeout":
544
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling PUT /v1/identities/{identity_id}/properties.");
545
+ case "unknown":
546
+ throw new errors.LettaError({
547
+ message: _response.error.errorMessage,
548
+ });
549
+ }
550
+ });
551
+ }
480
552
  _getCustomAuthorizationHeaders() {
481
553
  return __awaiter(this, void 0, void 0, function* () {
482
554
  const tokenValue = yield core.Supplier.get(this._options.token);
@@ -1,8 +1,17 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- import * as Letta from "../index";
4
+ import * as Letta from "../../../../index";
5
+ /**
6
+ * @example
7
+ * {
8
+ * identifierKey: "identifier_key",
9
+ * name: "name",
10
+ * identityType: "org"
11
+ * }
12
+ */
5
13
  export interface IdentityCreate {
14
+ project?: string;
6
15
  /** External, user-generated identifier key of the identity. */
7
16
  identifierKey: string;
8
17
  /** The name of the identity. */
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,29 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Letta from "../../../../index";
5
+ /**
6
+ * @example
7
+ * {
8
+ * identifierKey: "identifier_key",
9
+ * name: "name",
10
+ * identityType: "org"
11
+ * }
12
+ */
13
+ export interface IdentityUpsert {
14
+ project?: string;
15
+ /** External, user-generated identifier key of the identity. */
16
+ identifierKey: string;
17
+ /** The name of the identity. */
18
+ name: string;
19
+ /** The type of the identity. */
20
+ identityType: Letta.IdentityType;
21
+ /** The project id of the identity, if applicable. */
22
+ projectId?: string;
23
+ /** The agent ids that are associated with the identity. */
24
+ agentIds?: string[];
25
+ /** The IDs of the blocks associated with the identity. */
26
+ blockIds?: string[];
27
+ /** List of properties associated with the identity. */
28
+ properties?: Letta.IdentityProperty[];
29
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,4 @@
1
1
  export { type IdentitiesListRequest } from "./IdentitiesListRequest";
2
- export { type IdentitiesCreateRequest } from "./IdentitiesCreateRequest";
3
- export { type IdentitiesUpsertRequest } from "./IdentitiesUpsertRequest";
2
+ export { type IdentityCreate } from "./IdentityCreate";
3
+ export { type IdentityUpsert } from "./IdentityUpsert";
4
4
  export { type IdentityUpdate } from "./IdentityUpdate";
@@ -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.83", "User-Agent": "@letta-ai/letta-client/0.1.83", "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.84", "User-Agent": "@letta-ai/letta-client/0.1.84", "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.83", "User-Agent": "@letta-ai/letta-client/0.1.83", "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.84", "User-Agent": "@letta-ai/letta-client/0.1.84", "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.83", "User-Agent": "@letta-ai/letta-client/0.1.83", "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.84", "User-Agent": "@letta-ai/letta-client/0.1.84", "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.83", "User-Agent": "@letta-ai/letta-client/0.1.83", "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.84", "User-Agent": "@letta-ai/letta-client/0.1.84", "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.83", "User-Agent": "@letta-ai/letta-client/0.1.83", "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.84", "User-Agent": "@letta-ai/letta-client/0.1.84", "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,
@@ -119,7 +119,7 @@ class Models {
119
119
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
120
120
  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/embedding"),
121
121
  method: "GET",
122
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.83", "User-Agent": "@letta-ai/letta-client/0.1.83", "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),
122
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.84", "User-Agent": "@letta-ai/letta-client/0.1.84", "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),
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,
@@ -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.83", "User-Agent": "@letta-ai/letta-client/0.1.83", "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.84", "User-Agent": "@letta-ai/letta-client/0.1.84", "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.83", "User-Agent": "@letta-ai/letta-client/0.1.83", "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.84", "User-Agent": "@letta-ai/letta-client/0.1.84", "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" }),
@@ -224,7 +224,7 @@ class Providers {
224
224
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
225
225
  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/"),
226
226
  method: "DELETE",
227
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.83", "User-Agent": "@letta-ai/letta-client/0.1.83", "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),
227
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.84", "User-Agent": "@letta-ai/letta-client/0.1.84", "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),
228
228
  contentType: "application/json",
229
229
  queryParameters: _queryParams,
230
230
  requestType: "json",
@@ -287,7 +287,7 @@ class Providers {
287
287
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
288
288
  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/"),
289
289
  method: "PATCH",
290
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.83", "User-Agent": "@letta-ai/letta-client/0.1.83", "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),
290
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.84", "User-Agent": "@letta-ai/letta-client/0.1.84", "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),
291
291
  contentType: "application/json",
292
292
  requestType: "json",
293
293
  body: serializers.ProviderUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -86,7 +86,7 @@ class Runs {
86
86
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
87
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/runs/"),
88
88
  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.83", "User-Agent": "@letta-ai/letta-client/0.1.83", "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),
89
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.84", "User-Agent": "@letta-ai/letta-client/0.1.84", "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
90
  contentType: "application/json",
91
91
  queryParameters: _queryParams,
92
92
  requestType: "json",
@@ -162,7 +162,7 @@ class Runs {
162
162
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
163
163
  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"),
164
164
  method: "GET",
165
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.83", "User-Agent": "@letta-ai/letta-client/0.1.83", "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),
165
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.84", "User-Agent": "@letta-ai/letta-client/0.1.84", "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),
166
166
  contentType: "application/json",
167
167
  queryParameters: _queryParams,
168
168
  requestType: "json",
@@ -228,7 +228,7 @@ class Runs {
228
228
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
229
229
  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)}`),
230
230
  method: "GET",
231
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.83", "User-Agent": "@letta-ai/letta-client/0.1.83", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
231
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.84", "User-Agent": "@letta-ai/letta-client/0.1.84", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
232
232
  contentType: "application/json",
233
233
  requestType: "json",
234
234
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -293,7 +293,7 @@ class Runs {
293
293
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
294
294
  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)}`),
295
295
  method: "DELETE",
296
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.83", "User-Agent": "@letta-ai/letta-client/0.1.83", "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),
296
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.84", "User-Agent": "@letta-ai/letta-client/0.1.84", "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),
297
297
  contentType: "application/json",
298
298
  requestType: "json",
299
299
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -389,7 +389,7 @@ class Runs {
389
389
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
390
390
  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`),
391
391
  method: "GET",
392
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.83", "User-Agent": "@letta-ai/letta-client/0.1.83", "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),
392
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.84", "User-Agent": "@letta-ai/letta-client/0.1.84", "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),
393
393
  contentType: "application/json",
394
394
  queryParameters: _queryParams,
395
395
  requestType: "json",
@@ -455,7 +455,7 @@ class Runs {
455
455
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
456
456
  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`),
457
457
  method: "GET",
458
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.83", "User-Agent": "@letta-ai/letta-client/0.1.83", "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),
458
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.84", "User-Agent": "@letta-ai/letta-client/0.1.84", "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),
459
459
  contentType: "application/json",
460
460
  requestType: "json",
461
461
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -545,7 +545,7 @@ class Runs {
545
545
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
546
546
  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`),
547
547
  method: "GET",
548
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.83", "User-Agent": "@letta-ai/letta-client/0.1.83", "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),
548
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.84", "User-Agent": "@letta-ai/letta-client/0.1.84", "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),
549
549
  contentType: "application/json",
550
550
  queryParameters: _queryParams,
551
551
  requestType: "json",
@@ -86,7 +86,7 @@ class Sources {
86
86
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
87
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)}`),
88
88
  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.83", "User-Agent": "@letta-ai/letta-client/0.1.83", "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),
89
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.84", "User-Agent": "@letta-ai/letta-client/0.1.84", "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
90
  contentType: "application/json",
91
91
  requestType: "json",
92
92
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -151,7 +151,7 @@ class Sources {
151
151
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
152
152
  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
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.83", "User-Agent": "@letta-ai/letta-client/0.1.83", "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),
154
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.84", "User-Agent": "@letta-ai/letta-client/0.1.84", "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
155
  contentType: "application/json",
156
156
  requestType: "json",
157
157
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -211,7 +211,7 @@ class Sources {
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/sources/${encodeURIComponent(sourceId)}`),
213
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.83", "User-Agent": "@letta-ai/letta-client/0.1.83", "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.84", "User-Agent": "@letta-ai/letta-client/0.1.84", "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
  body: serializers.SourceUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -277,7 +277,7 @@ class Sources {
277
277
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
278
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
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.83", "User-Agent": "@letta-ai/letta-client/0.1.83", "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
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.84", "User-Agent": "@letta-ai/letta-client/0.1.84", "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
281
  contentType: "application/json",
282
282
  requestType: "json",
283
283
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -341,7 +341,7 @@ class Sources {
341
341
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
342
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/"),
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.83", "User-Agent": "@letta-ai/letta-client/0.1.83", "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.84", "User-Agent": "@letta-ai/letta-client/0.1.84", "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,
@@ -408,7 +408,7 @@ class Sources {
408
408
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
409
409
  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
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.83", "User-Agent": "@letta-ai/letta-client/0.1.83", "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),
411
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.84", "User-Agent": "@letta-ai/letta-client/0.1.84", "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
412
  contentType: "application/json",
413
413
  requestType: "json",
414
414
  body: serializers.SourceCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -80,7 +80,7 @@ class Files {
80
80
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
81
81
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/upload`),
82
82
  method: "POST",
83
- headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.83", "User-Agent": "@letta-ai/letta-client/0.1.83", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
83
+ headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.84", "User-Agent": "@letta-ai/letta-client/0.1.84", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
84
84
  requestType: "file",
85
85
  duplex: _maybeEncodedRequest.duplex,
86
86
  body: _maybeEncodedRequest.body,
@@ -155,7 +155,7 @@ class Files {
155
155
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
156
156
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/files`),
157
157
  method: "GET",
158
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.83", "User-Agent": "@letta-ai/letta-client/0.1.83", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
158
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.84", "User-Agent": "@letta-ai/letta-client/0.1.84", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
159
159
  contentType: "application/json",
160
160
  queryParameters: _queryParams,
161
161
  requestType: "json",
@@ -222,7 +222,7 @@ class Files {
222
222
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
223
223
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/${encodeURIComponent(fileId)}`),
224
224
  method: "DELETE",
225
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.83", "User-Agent": "@letta-ai/letta-client/0.1.83", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
225
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.84", "User-Agent": "@letta-ai/letta-client/0.1.84", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
226
226
  contentType: "application/json",
227
227
  requestType: "json",
228
228
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -76,7 +76,7 @@ class Passages {
76
76
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
77
77
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/passages`),
78
78
  method: "GET",
79
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.83", "User-Agent": "@letta-ai/letta-client/0.1.83", "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.84", "User-Agent": "@letta-ai/letta-client/0.1.84", "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,