@letta-ai/letta-client 0.1.137 → 0.1.139

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 (244) hide show
  1. package/api/resources/agents/client/Client.js +10 -10
  2. package/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -0
  3. package/api/resources/agents/resources/blocks/client/Client.js +5 -5
  4. package/api/resources/agents/resources/context/client/Client.js +1 -1
  5. package/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  6. package/api/resources/agents/resources/groups/client/Client.js +1 -1
  7. package/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  8. package/api/resources/agents/resources/messages/client/Client.js +6 -6
  9. package/api/resources/agents/resources/passages/client/Client.js +4 -4
  10. package/api/resources/agents/resources/sources/client/Client.js +3 -3
  11. package/api/resources/agents/resources/templates/client/Client.js +3 -3
  12. package/api/resources/agents/resources/tools/client/Client.js +3 -3
  13. package/api/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +1 -1
  14. package/api/resources/agents/types/AgentsSearchRequestSearchItemField.d.ts +9 -0
  15. package/api/resources/agents/types/AgentsSearchRequestSearchItemFieldOperator.d.ts +8 -0
  16. package/api/resources/agents/types/AgentsSearchRequestSearchItemFieldOperator.js +10 -0
  17. package/api/resources/agents/types/{AgentsSearchRequestSearchItemOperator.d.ts → AgentsSearchRequestSearchItemThree.d.ts} +1 -1
  18. package/api/resources/agents/types/index.d.ts +3 -1
  19. package/api/resources/agents/types/index.js +3 -1
  20. package/api/resources/batches/client/Client.js +4 -4
  21. package/api/resources/blocks/client/Client.js +6 -6
  22. package/api/resources/blocks/resources/agents/client/Client.js +1 -1
  23. package/api/resources/clientSideAccessTokens/client/Client.js +2 -2
  24. package/api/resources/embeddingModels/client/Client.js +1 -1
  25. package/api/resources/groups/client/Client.js +6 -6
  26. package/api/resources/groups/resources/messages/client/Client.js +5 -5
  27. package/api/resources/health/client/Client.js +1 -1
  28. package/api/resources/identities/client/Client.js +7 -7
  29. package/api/resources/identities/resources/properties/client/Client.js +1 -1
  30. package/api/resources/index.d.ts +2 -1
  31. package/api/resources/index.js +3 -2
  32. package/api/resources/jobs/client/Client.js +4 -4
  33. package/api/resources/messages/client/Client.js +1 -1
  34. package/api/resources/models/client/Client.js +1 -1
  35. package/api/resources/projects/client/Client.js +1 -1
  36. package/api/resources/providers/client/Client.js +5 -5
  37. package/api/resources/runs/client/Client.js +4 -4
  38. package/api/resources/runs/resources/messages/client/Client.js +1 -1
  39. package/api/resources/runs/resources/steps/client/Client.js +1 -1
  40. package/api/resources/runs/resources/usage/client/Client.js +1 -1
  41. package/api/resources/sources/client/Client.js +8 -8
  42. package/api/resources/sources/resources/files/client/Client.js +3 -3
  43. package/api/resources/sources/resources/passages/client/Client.js +1 -1
  44. package/api/resources/steps/client/Client.d.ts +16 -0
  45. package/api/resources/steps/client/Client.js +91 -3
  46. package/api/resources/steps/client/requests/AddFeedbackRequest.d.ts +11 -0
  47. package/api/resources/steps/client/requests/AddFeedbackRequest.js +5 -0
  48. package/api/resources/steps/client/requests/StepsListRequest.d.ts +9 -0
  49. package/api/resources/steps/client/requests/index.d.ts +1 -0
  50. package/api/resources/steps/index.d.ts +2 -0
  51. package/api/resources/steps/index.js +2 -0
  52. package/api/resources/steps/resources/feedback/client/Client.d.ts +39 -0
  53. package/api/resources/steps/resources/feedback/client/Client.js +111 -0
  54. package/api/resources/steps/resources/feedback/client/index.d.ts +1 -0
  55. package/api/resources/steps/resources/feedback/client/index.js +2 -0
  56. package/api/resources/steps/resources/feedback/index.d.ts +1 -0
  57. package/api/resources/steps/resources/feedback/index.js +17 -0
  58. package/api/resources/steps/resources/index.d.ts +1 -0
  59. package/api/resources/steps/resources/index.js +37 -0
  60. package/api/resources/steps/types/AddFeedbackRequestFeedback.d.ts +8 -0
  61. package/api/resources/steps/types/AddFeedbackRequestFeedback.js +10 -0
  62. package/api/resources/steps/types/StepsListRequestFeedback.d.ts +8 -0
  63. package/api/resources/steps/types/StepsListRequestFeedback.js +10 -0
  64. package/api/resources/steps/types/index.d.ts +2 -0
  65. package/api/resources/steps/types/index.js +18 -0
  66. package/api/resources/tags/client/Client.js +1 -1
  67. package/api/resources/telemetry/client/Client.js +1 -1
  68. package/api/resources/templates/client/Client.js +1 -1
  69. package/api/resources/templates/resources/agents/client/Client.js +1 -1
  70. package/api/resources/tools/client/Client.d.ts +17 -0
  71. package/api/resources/tools/client/Client.js +89 -18
  72. package/api/resources/tools/types/TestMcpServerRequest.d.ts +5 -0
  73. package/api/resources/tools/types/TestMcpServerRequest.js +5 -0
  74. package/api/resources/tools/types/index.d.ts +1 -0
  75. package/api/resources/tools/types/index.js +1 -0
  76. package/api/resources/voice/client/Client.js +1 -1
  77. package/api/types/Step.d.ts +2 -0
  78. package/api/types/StepFeedback.d.ts +8 -0
  79. package/api/types/StepFeedback.js +10 -0
  80. package/api/types/index.d.ts +1 -0
  81. package/api/types/index.js +1 -0
  82. package/dist/api/resources/agents/client/Client.js +10 -10
  83. package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -0
  84. package/dist/api/resources/agents/resources/blocks/client/Client.js +5 -5
  85. package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
  86. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  87. package/dist/api/resources/agents/resources/groups/client/Client.js +1 -1
  88. package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  89. package/dist/api/resources/agents/resources/messages/client/Client.js +6 -6
  90. package/dist/api/resources/agents/resources/passages/client/Client.js +4 -4
  91. package/dist/api/resources/agents/resources/sources/client/Client.js +3 -3
  92. package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
  93. package/dist/api/resources/agents/resources/tools/client/Client.js +3 -3
  94. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +1 -1
  95. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemField.d.ts +9 -0
  96. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemField.js +5 -0
  97. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemFieldOperator.d.ts +8 -0
  98. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemFieldOperator.js +10 -0
  99. package/dist/api/resources/agents/types/{AgentsSearchRequestSearchItemOperator.d.ts → AgentsSearchRequestSearchItemThree.d.ts} +1 -1
  100. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemThree.js +5 -0
  101. package/dist/api/resources/agents/types/index.d.ts +3 -1
  102. package/dist/api/resources/agents/types/index.js +3 -1
  103. package/dist/api/resources/batches/client/Client.js +4 -4
  104. package/dist/api/resources/blocks/client/Client.js +6 -6
  105. package/dist/api/resources/blocks/resources/agents/client/Client.js +1 -1
  106. package/dist/api/resources/clientSideAccessTokens/client/Client.js +2 -2
  107. package/dist/api/resources/embeddingModels/client/Client.js +1 -1
  108. package/dist/api/resources/groups/client/Client.js +6 -6
  109. package/dist/api/resources/groups/resources/messages/client/Client.js +5 -5
  110. package/dist/api/resources/health/client/Client.js +1 -1
  111. package/dist/api/resources/identities/client/Client.js +7 -7
  112. package/dist/api/resources/identities/resources/properties/client/Client.js +1 -1
  113. package/dist/api/resources/index.d.ts +2 -1
  114. package/dist/api/resources/index.js +3 -2
  115. package/dist/api/resources/jobs/client/Client.js +4 -4
  116. package/dist/api/resources/messages/client/Client.js +1 -1
  117. package/dist/api/resources/models/client/Client.js +1 -1
  118. package/dist/api/resources/projects/client/Client.js +1 -1
  119. package/dist/api/resources/providers/client/Client.js +5 -5
  120. package/dist/api/resources/runs/client/Client.js +4 -4
  121. package/dist/api/resources/runs/resources/messages/client/Client.js +1 -1
  122. package/dist/api/resources/runs/resources/steps/client/Client.js +1 -1
  123. package/dist/api/resources/runs/resources/usage/client/Client.js +1 -1
  124. package/dist/api/resources/sources/client/Client.js +8 -8
  125. package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
  126. package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
  127. package/dist/api/resources/steps/client/Client.d.ts +16 -0
  128. package/dist/api/resources/steps/client/Client.js +91 -3
  129. package/dist/api/resources/steps/client/requests/AddFeedbackRequest.d.ts +11 -0
  130. package/dist/api/resources/steps/client/requests/AddFeedbackRequest.js +5 -0
  131. package/dist/api/resources/steps/client/requests/StepsListRequest.d.ts +9 -0
  132. package/dist/api/resources/steps/client/requests/index.d.ts +1 -0
  133. package/dist/api/resources/steps/index.d.ts +2 -0
  134. package/dist/api/resources/steps/index.js +2 -0
  135. package/dist/api/resources/steps/resources/feedback/client/Client.d.ts +39 -0
  136. package/dist/api/resources/steps/resources/feedback/client/Client.js +111 -0
  137. package/dist/api/resources/steps/resources/feedback/client/index.d.ts +1 -0
  138. package/dist/api/resources/steps/resources/feedback/client/index.js +2 -0
  139. package/dist/api/resources/steps/resources/feedback/index.d.ts +1 -0
  140. package/dist/api/resources/steps/resources/feedback/index.js +17 -0
  141. package/dist/api/resources/steps/resources/index.d.ts +1 -0
  142. package/dist/api/resources/steps/resources/index.js +37 -0
  143. package/dist/api/resources/steps/types/AddFeedbackRequestFeedback.d.ts +8 -0
  144. package/dist/api/resources/steps/types/AddFeedbackRequestFeedback.js +10 -0
  145. package/dist/api/resources/steps/types/StepsListRequestFeedback.d.ts +8 -0
  146. package/dist/api/resources/steps/types/StepsListRequestFeedback.js +10 -0
  147. package/dist/api/resources/steps/types/index.d.ts +2 -0
  148. package/dist/api/resources/steps/types/index.js +18 -0
  149. package/dist/api/resources/tags/client/Client.js +1 -1
  150. package/dist/api/resources/telemetry/client/Client.js +1 -1
  151. package/dist/api/resources/templates/client/Client.js +1 -1
  152. package/dist/api/resources/templates/resources/agents/client/Client.js +1 -1
  153. package/dist/api/resources/tools/client/Client.d.ts +17 -0
  154. package/dist/api/resources/tools/client/Client.js +89 -18
  155. package/dist/api/resources/tools/types/TestMcpServerRequest.d.ts +5 -0
  156. package/dist/api/resources/tools/types/TestMcpServerRequest.js +5 -0
  157. package/dist/api/resources/tools/types/index.d.ts +1 -0
  158. package/dist/api/resources/tools/types/index.js +1 -0
  159. package/dist/api/resources/voice/client/Client.js +1 -1
  160. package/dist/api/types/Step.d.ts +2 -0
  161. package/dist/api/types/StepFeedback.d.ts +8 -0
  162. package/dist/api/types/StepFeedback.js +10 -0
  163. package/dist/api/types/index.d.ts +1 -0
  164. package/dist/api/types/index.js +1 -0
  165. package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -0
  166. package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.js +1 -0
  167. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +3 -2
  168. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItem.js +4 -2
  169. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemField.d.ts +15 -0
  170. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemField.js +46 -0
  171. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemFieldOperator.d.ts +10 -0
  172. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemFieldOperator.js +41 -0
  173. package/dist/serialization/resources/agents/types/{AgentsSearchRequestSearchItemOperator.d.ts → AgentsSearchRequestSearchItemThree.d.ts} +2 -2
  174. package/dist/serialization/resources/agents/types/{AgentsSearchRequestSearchItemOperator.js → AgentsSearchRequestSearchItemThree.js} +2 -2
  175. package/dist/serialization/resources/agents/types/index.d.ts +3 -1
  176. package/dist/serialization/resources/agents/types/index.js +3 -1
  177. package/dist/serialization/resources/index.d.ts +2 -1
  178. package/dist/serialization/resources/index.js +3 -2
  179. package/dist/serialization/resources/steps/index.d.ts +1 -0
  180. package/dist/serialization/resources/steps/index.js +1 -0
  181. package/dist/serialization/resources/steps/types/AddFeedbackRequestFeedback.d.ts +10 -0
  182. package/dist/serialization/resources/steps/types/AddFeedbackRequestFeedback.js +41 -0
  183. package/dist/serialization/resources/steps/types/StepsListRequestFeedback.d.ts +10 -0
  184. package/dist/serialization/resources/steps/types/StepsListRequestFeedback.js +41 -0
  185. package/dist/serialization/resources/steps/types/index.d.ts +2 -0
  186. package/dist/serialization/resources/steps/types/index.js +18 -0
  187. package/dist/serialization/resources/tools/client/index.d.ts +1 -0
  188. package/dist/serialization/resources/tools/client/index.js +2 -1
  189. package/dist/serialization/resources/tools/client/testMcpServer.d.ts +11 -0
  190. package/dist/serialization/resources/tools/client/testMcpServer.js +42 -0
  191. package/dist/serialization/resources/tools/types/TestMcpServerRequest.d.ts +13 -0
  192. package/dist/serialization/resources/tools/types/TestMcpServerRequest.js +44 -0
  193. package/dist/serialization/resources/tools/types/index.d.ts +1 -0
  194. package/dist/serialization/resources/tools/types/index.js +1 -0
  195. package/dist/serialization/types/Step.d.ts +2 -0
  196. package/dist/serialization/types/Step.js +2 -0
  197. package/dist/serialization/types/StepFeedback.d.ts +10 -0
  198. package/dist/serialization/types/StepFeedback.js +41 -0
  199. package/dist/serialization/types/index.d.ts +1 -0
  200. package/dist/serialization/types/index.js +1 -0
  201. package/dist/version.d.ts +1 -1
  202. package/dist/version.js +1 -1
  203. package/package.json +1 -1
  204. package/reference.md +189 -0
  205. package/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -0
  206. package/serialization/resources/agents/client/requests/CreateAgentRequest.js +1 -0
  207. package/serialization/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +3 -2
  208. package/serialization/resources/agents/types/AgentsSearchRequestSearchItem.js +4 -2
  209. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemField.d.ts +15 -0
  210. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemField.js +46 -0
  211. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemFieldOperator.d.ts +10 -0
  212. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemFieldOperator.js +41 -0
  213. package/serialization/resources/agents/types/{AgentsSearchRequestSearchItemOperator.d.ts → AgentsSearchRequestSearchItemThree.d.ts} +2 -2
  214. package/serialization/resources/agents/types/{AgentsSearchRequestSearchItemOperator.js → AgentsSearchRequestSearchItemThree.js} +2 -2
  215. package/serialization/resources/agents/types/index.d.ts +3 -1
  216. package/serialization/resources/agents/types/index.js +3 -1
  217. package/serialization/resources/index.d.ts +2 -1
  218. package/serialization/resources/index.js +3 -2
  219. package/serialization/resources/steps/index.d.ts +1 -0
  220. package/serialization/resources/steps/index.js +1 -0
  221. package/serialization/resources/steps/types/AddFeedbackRequestFeedback.d.ts +10 -0
  222. package/serialization/resources/steps/types/AddFeedbackRequestFeedback.js +41 -0
  223. package/serialization/resources/steps/types/StepsListRequestFeedback.d.ts +10 -0
  224. package/serialization/resources/steps/types/StepsListRequestFeedback.js +41 -0
  225. package/serialization/resources/steps/types/index.d.ts +2 -0
  226. package/serialization/resources/steps/types/index.js +18 -0
  227. package/serialization/resources/tools/client/index.d.ts +1 -0
  228. package/serialization/resources/tools/client/index.js +2 -1
  229. package/serialization/resources/tools/client/testMcpServer.d.ts +11 -0
  230. package/serialization/resources/tools/client/testMcpServer.js +42 -0
  231. package/serialization/resources/tools/types/TestMcpServerRequest.d.ts +13 -0
  232. package/serialization/resources/tools/types/TestMcpServerRequest.js +44 -0
  233. package/serialization/resources/tools/types/index.d.ts +1 -0
  234. package/serialization/resources/tools/types/index.js +1 -0
  235. package/serialization/types/Step.d.ts +2 -0
  236. package/serialization/types/Step.js +2 -0
  237. package/serialization/types/StepFeedback.d.ts +10 -0
  238. package/serialization/types/StepFeedback.js +41 -0
  239. package/serialization/types/index.d.ts +1 -0
  240. package/serialization/types/index.js +1 -0
  241. package/version.d.ts +1 -1
  242. package/version.js +1 -1
  243. /package/api/resources/agents/types/{AgentsSearchRequestSearchItemOperator.js → AgentsSearchRequestSearchItemField.js} +0 -0
  244. /package/{dist/api/resources/agents/types/AgentsSearchRequestSearchItemOperator.js → api/resources/agents/types/AgentsSearchRequestSearchItemThree.js} +0 -0
@@ -101,7 +101,7 @@ class Steps {
101
101
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
102
102
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/runs/${encodeURIComponent(runId)}/steps`),
103
103
  method: "GET",
104
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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),
104
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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),
105
105
  contentType: "application/json",
106
106
  queryParameters: _queryParams,
107
107
  requestType: "json",
@@ -76,7 +76,7 @@ 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.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
79
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
80
80
  contentType: "application/json",
81
81
  requestType: "json",
82
82
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -85,7 +85,7 @@ 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.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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
89
  contentType: "application/json",
90
90
  requestType: "json",
91
91
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -150,7 +150,7 @@ class Sources {
150
150
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
151
151
  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
152
  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.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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),
153
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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
154
  contentType: "application/json",
155
155
  requestType: "json",
156
156
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -215,7 +215,7 @@ class Sources {
215
215
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
216
216
  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
217
  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.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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),
218
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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
219
  contentType: "application/json",
220
220
  requestType: "json",
221
221
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -275,7 +275,7 @@ class Sources {
275
275
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
276
276
  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
277
  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.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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),
278
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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
279
  contentType: "application/json",
280
280
  requestType: "json",
281
281
  body: serializers.SourceUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -341,7 +341,7 @@ class Sources {
341
341
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
342
342
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/sources/name/${encodeURIComponent(sourceName)}`),
343
343
  method: "GET",
344
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
344
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
345
345
  contentType: "application/json",
346
346
  requestType: "json",
347
347
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -405,7 +405,7 @@ class Sources {
405
405
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
406
406
  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
407
  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.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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),
408
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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
409
  contentType: "application/json",
410
410
  requestType: "json",
411
411
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -472,7 +472,7 @@ class Sources {
472
472
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
473
473
  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
474
  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.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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),
475
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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
476
  contentType: "application/json",
477
477
  requestType: "json",
478
478
  body: serializers.SourceCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -545,7 +545,7 @@ class Sources {
545
545
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
546
546
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/files/${encodeURIComponent(fileId)}`),
547
547
  method: "GET",
548
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
548
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
549
549
  contentType: "application/json",
550
550
  queryParameters: _queryParams,
551
551
  requestType: "json",
@@ -80,7 +80,7 @@ class Files {
80
80
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
81
81
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/upload`),
82
82
  method: "POST",
83
- headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
83
+ headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
84
84
  requestType: "file",
85
85
  duplex: _maybeEncodedRequest.duplex,
86
86
  body: _maybeEncodedRequest.body,
@@ -158,7 +158,7 @@ class Files {
158
158
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
159
159
  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
160
  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.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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),
161
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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
162
  contentType: "application/json",
163
163
  queryParameters: _queryParams,
164
164
  requestType: "json",
@@ -225,7 +225,7 @@ class Files {
225
225
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
226
226
  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
227
  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.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
228
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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
229
  contentType: "application/json",
230
230
  requestType: "json",
231
231
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -88,7 +88,7 @@ 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.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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
92
  contentType: "application/json",
93
93
  queryParameters: _queryParams,
94
94
  requestType: "json",
@@ -4,6 +4,7 @@
4
4
  import * as environments from "../../../../environments";
5
5
  import * as core from "../../../../core";
6
6
  import * as Letta from "../../../index";
7
+ import { Feedback } from "../resources/feedback/client/Client";
7
8
  export declare namespace Steps {
8
9
  interface Options {
9
10
  environment?: core.Supplier<environments.LettaEnvironment | string>;
@@ -25,7 +26,9 @@ export declare namespace Steps {
25
26
  }
26
27
  export declare class Steps {
27
28
  protected readonly _options: Steps.Options;
29
+ protected _feedback: Feedback | undefined;
28
30
  constructor(_options?: Steps.Options);
31
+ get feedback(): Feedback;
29
32
  /**
30
33
  * List steps with optional pagination and date filters.
31
34
  * Dates should be provided in ISO 8601 format (e.g. 2025-01-29T15:01:19-08:00)
@@ -51,6 +54,19 @@ export declare class Steps {
51
54
  * await client.steps.retrieve("step_id")
52
55
  */
53
56
  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>;
54
70
  protected _getCustomAuthorizationHeaders(): Promise<{
55
71
  Authorization: string;
56
72
  }>;
@@ -55,10 +55,15 @@ const Letta = __importStar(require("../../../index"));
55
55
  const url_join_1 = __importDefault(require("url-join"));
56
56
  const serializers = __importStar(require("../../../../serialization/index"));
57
57
  const errors = __importStar(require("../../../../errors/index"));
58
+ const Client_1 = require("../resources/feedback/client/Client");
58
59
  class Steps {
59
60
  constructor(_options = {}) {
60
61
  this._options = _options;
61
62
  }
63
+ get feedback() {
64
+ var _a;
65
+ return ((_a = this._feedback) !== null && _a !== void 0 ? _a : (this._feedback = new Client_1.Feedback(this._options)));
66
+ }
62
67
  /**
63
68
  * List steps with optional pagination and date filters.
64
69
  * Dates should be provided in ISO 8601 format (e.g. 2025-01-29T15:01:19-08:00)
@@ -74,7 +79,7 @@ class Steps {
74
79
  list() {
75
80
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
76
81
  var _a, _b, _c;
77
- const { before, after, limit, order, startDate, endDate, model, agentId, traceIds } = request;
82
+ const { before, after, limit, order, startDate, endDate, model, agentId, traceIds, feedback, tags } = request;
78
83
  const _queryParams = {};
79
84
  if (before != null) {
80
85
  _queryParams["before"] = before;
@@ -108,10 +113,21 @@ class Steps {
108
113
  _queryParams["trace_ids"] = traceIds;
109
114
  }
110
115
  }
116
+ if (feedback != null) {
117
+ _queryParams["feedback"] = feedback;
118
+ }
119
+ if (tags != null) {
120
+ if (Array.isArray(tags)) {
121
+ _queryParams["tags"] = tags.map((item) => item);
122
+ }
123
+ else {
124
+ _queryParams["tags"] = tags;
125
+ }
126
+ }
111
127
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
112
128
  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/"),
113
129
  method: "GET",
114
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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),
130
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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),
115
131
  contentType: "application/json",
116
132
  queryParameters: _queryParams,
117
133
  requestType: "json",
@@ -177,7 +193,7 @@ class Steps {
177
193
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
178
194
  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)}`),
179
195
  method: "GET",
180
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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),
196
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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),
181
197
  contentType: "application/json",
182
198
  requestType: "json",
183
199
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -225,6 +241,78 @@ class Steps {
225
241
  }
226
242
  });
227
243
  }
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.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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
+ }
228
316
  _getCustomAuthorizationHeaders() {
229
317
  return __awaiter(this, void 0, void 0, function* () {
230
318
  const tokenValue = yield core.Supplier.get(this._options.token);
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Letta from "../../../../index";
5
+ /**
6
+ * @example
7
+ * {}
8
+ */
9
+ export interface AddFeedbackRequest {
10
+ feedback?: Letta.AddFeedbackRequestFeedback;
11
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ import * as Letta from "../../../../index";
4
5
  /**
5
6
  * @example
6
7
  * {}
@@ -42,4 +43,12 @@ export interface StepsListRequest {
42
43
  * Filter by trace ids returned by the server
43
44
  */
44
45
  traceIds?: string | string[];
46
+ /**
47
+ * Filter by feedback
48
+ */
49
+ feedback?: Letta.StepsListRequestFeedback;
50
+ /**
51
+ * Filter by tags
52
+ */
53
+ tags?: string | string[];
45
54
  }
@@ -1 +1,2 @@
1
1
  export { type StepsListRequest } from "./StepsListRequest";
2
+ export { type AddFeedbackRequest } from "./AddFeedbackRequest";
@@ -1 +1,3 @@
1
+ export * from "./types";
1
2
  export * from "./client";
3
+ export * from "./resources";
@@ -14,4 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./types"), exports);
17
18
  __exportStar(require("./client"), exports);
19
+ __exportStar(require("./resources"), exports);
@@ -0,0 +1,39 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../../../environments";
5
+ import * as core from "../../../../../../core";
6
+ export declare namespace Feedback {
7
+ interface Options {
8
+ environment?: core.Supplier<environments.LettaEnvironment | string>;
9
+ /** Specify a custom URL to connect the client to. */
10
+ baseUrl?: core.Supplier<string>;
11
+ token?: core.Supplier<string | undefined>;
12
+ fetcher?: core.FetchFunction;
13
+ }
14
+ interface RequestOptions {
15
+ /** The maximum time to wait for a response in seconds. */
16
+ timeoutInSeconds?: number;
17
+ /** The number of times to retry the request. Defaults to 2. */
18
+ maxRetries?: number;
19
+ /** A hook to abort the request. */
20
+ abortSignal?: AbortSignal;
21
+ /** Additional headers to include in the request. */
22
+ headers?: Record<string, string>;
23
+ }
24
+ }
25
+ export declare class Feedback {
26
+ protected readonly _options: Feedback.Options;
27
+ constructor(_options?: Feedback.Options);
28
+ /**
29
+ * @param {string} stepId
30
+ * @param {Feedback.RequestOptions} requestOptions - Request-specific configuration.
31
+ *
32
+ * @example
33
+ * await client.steps.feedback.add("step_id")
34
+ */
35
+ add(stepId: string, requestOptions?: Feedback.RequestOptions): Promise<void>;
36
+ protected _getCustomAuthorizationHeaders(): Promise<{
37
+ Authorization: string;
38
+ }>;
39
+ }
@@ -0,0 +1,111 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
39
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
40
+ return new (P || (P = Promise))(function (resolve, reject) {
41
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
42
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
43
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
44
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
45
+ });
46
+ };
47
+ var __importDefault = (this && this.__importDefault) || function (mod) {
48
+ return (mod && mod.__esModule) ? mod : { "default": mod };
49
+ };
50
+ Object.defineProperty(exports, "__esModule", { value: true });
51
+ exports.Feedback = void 0;
52
+ const environments = __importStar(require("../../../../../../environments"));
53
+ const core = __importStar(require("../../../../../../core"));
54
+ const url_join_1 = __importDefault(require("url-join"));
55
+ const errors = __importStar(require("../../../../../../errors/index"));
56
+ class Feedback {
57
+ constructor(_options = {}) {
58
+ this._options = _options;
59
+ }
60
+ /**
61
+ * @param {string} stepId
62
+ * @param {Feedback.RequestOptions} requestOptions - Request-specific configuration.
63
+ *
64
+ * @example
65
+ * await client.steps.feedback.add("step_id")
66
+ */
67
+ add(stepId, requestOptions) {
68
+ return __awaiter(this, void 0, void 0, function* () {
69
+ var _a, _b, _c;
70
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
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/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.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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
+ contentType: "application/json",
75
+ requestType: "json",
76
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
77
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
78
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
79
+ });
80
+ if (_response.ok) {
81
+ return;
82
+ }
83
+ if (_response.error.reason === "status-code") {
84
+ throw new errors.LettaError({
85
+ statusCode: _response.error.statusCode,
86
+ body: _response.error.body,
87
+ });
88
+ }
89
+ switch (_response.error.reason) {
90
+ case "non-json":
91
+ throw new errors.LettaError({
92
+ statusCode: _response.error.statusCode,
93
+ body: _response.error.rawBody,
94
+ });
95
+ case "timeout":
96
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/steps/{step_id}/feedback.");
97
+ case "unknown":
98
+ throw new errors.LettaError({
99
+ message: _response.error.errorMessage,
100
+ });
101
+ }
102
+ });
103
+ }
104
+ _getCustomAuthorizationHeaders() {
105
+ return __awaiter(this, void 0, void 0, function* () {
106
+ const tokenValue = yield core.Supplier.get(this._options.token);
107
+ return { Authorization: `Bearer ${tokenValue}` };
108
+ });
109
+ }
110
+ }
111
+ exports.Feedback = Feedback;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from "./client";
@@ -0,0 +1,17 @@
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
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client"), exports);
@@ -0,0 +1 @@
1
+ export * as feedback from "./feedback";
@@ -0,0 +1,37 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.feedback = void 0;
37
+ exports.feedback = __importStar(require("./feedback"));
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type AddFeedbackRequestFeedback = "positive" | "negative";
5
+ export declare const AddFeedbackRequestFeedback: {
6
+ readonly Positive: "positive";
7
+ readonly Negative: "negative";
8
+ };