@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
@@ -76,7 +76,9 @@ class Usage {
76
76
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
77
77
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/runs/${encodeURIComponent(runId)}/usage`),
78
78
  method: "GET",
79
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.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),
79
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
80
+ ? yield core.Supplier.get(this._options.project)
81
+ : 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),
80
82
  contentType: "application/json",
81
83
  requestType: "json",
82
84
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -12,6 +12,8 @@ export declare namespace Sources {
12
12
  /** Specify a custom URL to connect the client to. */
13
13
  baseUrl?: core.Supplier<string>;
14
14
  token?: core.Supplier<string | undefined>;
15
+ /** Override the X-Project header */
16
+ project?: core.Supplier<string | undefined>;
15
17
  fetcher?: core.FetchFunction;
16
18
  }
17
19
  interface RequestOptions {
@@ -21,6 +23,8 @@ export declare namespace Sources {
21
23
  maxRetries?: number;
22
24
  /** A hook to abort the request. */
23
25
  abortSignal?: AbortSignal;
26
+ /** Override the X-Project header */
27
+ project?: string | undefined;
24
28
  /** Additional headers to include in the request. */
25
29
  headers?: Record<string, string>;
26
30
  }
@@ -85,7 +85,9 @@ class Sources {
85
85
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
86
86
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/sources/count"),
87
87
  method: "GET",
88
- 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),
88
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
89
+ ? yield core.Supplier.get(this._options.project)
90
+ : 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),
89
91
  contentType: "application/json",
90
92
  requestType: "json",
91
93
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -150,7 +152,9 @@ class Sources {
150
152
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
151
153
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}`),
152
154
  method: "GET",
153
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.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),
155
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
156
+ ? yield core.Supplier.get(this._options.project)
157
+ : 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),
154
158
  contentType: "application/json",
155
159
  requestType: "json",
156
160
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -215,7 +219,9 @@ class Sources {
215
219
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
216
220
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}`),
217
221
  method: "DELETE",
218
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.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),
222
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
223
+ ? yield core.Supplier.get(this._options.project)
224
+ : 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),
219
225
  contentType: "application/json",
220
226
  requestType: "json",
221
227
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -275,7 +281,9 @@ class Sources {
275
281
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
276
282
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}`),
277
283
  method: "PATCH",
278
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.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),
284
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
285
+ ? yield core.Supplier.get(this._options.project)
286
+ : 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),
279
287
  contentType: "application/json",
280
288
  requestType: "json",
281
289
  body: serializers.SourceUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -341,7 +349,9 @@ class Sources {
341
349
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
342
350
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/sources/name/${encodeURIComponent(sourceName)}`),
343
351
  method: "GET",
344
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.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),
352
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
353
+ ? yield core.Supplier.get(this._options.project)
354
+ : 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),
345
355
  contentType: "application/json",
346
356
  requestType: "json",
347
357
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -405,7 +415,9 @@ class Sources {
405
415
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
406
416
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/sources/"),
407
417
  method: "GET",
408
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.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),
418
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
419
+ ? yield core.Supplier.get(this._options.project)
420
+ : 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),
409
421
  contentType: "application/json",
410
422
  requestType: "json",
411
423
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -472,7 +484,9 @@ class Sources {
472
484
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
473
485
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/sources/"),
474
486
  method: "POST",
475
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.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),
487
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
488
+ ? yield core.Supplier.get(this._options.project)
489
+ : 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),
476
490
  contentType: "application/json",
477
491
  requestType: "json",
478
492
  body: serializers.SourceCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -545,7 +559,9 @@ class Sources {
545
559
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
546
560
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/files/${encodeURIComponent(fileId)}`),
547
561
  method: "GET",
548
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.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),
562
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
563
+ ? yield core.Supplier.get(this._options.project)
564
+ : 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),
549
565
  contentType: "application/json",
550
566
  queryParameters: _queryParams,
551
567
  requestType: "json",
@@ -12,6 +12,8 @@ export declare namespace Files {
12
12
  /** Specify a custom URL to connect the client to. */
13
13
  baseUrl?: core.Supplier<string>;
14
14
  token?: core.Supplier<string | undefined>;
15
+ /** Override the X-Project header */
16
+ project?: core.Supplier<string | undefined>;
15
17
  fetcher?: core.FetchFunction;
16
18
  }
17
19
  interface RequestOptions {
@@ -21,6 +23,8 @@ export declare namespace Files {
21
23
  maxRetries?: number;
22
24
  /** A hook to abort the request. */
23
25
  abortSignal?: AbortSignal;
26
+ /** Override the X-Project header */
27
+ project?: string | undefined;
24
28
  /** Additional headers to include in the request. */
25
29
  headers?: Record<string, string>;
26
30
  }
@@ -80,7 +80,9 @@ class Files {
80
80
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
81
81
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/upload`),
82
82
  method: "POST",
83
- headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.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())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
83
+ headers: Object.assign(Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
84
+ ? yield core.Supplier.get(this._options.project)
85
+ : 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())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
84
86
  requestType: "file",
85
87
  duplex: _maybeEncodedRequest.duplex,
86
88
  body: _maybeEncodedRequest.body,
@@ -158,7 +160,9 @@ class Files {
158
160
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
159
161
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/files`),
160
162
  method: "GET",
161
- 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),
163
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
164
+ ? yield core.Supplier.get(this._options.project)
165
+ : 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),
162
166
  contentType: "application/json",
163
167
  queryParameters: _queryParams,
164
168
  requestType: "json",
@@ -225,7 +229,9 @@ class Files {
225
229
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
226
230
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/${encodeURIComponent(fileId)}`),
227
231
  method: "DELETE",
228
- 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),
232
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
233
+ ? yield core.Supplier.get(this._options.project)
234
+ : 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),
229
235
  contentType: "application/json",
230
236
  requestType: "json",
231
237
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -10,6 +10,8 @@ export declare namespace Passages {
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 Passages {
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
  }
@@ -88,7 +88,9 @@ class Passages {
88
88
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
89
89
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/passages`),
90
90
  method: "GET",
91
- 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),
91
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
92
+ ? yield core.Supplier.get(this._options.project)
93
+ : 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),
92
94
  contentType: "application/json",
93
95
  queryParameters: _queryParams,
94
96
  requestType: "json",
@@ -11,6 +11,8 @@ export declare namespace Steps {
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 Steps {
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
  }
@@ -54,19 +58,6 @@ export declare class Steps {
54
58
  * await client.steps.retrieve("step_id")
55
59
  */
56
60
  retrieve(stepId: string, requestOptions?: Steps.RequestOptions): Promise<Letta.Step>;
57
- /**
58
- * Add feedback to a step.
59
- *
60
- * @param {string} stepId
61
- * @param {Letta.AddFeedbackRequest} request
62
- * @param {Steps.RequestOptions} requestOptions - Request-specific configuration.
63
- *
64
- * @throws {@link Letta.UnprocessableEntityError}
65
- *
66
- * @example
67
- * await client.steps.addFeedback("step_id")
68
- */
69
- addFeedback(stepId: string, request?: Letta.AddFeedbackRequest, requestOptions?: Steps.RequestOptions): Promise<Letta.Step>;
70
61
  protected _getCustomAuthorizationHeaders(): Promise<{
71
62
  Authorization: string;
72
63
  }>;
@@ -79,7 +79,7 @@ class Steps {
79
79
  list() {
80
80
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
81
81
  var _a, _b, _c;
82
- const { before, after, limit, order, startDate, endDate, model, agentId, traceIds, feedback, tags } = request;
82
+ const { before, after, limit, order, startDate, endDate, model, agentId, traceIds, feedback, hasFeedback, tags, } = request;
83
83
  const _queryParams = {};
84
84
  if (before != null) {
85
85
  _queryParams["before"] = before;
@@ -116,6 +116,9 @@ class Steps {
116
116
  if (feedback != null) {
117
117
  _queryParams["feedback"] = feedback;
118
118
  }
119
+ if (hasFeedback != null) {
120
+ _queryParams["has_feedback"] = hasFeedback.toString();
121
+ }
119
122
  if (tags != null) {
120
123
  if (Array.isArray(tags)) {
121
124
  _queryParams["tags"] = tags.map((item) => item);
@@ -127,7 +130,9 @@ class Steps {
127
130
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
128
131
  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/steps/"),
129
132
  method: "GET",
130
- 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),
133
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
134
+ ? yield core.Supplier.get(this._options.project)
135
+ : 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),
131
136
  contentType: "application/json",
132
137
  queryParameters: _queryParams,
133
138
  requestType: "json",
@@ -193,7 +198,9 @@ class Steps {
193
198
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
194
199
  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/steps/${encodeURIComponent(stepId)}`),
195
200
  method: "GET",
196
- 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),
201
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
202
+ ? yield core.Supplier.get(this._options.project)
203
+ : 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),
197
204
  contentType: "application/json",
198
205
  requestType: "json",
199
206
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -241,78 +248,6 @@ class Steps {
241
248
  }
242
249
  });
243
250
  }
244
- /**
245
- * Add feedback to a step.
246
- *
247
- * @param {string} stepId
248
- * @param {Letta.AddFeedbackRequest} request
249
- * @param {Steps.RequestOptions} requestOptions - Request-specific configuration.
250
- *
251
- * @throws {@link Letta.UnprocessableEntityError}
252
- *
253
- * @example
254
- * await client.steps.addFeedback("step_id")
255
- */
256
- addFeedback(stepId_1) {
257
- return __awaiter(this, arguments, void 0, function* (stepId, request = {}, requestOptions) {
258
- var _a, _b, _c;
259
- const { feedback } = request;
260
- const _queryParams = {};
261
- if (feedback != null) {
262
- _queryParams["feedback"] = feedback;
263
- }
264
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
265
- 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/steps/${encodeURIComponent(stepId)}/feedback`),
266
- method: "PATCH",
267
- 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),
268
- contentType: "application/json",
269
- queryParameters: _queryParams,
270
- requestType: "json",
271
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
272
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
273
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
274
- });
275
- if (_response.ok) {
276
- return serializers.Step.parseOrThrow(_response.body, {
277
- unrecognizedObjectKeys: "passthrough",
278
- allowUnrecognizedUnionMembers: true,
279
- allowUnrecognizedEnumValues: true,
280
- skipValidation: true,
281
- breadcrumbsPrefix: ["response"],
282
- });
283
- }
284
- if (_response.error.reason === "status-code") {
285
- switch (_response.error.statusCode) {
286
- case 422:
287
- throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
288
- unrecognizedObjectKeys: "passthrough",
289
- allowUnrecognizedUnionMembers: true,
290
- allowUnrecognizedEnumValues: true,
291
- skipValidation: true,
292
- breadcrumbsPrefix: ["response"],
293
- }));
294
- default:
295
- throw new errors.LettaError({
296
- statusCode: _response.error.statusCode,
297
- body: _response.error.body,
298
- });
299
- }
300
- }
301
- switch (_response.error.reason) {
302
- case "non-json":
303
- throw new errors.LettaError({
304
- statusCode: _response.error.statusCode,
305
- body: _response.error.rawBody,
306
- });
307
- case "timeout":
308
- throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/steps/{step_id}/feedback.");
309
- case "unknown":
310
- throw new errors.LettaError({
311
- message: _response.error.errorMessage,
312
- });
313
- }
314
- });
315
- }
316
251
  _getCustomAuthorizationHeaders() {
317
252
  return __awaiter(this, void 0, void 0, function* () {
318
253
  const tokenValue = yield core.Supplier.get(this._options.token);
@@ -47,6 +47,10 @@ export interface StepsListRequest {
47
47
  * Filter by feedback
48
48
  */
49
49
  feedback?: Letta.StepsListRequestFeedback;
50
+ /**
51
+ * Filter by whether steps have feedback (true) or not (false)
52
+ */
53
+ hasFeedback?: boolean;
50
54
  /**
51
55
  * Filter by tags
52
56
  */
@@ -1,2 +1 @@
1
1
  export { type StepsListRequest } from "./StepsListRequest";
2
- export { type AddFeedbackRequest } from "./AddFeedbackRequest";
@@ -3,12 +3,15 @@
3
3
  */
4
4
  import * as environments from "../../../../../../environments";
5
5
  import * as core from "../../../../../../core";
6
+ import * as Letta from "../../../../../index";
6
7
  export declare namespace Feedback {
7
8
  interface Options {
8
9
  environment?: core.Supplier<environments.LettaEnvironment | string>;
9
10
  /** Specify a custom URL to connect the client to. */
10
11
  baseUrl?: core.Supplier<string>;
11
12
  token?: core.Supplier<string | undefined>;
13
+ /** Override the X-Project header */
14
+ project?: core.Supplier<string | undefined>;
12
15
  fetcher?: core.FetchFunction;
13
16
  }
14
17
  interface RequestOptions {
@@ -18,6 +21,8 @@ export declare namespace Feedback {
18
21
  maxRetries?: number;
19
22
  /** A hook to abort the request. */
20
23
  abortSignal?: AbortSignal;
24
+ /** Override the X-Project header */
25
+ project?: string | undefined;
21
26
  /** Additional headers to include in the request. */
22
27
  headers?: Record<string, string>;
23
28
  }
@@ -26,13 +31,18 @@ export declare class Feedback {
26
31
  protected readonly _options: Feedback.Options;
27
32
  constructor(_options?: Feedback.Options);
28
33
  /**
34
+ * Add feedback to a step.
35
+ *
29
36
  * @param {string} stepId
37
+ * @param {Letta.steps.FeedbackCreateRequest} request
30
38
  * @param {Feedback.RequestOptions} requestOptions - Request-specific configuration.
31
39
  *
40
+ * @throws {@link Letta.UnprocessableEntityError}
41
+ *
32
42
  * @example
33
- * await client.steps.feedback.add("step_id")
43
+ * await client.steps.feedback.create("step_id")
34
44
  */
35
- add(stepId: string, requestOptions?: Feedback.RequestOptions): Promise<void>;
45
+ create(stepId: string, request?: Letta.steps.FeedbackCreateRequest, requestOptions?: Feedback.RequestOptions): Promise<Letta.Step>;
36
46
  protected _getCustomAuthorizationHeaders(): Promise<{
37
47
  Authorization: string;
38
48
  }>;
@@ -51,40 +51,72 @@ Object.defineProperty(exports, "__esModule", { value: true });
51
51
  exports.Feedback = void 0;
52
52
  const environments = __importStar(require("../../../../../../environments"));
53
53
  const core = __importStar(require("../../../../../../core"));
54
+ const Letta = __importStar(require("../../../../../index"));
54
55
  const url_join_1 = __importDefault(require("url-join"));
56
+ const serializers = __importStar(require("../../../../../../serialization/index"));
55
57
  const errors = __importStar(require("../../../../../../errors/index"));
56
58
  class Feedback {
57
59
  constructor(_options = {}) {
58
60
  this._options = _options;
59
61
  }
60
62
  /**
63
+ * Add feedback to a step.
64
+ *
61
65
  * @param {string} stepId
66
+ * @param {Letta.steps.FeedbackCreateRequest} request
62
67
  * @param {Feedback.RequestOptions} requestOptions - Request-specific configuration.
63
68
  *
69
+ * @throws {@link Letta.UnprocessableEntityError}
70
+ *
64
71
  * @example
65
- * await client.steps.feedback.add("step_id")
72
+ * await client.steps.feedback.create("step_id")
66
73
  */
67
- add(stepId, requestOptions) {
68
- return __awaiter(this, void 0, void 0, function* () {
74
+ create(stepId_1) {
75
+ return __awaiter(this, arguments, void 0, function* (stepId, request = {}, requestOptions) {
69
76
  var _a, _b, _c;
77
+ const { feedback } = request;
78
+ const _queryParams = {};
79
+ if (feedback != null) {
80
+ _queryParams["feedback"] = feedback;
81
+ }
70
82
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
71
83
  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/steps/${encodeURIComponent(stepId)}/feedback`),
72
- method: "POST",
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),
84
+ method: "PATCH",
85
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
86
+ ? yield core.Supplier.get(this._options.project)
87
+ : 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
88
  contentType: "application/json",
89
+ queryParameters: _queryParams,
75
90
  requestType: "json",
76
91
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
77
92
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
78
93
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
79
94
  });
80
95
  if (_response.ok) {
81
- return;
96
+ return serializers.Step.parseOrThrow(_response.body, {
97
+ unrecognizedObjectKeys: "passthrough",
98
+ allowUnrecognizedUnionMembers: true,
99
+ allowUnrecognizedEnumValues: true,
100
+ skipValidation: true,
101
+ breadcrumbsPrefix: ["response"],
102
+ });
82
103
  }
83
104
  if (_response.error.reason === "status-code") {
84
- throw new errors.LettaError({
85
- statusCode: _response.error.statusCode,
86
- body: _response.error.body,
87
- });
105
+ switch (_response.error.statusCode) {
106
+ case 422:
107
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
108
+ unrecognizedObjectKeys: "passthrough",
109
+ allowUnrecognizedUnionMembers: true,
110
+ allowUnrecognizedEnumValues: true,
111
+ skipValidation: true,
112
+ breadcrumbsPrefix: ["response"],
113
+ }));
114
+ default:
115
+ throw new errors.LettaError({
116
+ statusCode: _response.error.statusCode,
117
+ body: _response.error.body,
118
+ });
119
+ }
88
120
  }
89
121
  switch (_response.error.reason) {
90
122
  case "non-json":
@@ -93,7 +125,7 @@ class Feedback {
93
125
  body: _response.error.rawBody,
94
126
  });
95
127
  case "timeout":
96
- throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/steps/{step_id}/feedback.");
128
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/steps/{step_id}/feedback.");
97
129
  case "unknown":
98
130
  throw new errors.LettaError({
99
131
  message: _response.error.errorMessage,
@@ -1 +1 @@
1
- export {};
1
+ export * from "./requests";
@@ -1,2 +1,17 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests"), exports);
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- import * as Letta from "../../../../index";
4
+ import * as Letta from "../../../../../../index";
5
5
  /**
6
6
  * @example
7
7
  * {}
8
8
  */
9
- export interface AddFeedbackRequest {
9
+ export interface FeedbackCreateRequest {
10
10
  feedback?: Letta.FeedbackType;
11
11
  }
@@ -0,0 +1 @@
1
+ export { type FeedbackCreateRequest } from "./FeedbackCreateRequest";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +1,2 @@
1
1
  export * as feedback from "./feedback";
2
+ export * from "./feedback/client/requests";
@@ -32,6 +32,10 @@ var __importStar = (this && this.__importStar) || (function () {
32
32
  return result;
33
33
  };
34
34
  })();
35
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
+ };
35
38
  Object.defineProperty(exports, "__esModule", { value: true });
36
39
  exports.feedback = void 0;
37
40
  exports.feedback = __importStar(require("./feedback"));
41
+ __exportStar(require("./feedback/client/requests"), exports);