@letta-ai/letta-client 0.1.33 → 0.1.34

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 (102) hide show
  1. package/api/resources/agents/client/Client.js +7 -7
  2. package/api/resources/agents/resources/archivalMemory/client/Client.js +3 -3
  3. package/api/resources/agents/resources/context/client/Client.js +1 -1
  4. package/api/resources/agents/resources/coreMemory/client/Client.js +6 -6
  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/sources/client/Client.js +3 -3
  8. package/api/resources/agents/resources/templates/client/Client.js +3 -3
  9. package/api/resources/agents/resources/tools/client/Client.js +3 -3
  10. package/api/resources/blocks/client/Client.js +6 -6
  11. package/api/resources/health/client/Client.js +1 -1
  12. package/api/resources/identities/client/Client.d.ts +65 -0
  13. package/api/resources/identities/client/Client.js +330 -1
  14. package/api/resources/identities/client/requests/CreateIdentityRequest.d.ts +18 -0
  15. package/api/resources/identities/client/requests/CreateIdentityRequest.js +5 -0
  16. package/api/resources/identities/client/requests/IdentityUpdate.d.ts +16 -0
  17. package/api/resources/identities/client/requests/IdentityUpdate.js +5 -0
  18. package/api/resources/identities/client/requests/UpsertIdentityRequest.d.ts +18 -0
  19. package/api/resources/identities/client/requests/UpsertIdentityRequest.js +5 -0
  20. package/api/resources/identities/client/requests/index.d.ts +3 -0
  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 +6 -6
  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 +11 -11
  32. package/api/types/Identity.d.ts +1 -1
  33. package/api/types/IdentityCreate.d.ts +16 -0
  34. package/api/types/IdentityCreate.js +5 -0
  35. package/api/types/index.d.ts +1 -0
  36. package/api/types/index.js +1 -0
  37. package/dist/api/resources/agents/client/Client.js +7 -7
  38. package/dist/api/resources/agents/resources/archivalMemory/client/Client.js +3 -3
  39. package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
  40. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +6 -6
  41. package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  42. package/dist/api/resources/agents/resources/messages/client/Client.js +5 -5
  43. package/dist/api/resources/agents/resources/sources/client/Client.js +3 -3
  44. package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
  45. package/dist/api/resources/agents/resources/tools/client/Client.js +3 -3
  46. package/dist/api/resources/blocks/client/Client.js +6 -6
  47. package/dist/api/resources/health/client/Client.js +1 -1
  48. package/dist/api/resources/identities/client/Client.d.ts +65 -0
  49. package/dist/api/resources/identities/client/Client.js +330 -1
  50. package/dist/api/resources/identities/client/requests/CreateIdentityRequest.d.ts +18 -0
  51. package/dist/api/resources/identities/client/requests/CreateIdentityRequest.js +5 -0
  52. package/dist/api/resources/identities/client/requests/IdentityUpdate.d.ts +16 -0
  53. package/dist/api/resources/identities/client/requests/IdentityUpdate.js +5 -0
  54. package/dist/api/resources/identities/client/requests/UpsertIdentityRequest.d.ts +18 -0
  55. package/dist/api/resources/identities/client/requests/UpsertIdentityRequest.js +5 -0
  56. package/dist/api/resources/identities/client/requests/index.d.ts +3 -0
  57. package/dist/api/resources/jobs/client/Client.js +4 -4
  58. package/dist/api/resources/models/client/Client.js +2 -2
  59. package/dist/api/resources/providers/client/Client.js +4 -4
  60. package/dist/api/resources/runs/client/Client.js +6 -6
  61. package/dist/api/resources/sources/client/Client.js +6 -6
  62. package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
  63. package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
  64. package/dist/api/resources/steps/client/Client.js +2 -2
  65. package/dist/api/resources/tag/client/Client.js +1 -1
  66. package/dist/api/resources/templates/client/Client.js +1 -1
  67. package/dist/api/resources/tools/client/Client.js +11 -11
  68. package/dist/api/types/Identity.d.ts +1 -1
  69. package/dist/api/types/IdentityCreate.d.ts +16 -0
  70. package/dist/api/types/IdentityCreate.js +5 -0
  71. package/dist/api/types/index.d.ts +1 -0
  72. package/dist/api/types/index.js +1 -0
  73. package/dist/serialization/resources/identities/client/index.d.ts +1 -0
  74. package/dist/serialization/resources/identities/client/index.js +4 -0
  75. package/dist/serialization/resources/identities/client/requests/IdentityUpdate.d.ts +15 -0
  76. package/dist/serialization/resources/identities/client/requests/IdentityUpdate.js +46 -0
  77. package/dist/serialization/resources/identities/client/requests/index.d.ts +1 -0
  78. package/dist/serialization/resources/identities/client/requests/index.js +5 -0
  79. package/dist/serialization/resources/index.d.ts +1 -0
  80. package/dist/serialization/resources/index.js +1 -0
  81. package/dist/serialization/types/IdentityCreate.d.ts +17 -0
  82. package/dist/serialization/types/IdentityCreate.js +48 -0
  83. package/dist/serialization/types/index.d.ts +1 -0
  84. package/dist/serialization/types/index.js +1 -0
  85. package/dist/version.d.ts +1 -1
  86. package/dist/version.js +1 -1
  87. package/package.json +1 -1
  88. package/reference.md +275 -0
  89. package/serialization/resources/identities/client/index.d.ts +1 -0
  90. package/serialization/resources/identities/client/index.js +4 -0
  91. package/serialization/resources/identities/client/requests/IdentityUpdate.d.ts +15 -0
  92. package/serialization/resources/identities/client/requests/IdentityUpdate.js +46 -0
  93. package/serialization/resources/identities/client/requests/index.d.ts +1 -0
  94. package/serialization/resources/identities/client/requests/index.js +5 -0
  95. package/serialization/resources/index.d.ts +1 -0
  96. package/serialization/resources/index.js +1 -0
  97. package/serialization/types/IdentityCreate.d.ts +17 -0
  98. package/serialization/types/IdentityCreate.js +48 -0
  99. package/serialization/types/index.d.ts +1 -0
  100. package/serialization/types/index.js +1 -0
  101. package/version.d.ts +1 -1
  102. package/version.js +1 -1
@@ -96,7 +96,7 @@ class Identities {
96
96
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
97
97
  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/"),
98
98
  method: "GET",
99
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "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),
99
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "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),
100
100
  contentType: "application/json",
101
101
  queryParameters: _queryParams,
102
102
  requestType: "json",
@@ -145,6 +145,335 @@ class Identities {
145
145
  }
146
146
  });
147
147
  }
148
+ /**
149
+ * @param {Letta.CreateIdentityRequest} request
150
+ * @param {Identities.RequestOptions} requestOptions - Request-specific configuration.
151
+ *
152
+ * @throws {@link Letta.UnprocessableEntityError}
153
+ *
154
+ * @example
155
+ * await client.identities.createIdentity({
156
+ * body: {
157
+ * identifierKey: "identifier_key",
158
+ * name: "name",
159
+ * identityType: "org"
160
+ * }
161
+ * })
162
+ */
163
+ createIdentity(request, requestOptions) {
164
+ return __awaiter(this, void 0, void 0, function* () {
165
+ var _a, _b, _c;
166
+ const { projectSlug, body: _body } = request;
167
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
168
+ 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/"),
169
+ method: "POST",
170
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "project-slug": projectSlug != null ? projectSlug : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
171
+ contentType: "application/json",
172
+ requestType: "json",
173
+ body: serializers.IdentityCreate.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
174
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
175
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
176
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
177
+ });
178
+ if (_response.ok) {
179
+ return serializers.Identity.parseOrThrow(_response.body, {
180
+ unrecognizedObjectKeys: "passthrough",
181
+ allowUnrecognizedUnionMembers: true,
182
+ allowUnrecognizedEnumValues: true,
183
+ skipValidation: true,
184
+ breadcrumbsPrefix: ["response"],
185
+ });
186
+ }
187
+ if (_response.error.reason === "status-code") {
188
+ switch (_response.error.statusCode) {
189
+ case 422:
190
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
191
+ unrecognizedObjectKeys: "passthrough",
192
+ allowUnrecognizedUnionMembers: true,
193
+ allowUnrecognizedEnumValues: true,
194
+ skipValidation: true,
195
+ breadcrumbsPrefix: ["response"],
196
+ }));
197
+ default:
198
+ throw new errors.LettaError({
199
+ statusCode: _response.error.statusCode,
200
+ body: _response.error.body,
201
+ });
202
+ }
203
+ }
204
+ switch (_response.error.reason) {
205
+ case "non-json":
206
+ throw new errors.LettaError({
207
+ statusCode: _response.error.statusCode,
208
+ body: _response.error.rawBody,
209
+ });
210
+ case "timeout":
211
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/identities/.");
212
+ case "unknown":
213
+ throw new errors.LettaError({
214
+ message: _response.error.errorMessage,
215
+ });
216
+ }
217
+ });
218
+ }
219
+ /**
220
+ * @param {Letta.UpsertIdentityRequest} request
221
+ * @param {Identities.RequestOptions} requestOptions - Request-specific configuration.
222
+ *
223
+ * @throws {@link Letta.UnprocessableEntityError}
224
+ *
225
+ * @example
226
+ * await client.identities.upsertIdentity({
227
+ * body: {
228
+ * identifierKey: "identifier_key",
229
+ * name: "name",
230
+ * identityType: "org"
231
+ * }
232
+ * })
233
+ */
234
+ upsertIdentity(request, requestOptions) {
235
+ return __awaiter(this, void 0, void 0, function* () {
236
+ var _a, _b, _c;
237
+ const { projectSlug, body: _body } = request;
238
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
239
+ 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/"),
240
+ method: "PUT",
241
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "project-slug": projectSlug != null ? projectSlug : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
242
+ contentType: "application/json",
243
+ requestType: "json",
244
+ body: serializers.IdentityCreate.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
245
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
246
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
247
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
248
+ });
249
+ if (_response.ok) {
250
+ return serializers.Identity.parseOrThrow(_response.body, {
251
+ unrecognizedObjectKeys: "passthrough",
252
+ allowUnrecognizedUnionMembers: true,
253
+ allowUnrecognizedEnumValues: true,
254
+ skipValidation: true,
255
+ breadcrumbsPrefix: ["response"],
256
+ });
257
+ }
258
+ if (_response.error.reason === "status-code") {
259
+ switch (_response.error.statusCode) {
260
+ case 422:
261
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
262
+ unrecognizedObjectKeys: "passthrough",
263
+ allowUnrecognizedUnionMembers: true,
264
+ allowUnrecognizedEnumValues: true,
265
+ skipValidation: true,
266
+ breadcrumbsPrefix: ["response"],
267
+ }));
268
+ default:
269
+ throw new errors.LettaError({
270
+ statusCode: _response.error.statusCode,
271
+ body: _response.error.body,
272
+ });
273
+ }
274
+ }
275
+ switch (_response.error.reason) {
276
+ case "non-json":
277
+ throw new errors.LettaError({
278
+ statusCode: _response.error.statusCode,
279
+ body: _response.error.rawBody,
280
+ });
281
+ case "timeout":
282
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling PUT /v1/identities/.");
283
+ case "unknown":
284
+ throw new errors.LettaError({
285
+ message: _response.error.errorMessage,
286
+ });
287
+ }
288
+ });
289
+ }
290
+ /**
291
+ * @param {string} identifierKey
292
+ * @param {Identities.RequestOptions} requestOptions - Request-specific configuration.
293
+ *
294
+ * @throws {@link Letta.UnprocessableEntityError}
295
+ *
296
+ * @example
297
+ * await client.identities.getIdentityFromIdentifierKey("identifier_key")
298
+ */
299
+ getIdentityFromIdentifierKey(identifierKey, requestOptions) {
300
+ return __awaiter(this, void 0, void 0, function* () {
301
+ var _a, _b, _c;
302
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
303
+ 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(identifierKey)}`),
304
+ method: "GET",
305
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
306
+ contentType: "application/json",
307
+ requestType: "json",
308
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
309
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
310
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
311
+ });
312
+ if (_response.ok) {
313
+ return serializers.Identity.parseOrThrow(_response.body, {
314
+ unrecognizedObjectKeys: "passthrough",
315
+ allowUnrecognizedUnionMembers: true,
316
+ allowUnrecognizedEnumValues: true,
317
+ skipValidation: true,
318
+ breadcrumbsPrefix: ["response"],
319
+ });
320
+ }
321
+ if (_response.error.reason === "status-code") {
322
+ switch (_response.error.statusCode) {
323
+ case 422:
324
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
325
+ unrecognizedObjectKeys: "passthrough",
326
+ allowUnrecognizedUnionMembers: true,
327
+ allowUnrecognizedEnumValues: true,
328
+ skipValidation: true,
329
+ breadcrumbsPrefix: ["response"],
330
+ }));
331
+ default:
332
+ throw new errors.LettaError({
333
+ statusCode: _response.error.statusCode,
334
+ body: _response.error.body,
335
+ });
336
+ }
337
+ }
338
+ switch (_response.error.reason) {
339
+ case "non-json":
340
+ throw new errors.LettaError({
341
+ statusCode: _response.error.statusCode,
342
+ body: _response.error.rawBody,
343
+ });
344
+ case "timeout":
345
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/identities/{identifier_key}.");
346
+ case "unknown":
347
+ throw new errors.LettaError({
348
+ message: _response.error.errorMessage,
349
+ });
350
+ }
351
+ });
352
+ }
353
+ /**
354
+ * Delete an identity by its identifier key
355
+ *
356
+ * @param {string} identifierKey
357
+ * @param {Identities.RequestOptions} requestOptions - Request-specific configuration.
358
+ *
359
+ * @throws {@link Letta.UnprocessableEntityError}
360
+ *
361
+ * @example
362
+ * await client.identities.deleteIdentity("identifier_key")
363
+ */
364
+ deleteIdentity(identifierKey, requestOptions) {
365
+ return __awaiter(this, void 0, void 0, function* () {
366
+ var _a, _b, _c;
367
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
368
+ 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(identifierKey)}`),
369
+ method: "DELETE",
370
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "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),
371
+ contentType: "application/json",
372
+ requestType: "json",
373
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
374
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
375
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
376
+ });
377
+ if (_response.ok) {
378
+ return _response.body;
379
+ }
380
+ if (_response.error.reason === "status-code") {
381
+ switch (_response.error.statusCode) {
382
+ case 422:
383
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
384
+ unrecognizedObjectKeys: "passthrough",
385
+ allowUnrecognizedUnionMembers: true,
386
+ allowUnrecognizedEnumValues: true,
387
+ skipValidation: true,
388
+ breadcrumbsPrefix: ["response"],
389
+ }));
390
+ default:
391
+ throw new errors.LettaError({
392
+ statusCode: _response.error.statusCode,
393
+ body: _response.error.body,
394
+ });
395
+ }
396
+ }
397
+ switch (_response.error.reason) {
398
+ case "non-json":
399
+ throw new errors.LettaError({
400
+ statusCode: _response.error.statusCode,
401
+ body: _response.error.rawBody,
402
+ });
403
+ case "timeout":
404
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling DELETE /v1/identities/{identifier_key}.");
405
+ case "unknown":
406
+ throw new errors.LettaError({
407
+ message: _response.error.errorMessage,
408
+ });
409
+ }
410
+ });
411
+ }
412
+ /**
413
+ * @param {string} identifierKey
414
+ * @param {Letta.IdentityUpdate} request
415
+ * @param {Identities.RequestOptions} requestOptions - Request-specific configuration.
416
+ *
417
+ * @throws {@link Letta.UnprocessableEntityError}
418
+ *
419
+ * @example
420
+ * await client.identities.updateIdentity("identifier_key")
421
+ */
422
+ updateIdentity(identifierKey_1) {
423
+ return __awaiter(this, arguments, void 0, function* (identifierKey, request = {}, requestOptions) {
424
+ var _a, _b, _c;
425
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
426
+ 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(identifierKey)}`),
427
+ method: "PATCH",
428
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "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),
429
+ contentType: "application/json",
430
+ requestType: "json",
431
+ body: serializers.IdentityUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
432
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
433
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
434
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
435
+ });
436
+ if (_response.ok) {
437
+ return serializers.Identity.parseOrThrow(_response.body, {
438
+ unrecognizedObjectKeys: "passthrough",
439
+ allowUnrecognizedUnionMembers: true,
440
+ allowUnrecognizedEnumValues: true,
441
+ skipValidation: true,
442
+ breadcrumbsPrefix: ["response"],
443
+ });
444
+ }
445
+ if (_response.error.reason === "status-code") {
446
+ switch (_response.error.statusCode) {
447
+ case 422:
448
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
449
+ unrecognizedObjectKeys: "passthrough",
450
+ allowUnrecognizedUnionMembers: true,
451
+ allowUnrecognizedEnumValues: true,
452
+ skipValidation: true,
453
+ breadcrumbsPrefix: ["response"],
454
+ }));
455
+ default:
456
+ throw new errors.LettaError({
457
+ statusCode: _response.error.statusCode,
458
+ body: _response.error.body,
459
+ });
460
+ }
461
+ }
462
+ switch (_response.error.reason) {
463
+ case "non-json":
464
+ throw new errors.LettaError({
465
+ statusCode: _response.error.statusCode,
466
+ body: _response.error.rawBody,
467
+ });
468
+ case "timeout":
469
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/identities/{identifier_key}.");
470
+ case "unknown":
471
+ throw new errors.LettaError({
472
+ message: _response.error.errorMessage,
473
+ });
474
+ }
475
+ });
476
+ }
148
477
  _getCustomAuthorizationHeaders() {
149
478
  return __awaiter(this, void 0, void 0, function* () {
150
479
  const tokenValue = yield core.Supplier.get(this._options.token);
@@ -0,0 +1,18 @@
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
+ * body: {
9
+ * identifierKey: "identifier_key",
10
+ * name: "name",
11
+ * identityType: "org"
12
+ * }
13
+ * }
14
+ */
15
+ export interface CreateIdentityRequest {
16
+ projectSlug?: string;
17
+ body: Letta.IdentityCreate;
18
+ }
@@ -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,16 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Letta from "../../../../index";
5
+ /**
6
+ * @example
7
+ * {}
8
+ */
9
+ export interface IdentityUpdate {
10
+ /** The name of the identity. */
11
+ name?: string;
12
+ /** The type of the identity. */
13
+ identityType?: Letta.IdentityType;
14
+ /** The agent ids that are associated with the identity. */
15
+ agentIds?: string[];
16
+ }
@@ -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,18 @@
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
+ * body: {
9
+ * identifierKey: "identifier_key",
10
+ * name: "name",
11
+ * identityType: "org"
12
+ * }
13
+ * }
14
+ */
15
+ export interface UpsertIdentityRequest {
16
+ projectSlug?: string;
17
+ body: Letta.IdentityCreate;
18
+ }
@@ -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 +1,4 @@
1
1
  export { type ListIdentitiesRequest } from "./ListIdentitiesRequest";
2
+ export { type CreateIdentityRequest } from "./CreateIdentityRequest";
3
+ export { type UpsertIdentityRequest } from "./UpsertIdentityRequest";
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.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "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.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "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.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "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.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "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.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "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.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "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.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "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.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "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.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "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.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "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.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "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.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "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.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "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.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "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.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "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.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "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.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "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.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "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.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "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.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "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" }),
@@ -75,7 +75,7 @@ class Runs {
75
75
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
76
76
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/runs/"),
77
77
  method: "GET",
78
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
78
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
79
79
  contentType: "application/json",
80
80
  requestType: "json",
81
81
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -139,7 +139,7 @@ class Runs {
139
139
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
140
140
  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"),
141
141
  method: "GET",
142
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "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),
142
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "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),
143
143
  contentType: "application/json",
144
144
  requestType: "json",
145
145
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -204,7 +204,7 @@ class Runs {
204
204
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
205
205
  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)}`),
206
206
  method: "GET",
207
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "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),
207
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "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),
208
208
  contentType: "application/json",
209
209
  requestType: "json",
210
210
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -269,7 +269,7 @@ class Runs {
269
269
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
270
270
  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)}`),
271
271
  method: "DELETE",
272
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "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),
272
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "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),
273
273
  contentType: "application/json",
274
274
  requestType: "json",
275
275
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -365,7 +365,7 @@ class Runs {
365
365
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
366
366
  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`),
367
367
  method: "GET",
368
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "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),
368
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "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),
369
369
  contentType: "application/json",
370
370
  queryParameters: _queryParams,
371
371
  requestType: "json",
@@ -431,7 +431,7 @@ class Runs {
431
431
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
432
432
  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`),
433
433
  method: "GET",
434
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "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),
434
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "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),
435
435
  contentType: "application/json",
436
436
  requestType: "json",
437
437
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,