@letta-ai/letta-client 0.1.142 → 0.1.144

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 (215) hide show
  1. package/Client.d.ts +4 -0
  2. package/README.md +1 -1
  3. package/api/resources/agents/client/Client.d.ts +4 -0
  4. package/api/resources/agents/client/Client.js +31 -23
  5. package/api/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -2
  6. package/api/resources/agents/resources/blocks/client/Client.d.ts +4 -0
  7. package/api/resources/agents/resources/blocks/client/Client.js +15 -5
  8. package/api/resources/agents/resources/context/client/Client.d.ts +4 -0
  9. package/api/resources/agents/resources/context/client/Client.js +3 -1
  10. package/api/resources/agents/resources/coreMemory/client/Client.d.ts +4 -0
  11. package/api/resources/agents/resources/coreMemory/client/Client.js +3 -1
  12. package/api/resources/agents/resources/groups/client/Client.d.ts +4 -0
  13. package/api/resources/agents/resources/groups/client/Client.js +3 -1
  14. package/api/resources/agents/resources/memoryVariables/client/Client.d.ts +4 -0
  15. package/api/resources/agents/resources/memoryVariables/client/Client.js +3 -1
  16. package/api/resources/agents/resources/messages/client/Client.d.ts +4 -0
  17. package/api/resources/agents/resources/messages/client/Client.js +18 -6
  18. package/api/resources/agents/resources/passages/client/Client.d.ts +4 -0
  19. package/api/resources/agents/resources/passages/client/Client.js +12 -4
  20. package/api/resources/agents/resources/sources/client/Client.d.ts +4 -0
  21. package/api/resources/agents/resources/sources/client/Client.js +9 -3
  22. package/api/resources/agents/resources/templates/client/Client.d.ts +4 -0
  23. package/api/resources/agents/resources/templates/client/Client.js +9 -3
  24. package/api/resources/agents/resources/tools/client/Client.d.ts +4 -0
  25. package/api/resources/agents/resources/tools/client/Client.js +9 -3
  26. package/api/resources/batches/client/Client.d.ts +4 -0
  27. package/api/resources/batches/client/Client.js +12 -4
  28. package/api/resources/blocks/client/Client.d.ts +4 -0
  29. package/api/resources/blocks/client/Client.js +18 -6
  30. package/api/resources/blocks/resources/agents/client/Client.d.ts +4 -0
  31. package/api/resources/blocks/resources/agents/client/Client.js +3 -1
  32. package/api/resources/clientSideAccessTokens/client/Client.d.ts +4 -0
  33. package/api/resources/clientSideAccessTokens/client/Client.js +6 -2
  34. package/api/resources/embeddingModels/client/Client.d.ts +4 -0
  35. package/api/resources/embeddingModels/client/Client.js +3 -1
  36. package/api/resources/groups/client/Client.d.ts +4 -0
  37. package/api/resources/groups/client/Client.js +20 -21
  38. package/api/resources/groups/client/requests/GroupCreate.d.ts +0 -1
  39. package/api/resources/groups/client/requests/GroupUpdate.d.ts +0 -1
  40. package/api/resources/groups/resources/messages/client/Client.d.ts +4 -0
  41. package/api/resources/groups/resources/messages/client/Client.js +15 -5
  42. package/api/resources/health/client/Client.d.ts +4 -0
  43. package/api/resources/health/client/Client.js +3 -1
  44. package/api/resources/identities/client/Client.d.ts +4 -0
  45. package/api/resources/identities/client/Client.js +23 -22
  46. package/api/resources/identities/client/requests/IdentityCreate.d.ts +0 -1
  47. package/api/resources/identities/client/requests/IdentityUpsert.d.ts +0 -1
  48. package/api/resources/identities/resources/properties/client/Client.d.ts +4 -0
  49. package/api/resources/identities/resources/properties/client/Client.js +3 -1
  50. package/api/resources/jobs/client/Client.d.ts +4 -0
  51. package/api/resources/jobs/client/Client.js +12 -4
  52. package/api/resources/messages/client/Client.d.ts +4 -0
  53. package/api/resources/messages/client/Client.js +3 -1
  54. package/api/resources/models/client/Client.d.ts +4 -0
  55. package/api/resources/models/client/Client.js +3 -1
  56. package/api/resources/projects/client/Client.d.ts +4 -0
  57. package/api/resources/projects/client/Client.js +3 -1
  58. package/api/resources/providers/client/Client.d.ts +4 -0
  59. package/api/resources/providers/client/Client.js +15 -5
  60. package/api/resources/runs/client/Client.d.ts +4 -0
  61. package/api/resources/runs/client/Client.js +12 -4
  62. package/api/resources/runs/resources/messages/client/Client.d.ts +4 -0
  63. package/api/resources/runs/resources/messages/client/Client.js +3 -1
  64. package/api/resources/runs/resources/steps/client/Client.d.ts +4 -0
  65. package/api/resources/runs/resources/steps/client/Client.js +3 -1
  66. package/api/resources/runs/resources/usage/client/Client.d.ts +4 -0
  67. package/api/resources/runs/resources/usage/client/Client.js +3 -1
  68. package/api/resources/sources/client/Client.d.ts +4 -0
  69. package/api/resources/sources/client/Client.js +24 -8
  70. package/api/resources/sources/resources/files/client/Client.d.ts +4 -0
  71. package/api/resources/sources/resources/files/client/Client.js +9 -3
  72. package/api/resources/sources/resources/passages/client/Client.d.ts +4 -0
  73. package/api/resources/sources/resources/passages/client/Client.js +3 -1
  74. package/api/resources/steps/client/Client.d.ts +4 -13
  75. package/api/resources/steps/client/Client.js +10 -75
  76. package/api/resources/steps/client/requests/StepsListRequest.d.ts +4 -0
  77. package/api/resources/steps/client/requests/index.d.ts +0 -1
  78. package/api/resources/steps/resources/feedback/client/Client.d.ts +12 -2
  79. package/api/resources/steps/resources/feedback/client/Client.js +43 -11
  80. package/api/resources/steps/resources/feedback/client/index.d.ts +1 -1
  81. package/api/resources/steps/resources/feedback/client/index.js +15 -0
  82. package/api/resources/steps/{client/requests/AddFeedbackRequest.d.ts → resources/feedback/client/requests/FeedbackCreateRequest.d.ts} +2 -2
  83. package/api/resources/steps/resources/feedback/client/requests/index.d.ts +1 -0
  84. package/api/resources/steps/resources/feedback/client/requests/index.js +2 -0
  85. package/api/resources/steps/resources/index.d.ts +1 -0
  86. package/api/resources/steps/resources/index.js +4 -0
  87. package/api/resources/tags/client/Client.d.ts +4 -0
  88. package/api/resources/tags/client/Client.js +3 -1
  89. package/api/resources/telemetry/client/Client.d.ts +4 -0
  90. package/api/resources/telemetry/client/Client.js +3 -1
  91. package/api/resources/templates/client/Client.d.ts +4 -0
  92. package/api/resources/templates/client/Client.js +3 -1
  93. package/api/resources/templates/resources/agents/client/Client.d.ts +4 -0
  94. package/api/resources/templates/resources/agents/client/Client.js +3 -1
  95. package/api/resources/tools/client/Client.d.ts +4 -0
  96. package/api/resources/tools/client/Client.js +57 -19
  97. package/api/resources/voice/client/Client.d.ts +4 -0
  98. package/api/resources/voice/client/Client.js +3 -1
  99. package/dist/Client.d.ts +4 -0
  100. package/dist/api/resources/agents/client/Client.d.ts +4 -0
  101. package/dist/api/resources/agents/client/Client.js +31 -23
  102. package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -2
  103. package/dist/api/resources/agents/resources/blocks/client/Client.d.ts +4 -0
  104. package/dist/api/resources/agents/resources/blocks/client/Client.js +15 -5
  105. package/dist/api/resources/agents/resources/context/client/Client.d.ts +4 -0
  106. package/dist/api/resources/agents/resources/context/client/Client.js +3 -1
  107. package/dist/api/resources/agents/resources/coreMemory/client/Client.d.ts +4 -0
  108. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +3 -1
  109. package/dist/api/resources/agents/resources/groups/client/Client.d.ts +4 -0
  110. package/dist/api/resources/agents/resources/groups/client/Client.js +3 -1
  111. package/dist/api/resources/agents/resources/memoryVariables/client/Client.d.ts +4 -0
  112. package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +3 -1
  113. package/dist/api/resources/agents/resources/messages/client/Client.d.ts +4 -0
  114. package/dist/api/resources/agents/resources/messages/client/Client.js +18 -6
  115. package/dist/api/resources/agents/resources/passages/client/Client.d.ts +4 -0
  116. package/dist/api/resources/agents/resources/passages/client/Client.js +12 -4
  117. package/dist/api/resources/agents/resources/sources/client/Client.d.ts +4 -0
  118. package/dist/api/resources/agents/resources/sources/client/Client.js +9 -3
  119. package/dist/api/resources/agents/resources/templates/client/Client.d.ts +4 -0
  120. package/dist/api/resources/agents/resources/templates/client/Client.js +9 -3
  121. package/dist/api/resources/agents/resources/tools/client/Client.d.ts +4 -0
  122. package/dist/api/resources/agents/resources/tools/client/Client.js +9 -3
  123. package/dist/api/resources/batches/client/Client.d.ts +4 -0
  124. package/dist/api/resources/batches/client/Client.js +12 -4
  125. package/dist/api/resources/blocks/client/Client.d.ts +4 -0
  126. package/dist/api/resources/blocks/client/Client.js +18 -6
  127. package/dist/api/resources/blocks/resources/agents/client/Client.d.ts +4 -0
  128. package/dist/api/resources/blocks/resources/agents/client/Client.js +3 -1
  129. package/dist/api/resources/clientSideAccessTokens/client/Client.d.ts +4 -0
  130. package/dist/api/resources/clientSideAccessTokens/client/Client.js +6 -2
  131. package/dist/api/resources/embeddingModels/client/Client.d.ts +4 -0
  132. package/dist/api/resources/embeddingModels/client/Client.js +3 -1
  133. package/dist/api/resources/groups/client/Client.d.ts +4 -0
  134. package/dist/api/resources/groups/client/Client.js +20 -21
  135. package/dist/api/resources/groups/client/requests/GroupCreate.d.ts +0 -1
  136. package/dist/api/resources/groups/client/requests/GroupUpdate.d.ts +0 -1
  137. package/dist/api/resources/groups/resources/messages/client/Client.d.ts +4 -0
  138. package/dist/api/resources/groups/resources/messages/client/Client.js +15 -5
  139. package/dist/api/resources/health/client/Client.d.ts +4 -0
  140. package/dist/api/resources/health/client/Client.js +3 -1
  141. package/dist/api/resources/identities/client/Client.d.ts +4 -0
  142. package/dist/api/resources/identities/client/Client.js +23 -22
  143. package/dist/api/resources/identities/client/requests/IdentityCreate.d.ts +0 -1
  144. package/dist/api/resources/identities/client/requests/IdentityUpsert.d.ts +0 -1
  145. package/dist/api/resources/identities/resources/properties/client/Client.d.ts +4 -0
  146. package/dist/api/resources/identities/resources/properties/client/Client.js +3 -1
  147. package/dist/api/resources/jobs/client/Client.d.ts +4 -0
  148. package/dist/api/resources/jobs/client/Client.js +12 -4
  149. package/dist/api/resources/messages/client/Client.d.ts +4 -0
  150. package/dist/api/resources/messages/client/Client.js +3 -1
  151. package/dist/api/resources/models/client/Client.d.ts +4 -0
  152. package/dist/api/resources/models/client/Client.js +3 -1
  153. package/dist/api/resources/projects/client/Client.d.ts +4 -0
  154. package/dist/api/resources/projects/client/Client.js +3 -1
  155. package/dist/api/resources/providers/client/Client.d.ts +4 -0
  156. package/dist/api/resources/providers/client/Client.js +15 -5
  157. package/dist/api/resources/runs/client/Client.d.ts +4 -0
  158. package/dist/api/resources/runs/client/Client.js +12 -4
  159. package/dist/api/resources/runs/resources/messages/client/Client.d.ts +4 -0
  160. package/dist/api/resources/runs/resources/messages/client/Client.js +3 -1
  161. package/dist/api/resources/runs/resources/steps/client/Client.d.ts +4 -0
  162. package/dist/api/resources/runs/resources/steps/client/Client.js +3 -1
  163. package/dist/api/resources/runs/resources/usage/client/Client.d.ts +4 -0
  164. package/dist/api/resources/runs/resources/usage/client/Client.js +3 -1
  165. package/dist/api/resources/sources/client/Client.d.ts +4 -0
  166. package/dist/api/resources/sources/client/Client.js +24 -8
  167. package/dist/api/resources/sources/resources/files/client/Client.d.ts +4 -0
  168. package/dist/api/resources/sources/resources/files/client/Client.js +9 -3
  169. package/dist/api/resources/sources/resources/passages/client/Client.d.ts +4 -0
  170. package/dist/api/resources/sources/resources/passages/client/Client.js +3 -1
  171. package/dist/api/resources/steps/client/Client.d.ts +4 -13
  172. package/dist/api/resources/steps/client/Client.js +10 -75
  173. package/dist/api/resources/steps/client/requests/StepsListRequest.d.ts +4 -0
  174. package/dist/api/resources/steps/client/requests/index.d.ts +0 -1
  175. package/dist/api/resources/steps/resources/feedback/client/Client.d.ts +12 -2
  176. package/dist/api/resources/steps/resources/feedback/client/Client.js +43 -11
  177. package/dist/api/resources/steps/resources/feedback/client/index.d.ts +1 -1
  178. package/dist/api/resources/steps/resources/feedback/client/index.js +15 -0
  179. package/dist/api/resources/steps/{client/requests/AddFeedbackRequest.d.ts → resources/feedback/client/requests/FeedbackCreateRequest.d.ts} +2 -2
  180. package/dist/api/resources/steps/resources/feedback/client/requests/index.d.ts +1 -0
  181. package/dist/api/resources/steps/resources/feedback/client/requests/index.js +2 -0
  182. package/dist/api/resources/steps/resources/index.d.ts +1 -0
  183. package/dist/api/resources/steps/resources/index.js +4 -0
  184. package/dist/api/resources/tags/client/Client.d.ts +4 -0
  185. package/dist/api/resources/tags/client/Client.js +3 -1
  186. package/dist/api/resources/telemetry/client/Client.d.ts +4 -0
  187. package/dist/api/resources/telemetry/client/Client.js +3 -1
  188. package/dist/api/resources/templates/client/Client.d.ts +4 -0
  189. package/dist/api/resources/templates/client/Client.js +3 -1
  190. package/dist/api/resources/templates/resources/agents/client/Client.d.ts +4 -0
  191. package/dist/api/resources/templates/resources/agents/client/Client.js +3 -1
  192. package/dist/api/resources/tools/client/Client.d.ts +4 -0
  193. package/dist/api/resources/tools/client/Client.js +57 -19
  194. package/dist/api/resources/voice/client/Client.d.ts +4 -0
  195. package/dist/api/resources/voice/client/Client.js +3 -1
  196. package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -1
  197. package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.js +1 -1
  198. package/dist/serialization/resources/groups/client/requests/GroupCreate.d.ts +1 -1
  199. package/dist/serialization/resources/groups/client/requests/GroupUpdate.d.ts +1 -1
  200. package/dist/serialization/resources/identities/client/requests/IdentityCreate.d.ts +1 -1
  201. package/dist/serialization/resources/identities/client/requests/IdentityUpsert.d.ts +1 -1
  202. package/dist/version.d.ts +1 -1
  203. package/dist/version.js +1 -1
  204. package/package.json +1 -1
  205. package/reference.md +25 -73
  206. package/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -1
  207. package/serialization/resources/agents/client/requests/CreateAgentRequest.js +1 -1
  208. package/serialization/resources/groups/client/requests/GroupCreate.d.ts +1 -1
  209. package/serialization/resources/groups/client/requests/GroupUpdate.d.ts +1 -1
  210. package/serialization/resources/identities/client/requests/IdentityCreate.d.ts +1 -1
  211. package/serialization/resources/identities/client/requests/IdentityUpsert.d.ts +1 -1
  212. package/version.d.ts +1 -1
  213. package/version.js +1 -1
  214. /package/api/resources/steps/{client/requests/AddFeedbackRequest.js → resources/feedback/client/requests/FeedbackCreateRequest.js} +0 -0
  215. /package/dist/api/resources/steps/{client/requests/AddFeedbackRequest.js → resources/feedback/client/requests/FeedbackCreateRequest.js} +0 -0
@@ -44,17 +44,6 @@ 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
- };
58
47
  var __importDefault = (this && this.__importDefault) || function (mod) {
59
48
  return (mod && mod.__esModule) ? mod : { "default": mod };
60
49
  };
@@ -109,7 +98,9 @@ class Groups {
109
98
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
110
99
  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/groups/"),
111
100
  method: "GET",
112
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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),
101
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
102
+ ? yield core.Supplier.get(this._options.project)
103
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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
104
  contentType: "application/json",
114
105
  queryParameters: _queryParams,
115
106
  requestType: "json",
@@ -175,14 +166,15 @@ class Groups {
175
166
  create(request, requestOptions) {
176
167
  return __awaiter(this, void 0, void 0, function* () {
177
168
  var _a, _b, _c;
178
- const { project } = request, _body = __rest(request, ["project"]);
179
169
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
180
170
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/groups/"),
181
171
  method: "POST",
182
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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),
172
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
173
+ ? yield core.Supplier.get(this._options.project)
174
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
183
175
  contentType: "application/json",
184
176
  requestType: "json",
185
- body: serializers.GroupCreate.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
177
+ body: serializers.GroupCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
186
178
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
187
179
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
188
180
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -244,7 +236,9 @@ class Groups {
244
236
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
245
237
  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/groups/count"),
246
238
  method: "GET",
247
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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),
239
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
240
+ ? yield core.Supplier.get(this._options.project)
241
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
248
242
  contentType: "application/json",
249
243
  requestType: "json",
250
244
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -309,7 +303,9 @@ class Groups {
309
303
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
310
304
  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/groups/${encodeURIComponent(groupId)}`),
311
305
  method: "GET",
312
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
307
+ ? yield core.Supplier.get(this._options.project)
308
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
313
309
  contentType: "application/json",
314
310
  requestType: "json",
315
311
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -374,7 +370,9 @@ class Groups {
374
370
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
375
371
  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/groups/${encodeURIComponent(groupId)}`),
376
372
  method: "DELETE",
377
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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),
373
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
374
+ ? yield core.Supplier.get(this._options.project)
375
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
378
376
  contentType: "application/json",
379
377
  requestType: "json",
380
378
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -431,14 +429,15 @@ class Groups {
431
429
  modify(groupId_1) {
432
430
  return __awaiter(this, arguments, void 0, function* (groupId, request = {}, requestOptions) {
433
431
  var _a, _b, _c;
434
- const { project } = request, _body = __rest(request, ["project"]);
435
432
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
436
433
  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/groups/${encodeURIComponent(groupId)}`),
437
434
  method: "PATCH",
438
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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),
435
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
436
+ ? yield core.Supplier.get(this._options.project)
437
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
439
438
  contentType: "application/json",
440
439
  requestType: "json",
441
- body: serializers.GroupUpdate.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
440
+ body: serializers.GroupUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
442
441
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
443
442
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
444
443
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -10,7 +10,6 @@ import * as Letta from "../../../../index";
10
10
  * }
11
11
  */
12
12
  export interface GroupCreate {
13
- project?: string;
14
13
  /** */
15
14
  agentIds: string[];
16
15
  /** */
@@ -7,7 +7,6 @@ import * as Letta from "../../../../index";
7
7
  * {}
8
8
  */
9
9
  export interface GroupUpdate {
10
- project?: string;
11
10
  /** */
12
11
  agentIds?: string[];
13
12
  /** */
@@ -10,6 +10,8 @@ export declare namespace Messages {
10
10
  /** Specify a custom URL to connect the client to. */
11
11
  baseUrl?: core.Supplier<string>;
12
12
  token?: core.Supplier<string | undefined>;
13
+ /** Override the X-Project header */
14
+ project?: core.Supplier<string | undefined>;
13
15
  fetcher?: core.FetchFunction;
14
16
  }
15
17
  interface RequestOptions {
@@ -19,6 +21,8 @@ export declare namespace Messages {
19
21
  maxRetries?: number;
20
22
  /** A hook to abort the request. */
21
23
  abortSignal?: AbortSignal;
24
+ /** Override the X-Project header */
25
+ project?: string | undefined;
22
26
  /** Additional headers to include in the request. */
23
27
  headers?: Record<string, string>;
24
28
  }
@@ -97,7 +97,9 @@ class Messages {
97
97
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
98
98
  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/groups/${encodeURIComponent(groupId)}/messages`),
99
99
  method: "GET",
100
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
101
+ ? yield core.Supplier.get(this._options.project)
102
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
101
103
  contentType: "application/json",
102
104
  queryParameters: _queryParams,
103
105
  requestType: "json",
@@ -173,7 +175,9 @@ class Messages {
173
175
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
174
176
  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/groups/${encodeURIComponent(groupId)}/messages`),
175
177
  method: "POST",
176
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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),
178
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
179
+ ? yield core.Supplier.get(this._options.project)
180
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
177
181
  contentType: "application/json",
178
182
  requestType: "json",
179
183
  body: serializers.LettaRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -233,7 +237,9 @@ class Messages {
233
237
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
234
238
  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/groups/${encodeURIComponent(groupId)}/messages/stream`),
235
239
  method: "POST",
236
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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),
240
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
241
+ ? yield core.Supplier.get(this._options.project)
242
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
237
243
  contentType: "application/json",
238
244
  requestType: "json",
239
245
  body: serializers.LettaStreamingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -314,7 +320,9 @@ class Messages {
314
320
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
315
321
  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/groups/${encodeURIComponent(groupId)}/messages/${encodeURIComponent(messageId)}`),
316
322
  method: "PATCH",
317
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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),
323
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
324
+ ? yield core.Supplier.get(this._options.project)
325
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
318
326
  contentType: "application/json",
319
327
  requestType: "json",
320
328
  body: serializers.groups.MessagesModifyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -380,7 +388,9 @@ class Messages {
380
388
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
381
389
  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/groups/${encodeURIComponent(groupId)}/reset-messages`),
382
390
  method: "PATCH",
383
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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),
391
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
392
+ ? yield core.Supplier.get(this._options.project)
393
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
384
394
  contentType: "application/json",
385
395
  requestType: "json",
386
396
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -10,6 +10,8 @@ export declare namespace Health {
10
10
  /** Specify a custom URL to connect the client to. */
11
11
  baseUrl?: core.Supplier<string>;
12
12
  token?: core.Supplier<string | undefined>;
13
+ /** Override the X-Project header */
14
+ project?: core.Supplier<string | undefined>;
13
15
  fetcher?: core.FetchFunction;
14
16
  }
15
17
  interface RequestOptions {
@@ -19,6 +21,8 @@ export declare namespace Health {
19
21
  maxRetries?: number;
20
22
  /** A hook to abort the request. */
21
23
  abortSignal?: AbortSignal;
24
+ /** Override the X-Project header */
25
+ project?: string | undefined;
22
26
  /** Additional headers to include in the request. */
23
27
  headers?: Record<string, string>;
24
28
  }
@@ -70,7 +70,9 @@ class Health {
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/health/"),
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.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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-Project": (yield core.Supplier.get(this._options.project)) != null
74
+ ? yield core.Supplier.get(this._options.project)
75
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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
76
  contentType: "application/json",
75
77
  requestType: "json",
76
78
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -11,6 +11,8 @@ export declare namespace Identities {
11
11
  /** Specify a custom URL to connect the client to. */
12
12
  baseUrl?: core.Supplier<string>;
13
13
  token?: core.Supplier<string | undefined>;
14
+ /** Override the X-Project header */
15
+ project?: core.Supplier<string | undefined>;
14
16
  fetcher?: core.FetchFunction;
15
17
  }
16
18
  interface RequestOptions {
@@ -20,6 +22,8 @@ export declare namespace Identities {
20
22
  maxRetries?: number;
21
23
  /** A hook to abort the request. */
22
24
  abortSignal?: AbortSignal;
25
+ /** Override the X-Project header */
26
+ project?: string | undefined;
23
27
  /** Additional headers to include in the request. */
24
28
  headers?: Record<string, string>;
25
29
  }
@@ -44,17 +44,6 @@ 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
- };
58
47
  var __importDefault = (this && this.__importDefault) || function (mod) {
59
48
  return (mod && mod.__esModule) ? mod : { "default": mod };
60
49
  };
@@ -115,7 +104,9 @@ class Identities {
115
104
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
116
105
  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/"),
117
106
  method: "GET",
118
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
107
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
108
+ ? yield core.Supplier.get(this._options.project)
109
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
119
110
  contentType: "application/json",
120
111
  queryParameters: _queryParams,
121
112
  requestType: "json",
@@ -180,14 +171,15 @@ class Identities {
180
171
  create(request, requestOptions) {
181
172
  return __awaiter(this, void 0, void 0, function* () {
182
173
  var _a, _b, _c;
183
- const { project } = request, _body = __rest(request, ["project"]);
184
174
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
185
175
  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/"),
186
176
  method: "POST",
187
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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),
177
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
178
+ ? yield core.Supplier.get(this._options.project)
179
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
188
180
  contentType: "application/json",
189
181
  requestType: "json",
190
- body: serializers.IdentityCreate.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
182
+ body: serializers.IdentityCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
191
183
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
192
184
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
193
185
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -249,14 +241,15 @@ class Identities {
249
241
  upsert(request, requestOptions) {
250
242
  return __awaiter(this, void 0, void 0, function* () {
251
243
  var _a, _b, _c;
252
- const { project } = request, _body = __rest(request, ["project"]);
253
244
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
254
245
  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/"),
255
246
  method: "PUT",
256
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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),
247
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
248
+ ? yield core.Supplier.get(this._options.project)
249
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
257
250
  contentType: "application/json",
258
251
  requestType: "json",
259
- body: serializers.IdentityUpsert.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
252
+ body: serializers.IdentityUpsert.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
260
253
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
261
254
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
262
255
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -318,7 +311,9 @@ class Identities {
318
311
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
319
312
  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/count"),
320
313
  method: "GET",
321
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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),
314
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
315
+ ? yield core.Supplier.get(this._options.project)
316
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
322
317
  contentType: "application/json",
323
318
  requestType: "json",
324
319
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -381,7 +376,9 @@ class Identities {
381
376
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
382
377
  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)}`),
383
378
  method: "GET",
384
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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),
379
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
380
+ ? yield core.Supplier.get(this._options.project)
381
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
385
382
  contentType: "application/json",
386
383
  requestType: "json",
387
384
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -446,7 +443,9 @@ class Identities {
446
443
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
447
444
  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)}`),
448
445
  method: "DELETE",
449
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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),
446
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
447
+ ? yield core.Supplier.get(this._options.project)
448
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
450
449
  contentType: "application/json",
451
450
  requestType: "json",
452
451
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -504,7 +503,9 @@ class Identities {
504
503
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
505
504
  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)}`),
506
505
  method: "PATCH",
507
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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),
506
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
507
+ ? yield core.Supplier.get(this._options.project)
508
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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
509
  contentType: "application/json",
509
510
  requestType: "json",
510
511
  body: serializers.IdentityUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -11,7 +11,6 @@ import * as Letta from "../../../../index";
11
11
  * }
12
12
  */
13
13
  export interface IdentityCreate {
14
- project?: string;
15
14
  /** External, user-generated identifier key of the identity. */
16
15
  identifierKey: string;
17
16
  /** The name of the identity. */
@@ -11,7 +11,6 @@ import * as Letta from "../../../../index";
11
11
  * }
12
12
  */
13
13
  export interface IdentityUpsert {
14
- project?: string;
15
14
  /** External, user-generated identifier key of the identity. */
16
15
  identifierKey: string;
17
16
  /** The name of the identity. */
@@ -10,6 +10,8 @@ export declare namespace Properties {
10
10
  /** Specify a custom URL to connect the client to. */
11
11
  baseUrl?: core.Supplier<string>;
12
12
  token?: core.Supplier<string | undefined>;
13
+ /** Override the X-Project header */
14
+ project?: core.Supplier<string | undefined>;
13
15
  fetcher?: core.FetchFunction;
14
16
  }
15
17
  interface RequestOptions {
@@ -19,6 +21,8 @@ export declare namespace Properties {
19
21
  maxRetries?: number;
20
22
  /** A hook to abort the request. */
21
23
  abortSignal?: AbortSignal;
24
+ /** Override the X-Project header */
25
+ project?: string | undefined;
22
26
  /** Additional headers to include in the request. */
23
27
  headers?: Record<string, string>;
24
28
  }
@@ -79,7 +79,9 @@ class Properties {
79
79
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
80
80
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/identities/${encodeURIComponent(identityId)}/properties`),
81
81
  method: "PUT",
82
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
82
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
83
+ ? yield core.Supplier.get(this._options.project)
84
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
83
85
  contentType: "application/json",
84
86
  requestType: "json",
85
87
  body: serializers.identities.properties.upsert.Request.jsonOrThrow(request, {
@@ -10,6 +10,8 @@ export declare namespace Jobs {
10
10
  /** Specify a custom URL to connect the client to. */
11
11
  baseUrl?: core.Supplier<string>;
12
12
  token?: core.Supplier<string | undefined>;
13
+ /** Override the X-Project header */
14
+ project?: core.Supplier<string | undefined>;
13
15
  fetcher?: core.FetchFunction;
14
16
  }
15
17
  interface RequestOptions {
@@ -19,6 +21,8 @@ export declare namespace Jobs {
19
21
  maxRetries?: number;
20
22
  /** A hook to abort the request. */
21
23
  abortSignal?: AbortSignal;
24
+ /** Override the X-Project header */
25
+ project?: string | undefined;
22
26
  /** Additional headers to include in the request. */
23
27
  headers?: Record<string, string>;
24
28
  }
@@ -81,7 +81,9 @@ 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.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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-Project": (yield core.Supplier.get(this._options.project)) != null
85
+ ? yield core.Supplier.get(this._options.project)
86
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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
87
  contentType: "application/json",
86
88
  queryParameters: _queryParams,
87
89
  requestType: "json",
@@ -152,7 +154,9 @@ class Jobs {
152
154
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
153
155
  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"),
154
156
  method: "GET",
155
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
158
+ ? yield core.Supplier.get(this._options.project)
159
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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
160
  contentType: "application/json",
157
161
  queryParameters: _queryParams,
158
162
  requestType: "json",
@@ -218,7 +222,9 @@ class Jobs {
218
222
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
219
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/jobs/${encodeURIComponent(jobId)}`),
220
224
  method: "GET",
221
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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-Project": (yield core.Supplier.get(this._options.project)) != null
226
+ ? yield core.Supplier.get(this._options.project)
227
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
222
228
  contentType: "application/json",
223
229
  requestType: "json",
224
230
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -283,7 +289,9 @@ class Jobs {
283
289
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
284
290
  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)}`),
285
291
  method: "DELETE",
286
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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),
292
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
293
+ ? yield core.Supplier.get(this._options.project)
294
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
287
295
  contentType: "application/json",
288
296
  requestType: "json",
289
297
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -10,6 +10,8 @@ export declare namespace Messages {
10
10
  /** Specify a custom URL to connect the client to. */
11
11
  baseUrl?: core.Supplier<string>;
12
12
  token?: core.Supplier<string | undefined>;
13
+ /** Override the X-Project header */
14
+ project?: core.Supplier<string | undefined>;
13
15
  fetcher?: core.FetchFunction;
14
16
  }
15
17
  interface RequestOptions {
@@ -19,6 +21,8 @@ export declare namespace Messages {
19
21
  maxRetries?: number;
20
22
  /** A hook to abort the request. */
21
23
  abortSignal?: AbortSignal;
24
+ /** Override the X-Project header */
25
+ project?: string | undefined;
22
26
  /** Additional headers to include in the request. */
23
27
  headers?: Record<string, string>;
24
28
  }
@@ -98,7 +98,9 @@ class Messages {
98
98
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
99
99
  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/messages/batches/${encodeURIComponent(batchId)}/messages`),
100
100
  method: "GET",
101
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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),
101
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
102
+ ? yield core.Supplier.get(this._options.project)
103
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
102
104
  contentType: "application/json",
103
105
  queryParameters: _queryParams,
104
106
  requestType: "json",
@@ -10,6 +10,8 @@ export declare namespace Models {
10
10
  /** Specify a custom URL to connect the client to. */
11
11
  baseUrl?: core.Supplier<string>;
12
12
  token?: core.Supplier<string | undefined>;
13
+ /** Override the X-Project header */
14
+ project?: core.Supplier<string | undefined>;
13
15
  fetcher?: core.FetchFunction;
14
16
  }
15
17
  interface RequestOptions {
@@ -19,6 +21,8 @@ export declare namespace Models {
19
21
  maxRetries?: number;
20
22
  /** A hook to abort the request. */
21
23
  abortSignal?: AbortSignal;
24
+ /** Override the X-Project header */
25
+ project?: string | undefined;
22
26
  /** Additional headers to include in the request. */
23
27
  headers?: Record<string, string>;
24
28
  }
@@ -92,7 +92,9 @@ class Models {
92
92
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
93
93
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/models/"),
94
94
  method: "GET",
95
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
95
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
96
+ ? yield core.Supplier.get(this._options.project)
97
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
96
98
  contentType: "application/json",
97
99
  queryParameters: _queryParams,
98
100
  requestType: "json",
@@ -10,6 +10,8 @@ export declare namespace Projects {
10
10
  /** Specify a custom URL to connect the client to. */
11
11
  baseUrl?: core.Supplier<string>;
12
12
  token?: core.Supplier<string | undefined>;
13
+ /** Override the X-Project header */
14
+ project?: core.Supplier<string | undefined>;
13
15
  fetcher?: core.FetchFunction;
14
16
  }
15
17
  interface RequestOptions {
@@ -19,6 +21,8 @@ export declare namespace Projects {
19
21
  maxRetries?: number;
20
22
  /** A hook to abort the request. */
21
23
  abortSignal?: AbortSignal;
24
+ /** Override the X-Project header */
25
+ project?: string | undefined;
22
26
  /** Additional headers to include in the request. */
23
27
  headers?: Record<string, string>;
24
28
  }