@letta-ai/letta-client 0.1.91 → 0.1.92

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 (188) hide show
  1. package/Client.d.ts +3 -0
  2. package/Client.js +5 -0
  3. package/api/errors/BadRequestError.d.ts +7 -0
  4. package/api/errors/BadRequestError.js +51 -0
  5. package/api/errors/index.d.ts +1 -0
  6. package/api/errors/index.js +1 -0
  7. package/api/resources/agents/client/Client.js +13 -13
  8. package/api/resources/agents/resources/blocks/client/Client.js +5 -5
  9. package/api/resources/agents/resources/context/client/Client.js +1 -1
  10. package/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  11. package/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  12. package/api/resources/agents/resources/messages/client/Client.js +5 -5
  13. package/api/resources/agents/resources/passages/client/Client.js +3 -3
  14. package/api/resources/agents/resources/sources/client/Client.js +3 -3
  15. package/api/resources/agents/resources/templates/client/Client.js +3 -3
  16. package/api/resources/agents/resources/tools/client/Client.js +3 -3
  17. package/api/resources/blocks/client/Client.js +6 -6
  18. package/api/resources/clientSideAccessTokens/client/Client.d.ts +66 -0
  19. package/api/resources/clientSideAccessTokens/client/Client.js +195 -0
  20. package/api/resources/clientSideAccessTokens/client/index.d.ts +1 -0
  21. package/api/resources/clientSideAccessTokens/client/index.js +17 -0
  22. package/api/resources/clientSideAccessTokens/client/requests/ClientSideAccessTokensCreateClientSideAccessTokenRequest.d.ts +22 -0
  23. package/api/resources/clientSideAccessTokens/client/requests/ClientSideAccessTokensCreateClientSideAccessTokenRequest.js +5 -0
  24. package/api/resources/clientSideAccessTokens/client/requests/index.d.ts +1 -0
  25. package/api/resources/clientSideAccessTokens/client/requests/index.js +2 -0
  26. package/api/resources/clientSideAccessTokens/index.d.ts +2 -0
  27. package/api/resources/clientSideAccessTokens/index.js +18 -0
  28. package/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenRequestPolicyItem.d.ts +9 -0
  29. package/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenRequestPolicyItem.js +5 -0
  30. package/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenRequestPolicyItemAccessItem.d.ts +10 -0
  31. package/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenRequestPolicyItemAccessItem.js +12 -0
  32. package/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenResponse.d.ts +10 -0
  33. package/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenResponse.js +5 -0
  34. package/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenResponsePolicy.d.ts +8 -0
  35. package/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenResponsePolicy.js +5 -0
  36. package/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenResponsePolicyDataItem.d.ts +9 -0
  37. package/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenResponsePolicyDataItem.js +5 -0
  38. package/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenResponsePolicyDataItemAccessItem.d.ts +10 -0
  39. package/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenResponsePolicyDataItemAccessItem.js +12 -0
  40. package/api/resources/clientSideAccessTokens/types/index.d.ts +6 -0
  41. package/api/resources/clientSideAccessTokens/types/index.js +22 -0
  42. package/api/resources/groups/client/Client.js +6 -6
  43. package/api/resources/groups/resources/messages/client/Client.js +4 -4
  44. package/api/resources/health/client/Client.js +1 -1
  45. package/api/resources/identities/client/Client.js +7 -7
  46. package/api/resources/index.d.ts +3 -0
  47. package/api/resources/index.js +4 -1
  48. package/api/resources/jobs/client/Client.js +4 -4
  49. package/api/resources/models/client/Client.js +2 -2
  50. package/api/resources/providers/client/Client.js +4 -4
  51. package/api/resources/runs/client/Client.js +7 -7
  52. package/api/resources/sources/client/Client.js +6 -6
  53. package/api/resources/sources/resources/files/client/Client.js +3 -3
  54. package/api/resources/sources/resources/passages/client/Client.js +1 -1
  55. package/api/resources/steps/client/Client.js +2 -2
  56. package/api/resources/tag/client/Client.js +1 -1
  57. package/api/resources/templates/client/Client.js +1 -1
  58. package/api/resources/tools/client/Client.js +16 -16
  59. package/api/resources/voice/client/Client.js +1 -1
  60. package/api/types/BadRequestErrorBody.d.ts +6 -0
  61. package/api/types/BadRequestErrorBody.js +5 -0
  62. package/api/types/index.d.ts +1 -0
  63. package/api/types/index.js +1 -0
  64. package/dist/Client.d.ts +3 -0
  65. package/dist/Client.js +5 -0
  66. package/dist/api/errors/BadRequestError.d.ts +7 -0
  67. package/dist/api/errors/BadRequestError.js +51 -0
  68. package/dist/api/errors/index.d.ts +1 -0
  69. package/dist/api/errors/index.js +1 -0
  70. package/dist/api/resources/agents/client/Client.js +13 -13
  71. package/dist/api/resources/agents/resources/blocks/client/Client.js +5 -5
  72. package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
  73. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  74. package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  75. package/dist/api/resources/agents/resources/messages/client/Client.js +5 -5
  76. package/dist/api/resources/agents/resources/passages/client/Client.js +3 -3
  77. package/dist/api/resources/agents/resources/sources/client/Client.js +3 -3
  78. package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
  79. package/dist/api/resources/agents/resources/tools/client/Client.js +3 -3
  80. package/dist/api/resources/blocks/client/Client.js +6 -6
  81. package/dist/api/resources/clientSideAccessTokens/client/Client.d.ts +66 -0
  82. package/dist/api/resources/clientSideAccessTokens/client/Client.js +195 -0
  83. package/dist/api/resources/clientSideAccessTokens/client/index.d.ts +1 -0
  84. package/dist/api/resources/clientSideAccessTokens/client/index.js +17 -0
  85. package/dist/api/resources/clientSideAccessTokens/client/requests/ClientSideAccessTokensCreateClientSideAccessTokenRequest.d.ts +22 -0
  86. package/dist/api/resources/clientSideAccessTokens/client/requests/ClientSideAccessTokensCreateClientSideAccessTokenRequest.js +5 -0
  87. package/dist/api/resources/clientSideAccessTokens/client/requests/index.d.ts +1 -0
  88. package/dist/api/resources/clientSideAccessTokens/client/requests/index.js +2 -0
  89. package/dist/api/resources/clientSideAccessTokens/index.d.ts +2 -0
  90. package/dist/api/resources/clientSideAccessTokens/index.js +18 -0
  91. package/dist/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenRequestPolicyItem.d.ts +9 -0
  92. package/dist/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenRequestPolicyItem.js +5 -0
  93. package/dist/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenRequestPolicyItemAccessItem.d.ts +10 -0
  94. package/dist/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenRequestPolicyItemAccessItem.js +12 -0
  95. package/dist/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenResponse.d.ts +10 -0
  96. package/dist/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenResponse.js +5 -0
  97. package/dist/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenResponsePolicy.d.ts +8 -0
  98. package/dist/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenResponsePolicy.js +5 -0
  99. package/dist/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenResponsePolicyDataItem.d.ts +9 -0
  100. package/dist/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenResponsePolicyDataItem.js +5 -0
  101. package/dist/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenResponsePolicyDataItemAccessItem.d.ts +10 -0
  102. package/dist/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenResponsePolicyDataItemAccessItem.js +12 -0
  103. package/dist/api/resources/clientSideAccessTokens/types/index.d.ts +6 -0
  104. package/dist/api/resources/clientSideAccessTokens/types/index.js +22 -0
  105. package/dist/api/resources/groups/client/Client.js +6 -6
  106. package/dist/api/resources/groups/resources/messages/client/Client.js +4 -4
  107. package/dist/api/resources/health/client/Client.js +1 -1
  108. package/dist/api/resources/identities/client/Client.js +7 -7
  109. package/dist/api/resources/index.d.ts +3 -0
  110. package/dist/api/resources/index.js +4 -1
  111. package/dist/api/resources/jobs/client/Client.js +4 -4
  112. package/dist/api/resources/models/client/Client.js +2 -2
  113. package/dist/api/resources/providers/client/Client.js +4 -4
  114. package/dist/api/resources/runs/client/Client.js +7 -7
  115. package/dist/api/resources/sources/client/Client.js +6 -6
  116. package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
  117. package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
  118. package/dist/api/resources/steps/client/Client.js +2 -2
  119. package/dist/api/resources/tag/client/Client.js +1 -1
  120. package/dist/api/resources/templates/client/Client.js +1 -1
  121. package/dist/api/resources/tools/client/Client.js +16 -16
  122. package/dist/api/resources/voice/client/Client.js +1 -1
  123. package/dist/api/types/BadRequestErrorBody.d.ts +6 -0
  124. package/dist/api/types/BadRequestErrorBody.js +5 -0
  125. package/dist/api/types/index.d.ts +1 -0
  126. package/dist/api/types/index.js +1 -0
  127. package/dist/serialization/resources/clientSideAccessTokens/client/index.d.ts +1 -0
  128. package/dist/serialization/resources/clientSideAccessTokens/client/index.js +17 -0
  129. package/dist/serialization/resources/clientSideAccessTokens/client/requests/ClientSideAccessTokensCreateClientSideAccessTokenRequest.d.ts +15 -0
  130. package/dist/serialization/resources/clientSideAccessTokens/client/requests/ClientSideAccessTokensCreateClientSideAccessTokenRequest.js +46 -0
  131. package/dist/serialization/resources/clientSideAccessTokens/client/requests/index.d.ts +1 -0
  132. package/dist/serialization/resources/clientSideAccessTokens/client/requests/index.js +5 -0
  133. package/dist/serialization/resources/clientSideAccessTokens/index.d.ts +2 -0
  134. package/dist/serialization/resources/clientSideAccessTokens/index.js +18 -0
  135. package/dist/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenRequestPolicyItem.d.ts +15 -0
  136. package/dist/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenRequestPolicyItem.js +46 -0
  137. package/dist/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenRequestPolicyItemAccessItem.d.ts +10 -0
  138. package/dist/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenRequestPolicyItemAccessItem.js +41 -0
  139. package/dist/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenResponse.d.ts +16 -0
  140. package/dist/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenResponse.js +47 -0
  141. package/dist/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenResponsePolicy.d.ts +14 -0
  142. package/dist/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenResponsePolicy.js +45 -0
  143. package/dist/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenResponsePolicyDataItem.d.ts +15 -0
  144. package/dist/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenResponsePolicyDataItem.js +46 -0
  145. package/dist/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenResponsePolicyDataItemAccessItem.d.ts +10 -0
  146. package/dist/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenResponsePolicyDataItemAccessItem.js +41 -0
  147. package/dist/serialization/resources/clientSideAccessTokens/types/index.d.ts +6 -0
  148. package/dist/serialization/resources/clientSideAccessTokens/types/index.js +22 -0
  149. package/dist/serialization/resources/index.d.ts +3 -0
  150. package/dist/serialization/resources/index.js +4 -1
  151. package/dist/serialization/types/BadRequestErrorBody.d.ts +12 -0
  152. package/dist/serialization/types/BadRequestErrorBody.js +43 -0
  153. package/dist/serialization/types/index.d.ts +1 -0
  154. package/dist/serialization/types/index.js +1 -0
  155. package/dist/version.d.ts +1 -1
  156. package/dist/version.js +1 -1
  157. package/package.json +1 -1
  158. package/reference.md +147 -0
  159. package/serialization/resources/clientSideAccessTokens/client/index.d.ts +1 -0
  160. package/serialization/resources/clientSideAccessTokens/client/index.js +17 -0
  161. package/serialization/resources/clientSideAccessTokens/client/requests/ClientSideAccessTokensCreateClientSideAccessTokenRequest.d.ts +15 -0
  162. package/serialization/resources/clientSideAccessTokens/client/requests/ClientSideAccessTokensCreateClientSideAccessTokenRequest.js +46 -0
  163. package/serialization/resources/clientSideAccessTokens/client/requests/index.d.ts +1 -0
  164. package/serialization/resources/clientSideAccessTokens/client/requests/index.js +5 -0
  165. package/serialization/resources/clientSideAccessTokens/index.d.ts +2 -0
  166. package/serialization/resources/clientSideAccessTokens/index.js +18 -0
  167. package/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenRequestPolicyItem.d.ts +15 -0
  168. package/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenRequestPolicyItem.js +46 -0
  169. package/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenRequestPolicyItemAccessItem.d.ts +10 -0
  170. package/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenRequestPolicyItemAccessItem.js +41 -0
  171. package/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenResponse.d.ts +16 -0
  172. package/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenResponse.js +47 -0
  173. package/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenResponsePolicy.d.ts +14 -0
  174. package/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenResponsePolicy.js +45 -0
  175. package/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenResponsePolicyDataItem.d.ts +15 -0
  176. package/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenResponsePolicyDataItem.js +46 -0
  177. package/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenResponsePolicyDataItemAccessItem.d.ts +10 -0
  178. package/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensCreateClientSideAccessTokenResponsePolicyDataItemAccessItem.js +41 -0
  179. package/serialization/resources/clientSideAccessTokens/types/index.d.ts +6 -0
  180. package/serialization/resources/clientSideAccessTokens/types/index.js +22 -0
  181. package/serialization/resources/index.d.ts +3 -0
  182. package/serialization/resources/index.js +4 -1
  183. package/serialization/types/BadRequestErrorBody.d.ts +12 -0
  184. package/serialization/types/BadRequestErrorBody.js +43 -0
  185. package/serialization/types/index.d.ts +1 -0
  186. package/serialization/types/index.js +1 -0
  187. package/version.d.ts +1 -1
  188. package/version.js +1 -1
@@ -100,7 +100,7 @@ class Messages {
100
100
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
101
101
  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/agents/${encodeURIComponent(agentId)}/messages`),
102
102
  method: "GET",
103
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.91", "User-Agent": "@letta-ai/letta-client/0.1.91", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
103
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.92", "User-Agent": "@letta-ai/letta-client/0.1.92", "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
104
  contentType: "application/json",
105
105
  queryParameters: _queryParams,
106
106
  requestType: "json",
@@ -176,7 +176,7 @@ class Messages {
176
176
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
177
177
  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/agents/${encodeURIComponent(agentId)}/messages`),
178
178
  method: "POST",
179
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.91", "User-Agent": "@letta-ai/letta-client/0.1.91", "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),
179
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.92", "User-Agent": "@letta-ai/letta-client/0.1.92", "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),
180
180
  contentType: "application/json",
181
181
  requestType: "json",
182
182
  body: serializers.LettaRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -246,7 +246,7 @@ class Messages {
246
246
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
247
247
  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/agents/${encodeURIComponent(agentId)}/messages/${encodeURIComponent(messageId)}`),
248
248
  method: "PATCH",
249
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.91", "User-Agent": "@letta-ai/letta-client/0.1.91", "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),
249
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.92", "User-Agent": "@letta-ai/letta-client/0.1.92", "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),
250
250
  contentType: "application/json",
251
251
  requestType: "json",
252
252
  body: serializers.agents.MessagesModifyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -306,7 +306,7 @@ class Messages {
306
306
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
307
307
  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/agents/${encodeURIComponent(agentId)}/messages/stream`),
308
308
  method: "POST",
309
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.91", "User-Agent": "@letta-ai/letta-client/0.1.91", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
309
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.92", "User-Agent": "@letta-ai/letta-client/0.1.92", "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),
310
310
  contentType: "application/json",
311
311
  requestType: "json",
312
312
  body: serializers.LettaStreamingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -393,7 +393,7 @@ class Messages {
393
393
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
394
394
  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/agents/${encodeURIComponent(agentId)}/messages/async`),
395
395
  method: "POST",
396
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.91", "User-Agent": "@letta-ai/letta-client/0.1.91", "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),
396
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.92", "User-Agent": "@letta-ai/letta-client/0.1.92", "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),
397
397
  contentType: "application/json",
398
398
  requestType: "json",
399
399
  body: serializers.LettaRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -94,7 +94,7 @@ class Passages {
94
94
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
95
95
  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/agents/${encodeURIComponent(agentId)}/archival-memory`),
96
96
  method: "GET",
97
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.91", "User-Agent": "@letta-ai/letta-client/0.1.91", "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),
97
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.92", "User-Agent": "@letta-ai/letta-client/0.1.92", "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),
98
98
  contentType: "application/json",
99
99
  queryParameters: _queryParams,
100
100
  requestType: "json",
@@ -163,7 +163,7 @@ class Passages {
163
163
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
164
164
  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/agents/${encodeURIComponent(agentId)}/archival-memory`),
165
165
  method: "POST",
166
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.91", "User-Agent": "@letta-ai/letta-client/0.1.91", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
166
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.92", "User-Agent": "@letta-ai/letta-client/0.1.92", "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),
167
167
  contentType: "application/json",
168
168
  requestType: "json",
169
169
  body: serializers.agents.CreateArchivalMemory.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -230,7 +230,7 @@ class Passages {
230
230
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
231
231
  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/agents/${encodeURIComponent(agentId)}/archival-memory/${encodeURIComponent(memoryId)}`),
232
232
  method: "DELETE",
233
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.91", "User-Agent": "@letta-ai/letta-client/0.1.91", "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),
233
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.92", "User-Agent": "@letta-ai/letta-client/0.1.92", "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),
234
234
  contentType: "application/json",
235
235
  requestType: "json",
236
236
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -77,7 +77,7 @@ class Sources {
77
77
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
78
78
  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/agents/${encodeURIComponent(agentId)}/sources/attach/${encodeURIComponent(sourceId)}`),
79
79
  method: "PATCH",
80
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.91", "User-Agent": "@letta-ai/letta-client/0.1.91", "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
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.92", "User-Agent": "@letta-ai/letta-client/0.1.92", "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),
81
81
  contentType: "application/json",
82
82
  requestType: "json",
83
83
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -143,7 +143,7 @@ class Sources {
143
143
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
144
144
  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/agents/${encodeURIComponent(agentId)}/sources/detach/${encodeURIComponent(sourceId)}`),
145
145
  method: "PATCH",
146
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.91", "User-Agent": "@letta-ai/letta-client/0.1.91", "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),
146
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.92", "User-Agent": "@letta-ai/letta-client/0.1.92", "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),
147
147
  contentType: "application/json",
148
148
  requestType: "json",
149
149
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -208,7 +208,7 @@ class Sources {
208
208
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
209
209
  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/agents/${encodeURIComponent(agentId)}/sources`),
210
210
  method: "GET",
211
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.91", "User-Agent": "@letta-ai/letta-client/0.1.91", "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),
211
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.92", "User-Agent": "@letta-ai/letta-client/0.1.92", "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),
212
212
  contentType: "application/json",
213
213
  requestType: "json",
214
214
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -96,7 +96,7 @@ class Templates {
96
96
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
97
97
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/version-template`),
98
98
  method: "POST",
99
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.91", "User-Agent": "@letta-ai/letta-client/0.1.91", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
99
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.92", "User-Agent": "@letta-ai/letta-client/0.1.92", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
100
100
  contentType: "application/json",
101
101
  queryParameters: _queryParams,
102
102
  requestType: "json",
@@ -163,7 +163,7 @@ class Templates {
163
163
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
164
164
  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/agents/${encodeURIComponent(agentId)}/migrate`),
165
165
  method: "POST",
166
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.91", "User-Agent": "@letta-ai/letta-client/0.1.91", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
166
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.92", "User-Agent": "@letta-ai/letta-client/0.1.92", "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),
167
167
  contentType: "application/json",
168
168
  requestType: "json",
169
169
  body: serializers.agents.TemplatesMigrateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -236,7 +236,7 @@ class Templates {
236
236
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
237
237
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/template`),
238
238
  method: "POST",
239
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.91", "User-Agent": "@letta-ai/letta-client/0.1.91", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
239
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.92", "User-Agent": "@letta-ai/letta-client/0.1.92", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
240
240
  contentType: "application/json",
241
241
  requestType: "json",
242
242
  body: serializers.agents.TemplatesCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -76,7 +76,7 @@ class Tools {
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/agents/${encodeURIComponent(agentId)}/tools`),
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.91", "User-Agent": "@letta-ai/letta-client/0.1.91", "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.92", "User-Agent": "@letta-ai/letta-client/0.1.92", "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,
@@ -142,7 +142,7 @@ class Tools {
142
142
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
143
143
  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/agents/${encodeURIComponent(agentId)}/tools/attach/${encodeURIComponent(toolId)}`),
144
144
  method: "PATCH",
145
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.91", "User-Agent": "@letta-ai/letta-client/0.1.91", "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),
145
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.92", "User-Agent": "@letta-ai/letta-client/0.1.92", "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),
146
146
  contentType: "application/json",
147
147
  requestType: "json",
148
148
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -208,7 +208,7 @@ class Tools {
208
208
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
209
209
  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/agents/${encodeURIComponent(agentId)}/tools/detach/${encodeURIComponent(toolId)}`),
210
210
  method: "PATCH",
211
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.91", "User-Agent": "@letta-ai/letta-client/0.1.91", "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),
211
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.92", "User-Agent": "@letta-ai/letta-client/0.1.92", "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),
212
212
  contentType: "application/json",
213
213
  requestType: "json",
214
214
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -96,7 +96,7 @@ class Blocks {
96
96
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
97
97
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/blocks/"),
98
98
  method: "GET",
99
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.91", "User-Agent": "@letta-ai/letta-client/0.1.91", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
99
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.92", "User-Agent": "@letta-ai/letta-client/0.1.92", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
100
100
  contentType: "application/json",
101
101
  queryParameters: _queryParams,
102
102
  requestType: "json",
@@ -163,7 +163,7 @@ class Blocks {
163
163
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
164
164
  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/blocks/"),
165
165
  method: "POST",
166
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.91", "User-Agent": "@letta-ai/letta-client/0.1.91", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
166
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.92", "User-Agent": "@letta-ai/letta-client/0.1.92", "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),
167
167
  contentType: "application/json",
168
168
  requestType: "json",
169
169
  body: serializers.CreateBlock.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -227,7 +227,7 @@ class Blocks {
227
227
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
228
228
  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/blocks/${encodeURIComponent(blockId)}`),
229
229
  method: "GET",
230
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.91", "User-Agent": "@letta-ai/letta-client/0.1.91", "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),
230
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.92", "User-Agent": "@letta-ai/letta-client/0.1.92", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
231
231
  contentType: "application/json",
232
232
  requestType: "json",
233
233
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -290,7 +290,7 @@ class Blocks {
290
290
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
291
291
  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/blocks/${encodeURIComponent(blockId)}`),
292
292
  method: "DELETE",
293
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.91", "User-Agent": "@letta-ai/letta-client/0.1.91", "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),
293
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.92", "User-Agent": "@letta-ai/letta-client/0.1.92", "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),
294
294
  contentType: "application/json",
295
295
  requestType: "json",
296
296
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -354,7 +354,7 @@ class Blocks {
354
354
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
355
355
  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/blocks/${encodeURIComponent(blockId)}`),
356
356
  method: "PATCH",
357
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.91", "User-Agent": "@letta-ai/letta-client/0.1.91", "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),
357
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.92", "User-Agent": "@letta-ai/letta-client/0.1.92", "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),
358
358
  contentType: "application/json",
359
359
  requestType: "json",
360
360
  body: serializers.BlockUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -421,7 +421,7 @@ class Blocks {
421
421
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
422
422
  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/blocks/${encodeURIComponent(blockId)}/agents`),
423
423
  method: "GET",
424
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.91", "User-Agent": "@letta-ai/letta-client/0.1.91", "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),
424
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.92", "User-Agent": "@letta-ai/letta-client/0.1.92", "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),
425
425
  contentType: "application/json",
426
426
  requestType: "json",
427
427
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -0,0 +1,66 @@
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
+ import * as Letta from "../../../index";
7
+ export declare namespace ClientSideAccessTokens {
8
+ interface Options {
9
+ environment?: core.Supplier<environments.LettaEnvironment | string>;
10
+ /** Specify a custom URL to connect the client to. */
11
+ baseUrl?: core.Supplier<string>;
12
+ token?: core.Supplier<string | undefined>;
13
+ fetcher?: core.FetchFunction;
14
+ }
15
+ interface RequestOptions {
16
+ /** The maximum time to wait for a response in seconds. */
17
+ timeoutInSeconds?: number;
18
+ /** The number of times to retry the request. Defaults to 2. */
19
+ maxRetries?: number;
20
+ /** A hook to abort the request. */
21
+ abortSignal?: AbortSignal;
22
+ /** Additional headers to include in the request. */
23
+ headers?: Record<string, string>;
24
+ }
25
+ }
26
+ export declare class ClientSideAccessTokens {
27
+ protected readonly _options: ClientSideAccessTokens.Options;
28
+ constructor(_options?: ClientSideAccessTokens.Options);
29
+ /**
30
+ * Create a new client side access token with the specified configuration.
31
+ *
32
+ * @param {Letta.ClientSideAccessTokensCreateClientSideAccessTokenRequest} request
33
+ * @param {ClientSideAccessTokens.RequestOptions} requestOptions - Request-specific configuration.
34
+ *
35
+ * @throws {@link Letta.BadRequestError}
36
+ *
37
+ * @example
38
+ * await client.clientSideAccessTokens.clientSideAccessTokensCreateClientSideAccessToken({
39
+ * policy: [{
40
+ * type: "agent",
41
+ * id: "id",
42
+ * access: ["read_messages"]
43
+ * }],
44
+ * hostname: "hostname"
45
+ * })
46
+ */
47
+ clientSideAccessTokensCreateClientSideAccessToken(request: Letta.ClientSideAccessTokensCreateClientSideAccessTokenRequest, requestOptions?: ClientSideAccessTokens.RequestOptions): Promise<Letta.ClientSideAccessTokensCreateClientSideAccessTokenResponse>;
48
+ /**
49
+ * Delete a client side access token.
50
+ *
51
+ * @param {string} token - The access token to delete
52
+ * @param {unknown} request
53
+ * @param {ClientSideAccessTokens.RequestOptions} requestOptions - Request-specific configuration.
54
+ *
55
+ * @throws {@link Letta.BadRequestError}
56
+ *
57
+ * @example
58
+ * await client.clientSideAccessTokens.clientSideAccessTokensDeleteClientSideAccessToken("token", {
59
+ * "key": "value"
60
+ * })
61
+ */
62
+ clientSideAccessTokensDeleteClientSideAccessToken(token: string, request?: unknown, requestOptions?: ClientSideAccessTokens.RequestOptions): Promise<unknown>;
63
+ protected _getCustomAuthorizationHeaders(): Promise<{
64
+ Authorization: string;
65
+ }>;
66
+ }
@@ -0,0 +1,195 @@
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.ClientSideAccessTokens = void 0;
52
+ const environments = __importStar(require("../../../../environments"));
53
+ const core = __importStar(require("../../../../core"));
54
+ const Letta = __importStar(require("../../../index"));
55
+ const serializers = __importStar(require("../../../../serialization/index"));
56
+ const url_join_1 = __importDefault(require("url-join"));
57
+ const errors = __importStar(require("../../../../errors/index"));
58
+ class ClientSideAccessTokens {
59
+ constructor(_options = {}) {
60
+ this._options = _options;
61
+ }
62
+ /**
63
+ * Create a new client side access token with the specified configuration.
64
+ *
65
+ * @param {Letta.ClientSideAccessTokensCreateClientSideAccessTokenRequest} request
66
+ * @param {ClientSideAccessTokens.RequestOptions} requestOptions - Request-specific configuration.
67
+ *
68
+ * @throws {@link Letta.BadRequestError}
69
+ *
70
+ * @example
71
+ * await client.clientSideAccessTokens.clientSideAccessTokensCreateClientSideAccessToken({
72
+ * policy: [{
73
+ * type: "agent",
74
+ * id: "id",
75
+ * access: ["read_messages"]
76
+ * }],
77
+ * hostname: "hostname"
78
+ * })
79
+ */
80
+ clientSideAccessTokensCreateClientSideAccessToken(request, requestOptions) {
81
+ return __awaiter(this, void 0, void 0, function* () {
82
+ var _a, _b, _c;
83
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
84
+ 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/client-side-access-tokens"),
85
+ method: "POST",
86
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.92", "User-Agent": "@letta-ai/letta-client/0.1.92", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
87
+ contentType: "application/json",
88
+ requestType: "json",
89
+ body: serializers.ClientSideAccessTokensCreateClientSideAccessTokenRequest.jsonOrThrow(request, {
90
+ unrecognizedObjectKeys: "strip",
91
+ }),
92
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
93
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
94
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
95
+ });
96
+ if (_response.ok) {
97
+ return serializers.ClientSideAccessTokensCreateClientSideAccessTokenResponse.parseOrThrow(_response.body, {
98
+ unrecognizedObjectKeys: "passthrough",
99
+ allowUnrecognizedUnionMembers: true,
100
+ allowUnrecognizedEnumValues: true,
101
+ skipValidation: true,
102
+ breadcrumbsPrefix: ["response"],
103
+ });
104
+ }
105
+ if (_response.error.reason === "status-code") {
106
+ switch (_response.error.statusCode) {
107
+ case 400:
108
+ throw new Letta.BadRequestError(_response.error.body);
109
+ default:
110
+ throw new errors.LettaError({
111
+ statusCode: _response.error.statusCode,
112
+ body: _response.error.body,
113
+ });
114
+ }
115
+ }
116
+ switch (_response.error.reason) {
117
+ case "non-json":
118
+ throw new errors.LettaError({
119
+ statusCode: _response.error.statusCode,
120
+ body: _response.error.rawBody,
121
+ });
122
+ case "timeout":
123
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/client-side-access-tokens.");
124
+ case "unknown":
125
+ throw new errors.LettaError({
126
+ message: _response.error.errorMessage,
127
+ });
128
+ }
129
+ });
130
+ }
131
+ /**
132
+ * Delete a client side access token.
133
+ *
134
+ * @param {string} token - The access token to delete
135
+ * @param {unknown} request
136
+ * @param {ClientSideAccessTokens.RequestOptions} requestOptions - Request-specific configuration.
137
+ *
138
+ * @throws {@link Letta.BadRequestError}
139
+ *
140
+ * @example
141
+ * await client.clientSideAccessTokens.clientSideAccessTokensDeleteClientSideAccessToken("token", {
142
+ * "key": "value"
143
+ * })
144
+ */
145
+ clientSideAccessTokensDeleteClientSideAccessToken(token, request, requestOptions) {
146
+ return __awaiter(this, void 0, void 0, function* () {
147
+ var _a, _b, _c;
148
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
149
+ 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/client-side-access-tokens/${encodeURIComponent(token)}`),
150
+ method: "DELETE",
151
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.92", "User-Agent": "@letta-ai/letta-client/0.1.92", "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),
152
+ contentType: "application/json",
153
+ requestType: "json",
154
+ body: request,
155
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
156
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
157
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
158
+ });
159
+ if (_response.ok) {
160
+ return _response.body;
161
+ }
162
+ if (_response.error.reason === "status-code") {
163
+ switch (_response.error.statusCode) {
164
+ case 400:
165
+ throw new Letta.BadRequestError(_response.error.body);
166
+ default:
167
+ throw new errors.LettaError({
168
+ statusCode: _response.error.statusCode,
169
+ body: _response.error.body,
170
+ });
171
+ }
172
+ }
173
+ switch (_response.error.reason) {
174
+ case "non-json":
175
+ throw new errors.LettaError({
176
+ statusCode: _response.error.statusCode,
177
+ body: _response.error.rawBody,
178
+ });
179
+ case "timeout":
180
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling DELETE /v1/client-side-access-tokens/{token}.");
181
+ case "unknown":
182
+ throw new errors.LettaError({
183
+ message: _response.error.errorMessage,
184
+ });
185
+ }
186
+ });
187
+ }
188
+ _getCustomAuthorizationHeaders() {
189
+ return __awaiter(this, void 0, void 0, function* () {
190
+ const tokenValue = yield core.Supplier.get(this._options.token);
191
+ return { Authorization: `Bearer ${tokenValue}` };
192
+ });
193
+ }
194
+ }
195
+ exports.ClientSideAccessTokens = ClientSideAccessTokens;
@@ -0,0 +1 @@
1
+ export * from "./requests";
@@ -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("./requests"), exports);
@@ -0,0 +1,22 @@
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
+ * policy: [{
9
+ * type: "agent",
10
+ * id: "id",
11
+ * access: ["read_messages"]
12
+ * }],
13
+ * hostname: "hostname"
14
+ * }
15
+ */
16
+ export interface ClientSideAccessTokensCreateClientSideAccessTokenRequest {
17
+ policy: Letta.ClientSideAccessTokensCreateClientSideAccessTokenRequestPolicyItem[];
18
+ /** The hostname of the client side application. Please specify the full URL including the protocol (http or https). */
19
+ hostname: string;
20
+ /** The expiration date of the token. If not provided, the token will expire in 5 minutes */
21
+ expiresAt?: string;
22
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export { type ClientSideAccessTokensCreateClientSideAccessTokenRequest } from "./ClientSideAccessTokensCreateClientSideAccessTokenRequest";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export * from "./types";
2
+ export * from "./client";
@@ -0,0 +1,18 @@
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("./types"), exports);
18
+ __exportStar(require("./client"), exports);
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Letta from "../../../index";
5
+ export interface ClientSideAccessTokensCreateClientSideAccessTokenRequestPolicyItem {
6
+ type: "agent";
7
+ id: string;
8
+ access: Letta.ClientSideAccessTokensCreateClientSideAccessTokenRequestPolicyItemAccessItem[];
9
+ }
@@ -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 });