@letta-ai/letta-client 0.1.92 → 0.1.94
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.
- package/Client.d.ts +6 -0
- package/Client.js +16 -6
- package/api/resources/agents/client/Client.d.ts +0 -34
- package/api/resources/agents/client/Client.js +11 -154
- package/api/resources/agents/resources/blocks/client/Client.js +5 -5
- package/api/resources/agents/resources/context/client/Client.js +1 -1
- package/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
- package/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
- package/api/resources/agents/resources/messages/client/Client.js +5 -5
- package/api/resources/agents/resources/passages/client/Client.js +3 -3
- package/api/resources/agents/resources/sources/client/Client.js +3 -3
- package/api/resources/agents/resources/templates/client/Client.js +3 -3
- package/api/resources/agents/resources/tools/client/Client.js +3 -3
- package/api/resources/blocks/client/Client.js +6 -6
- package/api/resources/clientSideAccessTokens/client/Client.js +2 -2
- package/api/resources/groups/client/Client.js +6 -6
- package/api/resources/groups/resources/messages/client/Client.js +4 -4
- package/api/resources/health/client/Client.js +1 -1
- package/api/resources/identities/client/Client.js +7 -7
- package/api/resources/index.d.ts +4 -0
- package/api/resources/index.js +5 -1
- package/api/resources/jobs/client/Client.js +4 -4
- package/api/resources/messages/client/Client.d.ts +46 -0
- package/api/resources/messages/client/Client.js +133 -0
- package/api/resources/messages/client/index.d.ts +1 -0
- package/api/resources/messages/client/index.js +2 -0
- package/api/resources/messages/index.d.ts +2 -0
- package/api/resources/messages/index.js +18 -0
- package/api/resources/messages/resources/batches/client/Client.d.ts +87 -0
- package/api/resources/messages/resources/batches/client/Client.js +320 -0
- package/api/resources/messages/resources/batches/client/index.d.ts +1 -0
- package/api/resources/messages/resources/batches/client/index.js +17 -0
- package/api/resources/messages/resources/batches/client/requests/CreateBatch.d.ts +23 -0
- package/api/resources/messages/resources/batches/client/requests/index.d.ts +1 -0
- package/api/resources/messages/resources/batches/client/requests/index.js +2 -0
- package/api/resources/messages/resources/batches/index.d.ts +1 -0
- package/api/resources/messages/resources/batches/index.js +17 -0
- package/api/resources/messages/resources/index.d.ts +2 -0
- package/api/resources/messages/resources/index.js +41 -0
- package/api/resources/models/client/Client.js +2 -2
- package/api/resources/projects/client/Client.d.ts +42 -0
- package/api/resources/projects/client/Client.js +132 -0
- package/api/resources/projects/client/index.d.ts +1 -0
- package/api/resources/projects/client/index.js +17 -0
- package/api/resources/projects/client/requests/ProjectsListProjectsRequest.d.ts +12 -0
- package/api/resources/projects/client/requests/index.d.ts +1 -0
- package/api/resources/projects/client/requests/index.js +2 -0
- package/api/resources/projects/index.d.ts +2 -0
- package/api/resources/projects/index.js +18 -0
- package/api/resources/projects/types/ProjectsListProjectsResponse.d.ts +8 -0
- package/api/resources/projects/types/ProjectsListProjectsResponse.js +5 -0
- package/api/resources/projects/types/ProjectsListProjectsResponseProjectsItem.d.ts +8 -0
- package/api/resources/projects/types/ProjectsListProjectsResponseProjectsItem.js +5 -0
- package/api/resources/projects/types/index.d.ts +2 -0
- package/api/resources/projects/types/index.js +18 -0
- package/api/resources/providers/client/Client.js +4 -4
- package/api/resources/runs/client/Client.js +7 -7
- package/api/resources/sources/client/Client.js +6 -6
- package/api/resources/sources/resources/files/client/Client.js +3 -3
- package/api/resources/sources/resources/passages/client/Client.js +1 -1
- package/api/resources/steps/client/Client.js +2 -2
- package/api/resources/tag/client/Client.js +1 -1
- package/api/resources/templates/client/Client.d.ts +10 -0
- package/api/resources/templates/client/Client.js +68 -1
- package/api/resources/templates/client/requests/TemplatesListTemplatesRequest.d.ts +13 -0
- package/api/resources/templates/client/requests/TemplatesListTemplatesRequest.js +5 -0
- package/api/resources/templates/client/requests/index.d.ts +1 -0
- package/api/resources/templates/types/TemplatesListTemplatesResponse.d.ts +8 -0
- package/api/resources/templates/types/TemplatesListTemplatesResponse.js +5 -0
- package/api/resources/templates/types/TemplatesListTemplatesResponseTemplatesItem.d.ts +7 -0
- package/api/resources/templates/types/TemplatesListTemplatesResponseTemplatesItem.js +5 -0
- package/api/resources/templates/types/index.d.ts +2 -0
- package/api/resources/templates/types/index.js +2 -0
- package/api/resources/tools/client/Client.js +16 -16
- package/api/resources/voice/client/Client.js +1 -1
- package/api/types/BatchJob.d.ts +23 -0
- package/api/types/BatchJob.js +5 -0
- package/api/types/JobType.d.ts +2 -1
- package/api/types/JobType.js +1 -0
- package/api/types/index.d.ts +1 -1
- package/api/types/index.js +1 -1
- package/dist/Client.d.ts +6 -0
- package/dist/Client.js +16 -6
- package/dist/api/resources/agents/client/Client.d.ts +0 -34
- package/dist/api/resources/agents/client/Client.js +11 -154
- package/dist/api/resources/agents/resources/blocks/client/Client.js +5 -5
- package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/messages/client/Client.js +5 -5
- package/dist/api/resources/agents/resources/passages/client/Client.js +3 -3
- package/dist/api/resources/agents/resources/sources/client/Client.js +3 -3
- package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
- package/dist/api/resources/agents/resources/tools/client/Client.js +3 -3
- package/dist/api/resources/blocks/client/Client.js +6 -6
- package/dist/api/resources/clientSideAccessTokens/client/Client.js +2 -2
- package/dist/api/resources/groups/client/Client.js +6 -6
- package/dist/api/resources/groups/resources/messages/client/Client.js +4 -4
- package/dist/api/resources/health/client/Client.js +1 -1
- package/dist/api/resources/identities/client/Client.js +7 -7
- package/dist/api/resources/index.d.ts +4 -0
- package/dist/api/resources/index.js +5 -1
- package/dist/api/resources/jobs/client/Client.js +4 -4
- package/dist/api/resources/messages/client/Client.d.ts +46 -0
- package/dist/api/resources/messages/client/Client.js +133 -0
- package/dist/api/resources/messages/client/index.d.ts +1 -0
- package/dist/api/resources/messages/client/index.js +2 -0
- package/dist/api/resources/messages/index.d.ts +2 -0
- package/dist/api/resources/messages/index.js +18 -0
- package/dist/api/resources/messages/resources/batches/client/Client.d.ts +87 -0
- package/dist/api/resources/messages/resources/batches/client/Client.js +320 -0
- package/dist/api/resources/messages/resources/batches/client/index.d.ts +1 -0
- package/dist/api/resources/messages/resources/batches/client/index.js +17 -0
- package/dist/api/resources/messages/resources/batches/client/requests/CreateBatch.d.ts +23 -0
- package/dist/api/resources/messages/resources/batches/client/requests/CreateBatch.js +5 -0
- package/dist/api/resources/messages/resources/batches/client/requests/index.d.ts +1 -0
- package/dist/api/resources/messages/resources/batches/client/requests/index.js +2 -0
- package/dist/api/resources/messages/resources/batches/index.d.ts +1 -0
- package/dist/api/resources/messages/resources/batches/index.js +17 -0
- package/dist/api/resources/messages/resources/index.d.ts +2 -0
- package/dist/api/resources/messages/resources/index.js +41 -0
- package/dist/api/resources/models/client/Client.js +2 -2
- package/dist/api/resources/projects/client/Client.d.ts +42 -0
- package/dist/api/resources/projects/client/Client.js +132 -0
- package/dist/api/resources/projects/client/index.d.ts +1 -0
- package/dist/api/resources/projects/client/index.js +17 -0
- package/dist/api/resources/projects/client/requests/ProjectsListProjectsRequest.d.ts +12 -0
- package/dist/api/resources/projects/client/requests/ProjectsListProjectsRequest.js +5 -0
- package/dist/api/resources/projects/client/requests/index.d.ts +1 -0
- package/dist/api/resources/projects/client/requests/index.js +2 -0
- package/dist/api/resources/projects/index.d.ts +2 -0
- package/dist/api/resources/projects/index.js +18 -0
- package/dist/api/resources/projects/types/ProjectsListProjectsResponse.d.ts +8 -0
- package/dist/api/resources/projects/types/ProjectsListProjectsResponse.js +5 -0
- package/dist/api/resources/projects/types/ProjectsListProjectsResponseProjectsItem.d.ts +8 -0
- package/dist/api/resources/projects/types/ProjectsListProjectsResponseProjectsItem.js +5 -0
- package/dist/api/resources/projects/types/index.d.ts +2 -0
- package/dist/api/resources/projects/types/index.js +18 -0
- package/dist/api/resources/providers/client/Client.js +4 -4
- package/dist/api/resources/runs/client/Client.js +7 -7
- package/dist/api/resources/sources/client/Client.js +6 -6
- package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
- package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
- package/dist/api/resources/steps/client/Client.js +2 -2
- package/dist/api/resources/tag/client/Client.js +1 -1
- package/dist/api/resources/templates/client/Client.d.ts +10 -0
- package/dist/api/resources/templates/client/Client.js +68 -1
- package/dist/api/resources/templates/client/requests/TemplatesListTemplatesRequest.d.ts +13 -0
- package/dist/api/resources/templates/client/requests/TemplatesListTemplatesRequest.js +5 -0
- package/dist/api/resources/templates/client/requests/index.d.ts +1 -0
- package/dist/api/resources/templates/types/TemplatesListTemplatesResponse.d.ts +8 -0
- package/dist/api/resources/templates/types/TemplatesListTemplatesResponse.js +5 -0
- package/dist/api/resources/templates/types/TemplatesListTemplatesResponseTemplatesItem.d.ts +7 -0
- package/dist/api/resources/templates/types/TemplatesListTemplatesResponseTemplatesItem.js +5 -0
- package/dist/api/resources/templates/types/index.d.ts +2 -0
- package/dist/api/resources/templates/types/index.js +2 -0
- package/dist/api/resources/tools/client/Client.js +16 -16
- package/dist/api/resources/voice/client/Client.js +1 -1
- package/dist/api/types/BatchJob.d.ts +23 -0
- package/dist/api/types/BatchJob.js +5 -0
- package/dist/api/types/JobType.d.ts +2 -1
- package/dist/api/types/JobType.js +1 -0
- package/dist/api/types/index.d.ts +1 -1
- package/dist/api/types/index.js +1 -1
- package/dist/serialization/resources/agents/client/index.d.ts +0 -1
- package/dist/serialization/resources/agents/client/index.js +1 -2
- package/dist/serialization/resources/index.d.ts +3 -0
- package/dist/serialization/resources/index.js +4 -1
- package/dist/serialization/resources/messages/index.d.ts +1 -0
- package/dist/serialization/resources/messages/index.js +17 -0
- package/dist/serialization/resources/messages/resources/batches/client/index.d.ts +2 -0
- package/dist/serialization/resources/messages/resources/batches/client/index.js +41 -0
- package/dist/serialization/resources/messages/resources/batches/client/list.d.ts +11 -0
- package/dist/serialization/resources/messages/resources/batches/client/list.js +42 -0
- package/dist/serialization/resources/messages/resources/batches/client/requests/CreateBatch.d.ts +13 -0
- package/dist/serialization/{types/LettaBatchResponse.js → resources/messages/resources/batches/client/requests/CreateBatch.js} +5 -9
- package/dist/serialization/resources/messages/resources/batches/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/messages/resources/batches/client/requests/index.js +5 -0
- package/dist/serialization/resources/messages/resources/batches/index.d.ts +1 -0
- package/dist/serialization/resources/messages/resources/batches/index.js +17 -0
- package/dist/serialization/resources/messages/resources/index.d.ts +2 -0
- package/dist/serialization/resources/messages/resources/index.js +41 -0
- package/dist/serialization/resources/projects/index.d.ts +1 -0
- package/dist/serialization/resources/projects/index.js +17 -0
- package/dist/serialization/resources/projects/types/ProjectsListProjectsResponse.d.ts +14 -0
- package/{serialization/types/LettaBatchResponse.js → dist/serialization/resources/projects/types/ProjectsListProjectsResponse.js} +6 -9
- package/dist/serialization/resources/projects/types/ProjectsListProjectsResponseProjectsItem.d.ts +14 -0
- package/dist/serialization/resources/projects/types/ProjectsListProjectsResponseProjectsItem.js +45 -0
- package/dist/serialization/resources/projects/types/index.d.ts +2 -0
- package/dist/serialization/resources/projects/types/index.js +18 -0
- package/dist/serialization/resources/templates/types/TemplatesListTemplatesResponse.d.ts +14 -0
- package/dist/serialization/resources/templates/types/TemplatesListTemplatesResponse.js +45 -0
- package/dist/serialization/resources/templates/types/TemplatesListTemplatesResponseTemplatesItem.d.ts +13 -0
- package/dist/serialization/resources/{agents/client/createBatchMessageRequest.js → templates/types/TemplatesListTemplatesResponseTemplatesItem.js} +5 -3
- package/dist/serialization/resources/templates/types/index.d.ts +2 -0
- package/dist/serialization/resources/templates/types/index.js +2 -0
- package/dist/serialization/types/BatchJob.d.ts +22 -0
- package/dist/serialization/types/BatchJob.js +53 -0
- package/dist/serialization/types/JobType.d.ts +1 -1
- package/dist/serialization/types/JobType.js +1 -0
- package/dist/serialization/types/index.d.ts +1 -1
- package/dist/serialization/types/index.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +449 -149
- package/serialization/resources/agents/client/index.d.ts +0 -1
- package/serialization/resources/agents/client/index.js +1 -2
- package/serialization/resources/index.d.ts +3 -0
- package/serialization/resources/index.js +4 -1
- package/serialization/resources/messages/index.d.ts +1 -0
- package/serialization/resources/messages/index.js +17 -0
- package/serialization/resources/messages/resources/batches/client/index.d.ts +2 -0
- package/serialization/resources/messages/resources/batches/client/index.js +41 -0
- package/serialization/resources/messages/resources/batches/client/list.d.ts +11 -0
- package/serialization/resources/messages/resources/batches/client/list.js +42 -0
- package/serialization/resources/messages/resources/batches/client/requests/CreateBatch.d.ts +13 -0
- package/serialization/resources/messages/resources/batches/client/requests/CreateBatch.js +44 -0
- package/serialization/resources/messages/resources/batches/client/requests/index.d.ts +1 -0
- package/serialization/resources/messages/resources/batches/client/requests/index.js +5 -0
- package/serialization/resources/messages/resources/batches/index.d.ts +1 -0
- package/serialization/resources/messages/resources/batches/index.js +17 -0
- package/serialization/resources/messages/resources/index.d.ts +2 -0
- package/serialization/resources/messages/resources/index.js +41 -0
- package/serialization/resources/projects/index.d.ts +1 -0
- package/serialization/resources/projects/index.js +17 -0
- package/serialization/resources/projects/types/ProjectsListProjectsResponse.d.ts +14 -0
- package/serialization/resources/projects/types/ProjectsListProjectsResponse.js +45 -0
- package/serialization/resources/projects/types/ProjectsListProjectsResponseProjectsItem.d.ts +14 -0
- package/serialization/resources/projects/types/ProjectsListProjectsResponseProjectsItem.js +45 -0
- package/serialization/resources/projects/types/index.d.ts +2 -0
- package/serialization/resources/projects/types/index.js +18 -0
- package/serialization/resources/templates/types/TemplatesListTemplatesResponse.d.ts +14 -0
- package/serialization/resources/templates/types/TemplatesListTemplatesResponse.js +45 -0
- package/serialization/resources/templates/types/TemplatesListTemplatesResponseTemplatesItem.d.ts +13 -0
- package/serialization/resources/{agents/client/createBatchMessageRequest.js → templates/types/TemplatesListTemplatesResponseTemplatesItem.js} +5 -3
- package/serialization/resources/templates/types/index.d.ts +2 -0
- package/serialization/resources/templates/types/index.js +2 -0
- package/serialization/types/BatchJob.d.ts +22 -0
- package/serialization/types/BatchJob.js +53 -0
- package/serialization/types/JobType.d.ts +1 -1
- package/serialization/types/JobType.js +1 -0
- package/serialization/types/index.d.ts +1 -1
- package/serialization/types/index.js +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/types/LettaBatchResponse.d.ts +0 -16
- package/dist/api/types/LettaBatchResponse.d.ts +0 -16
- package/dist/serialization/resources/agents/client/createBatchMessageRequest.d.ts +0 -11
- package/dist/serialization/types/LettaBatchResponse.d.ts +0 -17
- package/serialization/resources/agents/client/createBatchMessageRequest.d.ts +0 -11
- package/serialization/types/LettaBatchResponse.d.ts +0 -17
- /package/api/{types/LettaBatchResponse.js → resources/messages/resources/batches/client/requests/CreateBatch.js} +0 -0
- /package/{dist/api/types/LettaBatchResponse.js → api/resources/projects/client/requests/ProjectsListProjectsRequest.js} +0 -0
|
@@ -103,7 +103,7 @@ class Steps {
|
|
|
103
103
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
104
104
|
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"),
|
|
105
105
|
method: "GET",
|
|
106
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
106
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
107
107
|
contentType: "application/json",
|
|
108
108
|
queryParameters: _queryParams,
|
|
109
109
|
requestType: "json",
|
|
@@ -169,7 +169,7 @@ class Steps {
|
|
|
169
169
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
170
170
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/steps/${encodeURIComponent(stepId)}`),
|
|
171
171
|
method: "GET",
|
|
172
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
172
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "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),
|
|
173
173
|
contentType: "application/json",
|
|
174
174
|
requestType: "json",
|
|
175
175
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -87,7 +87,7 @@ class Tag {
|
|
|
87
87
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
88
88
|
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/tags/"),
|
|
89
89
|
method: "GET",
|
|
90
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
90
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "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
91
|
contentType: "application/json",
|
|
92
92
|
queryParameters: _queryParams,
|
|
93
93
|
requestType: "json",
|
|
@@ -38,6 +38,16 @@ export declare class Templates {
|
|
|
38
38
|
* await client.templates.createAgents("project", "template_version")
|
|
39
39
|
*/
|
|
40
40
|
createAgents(project: string, templateVersion: string, request?: Letta.TemplatesCreateAgentsRequest, requestOptions?: Templates.RequestOptions): Promise<Letta.TemplatesCreateAgentsResponse>;
|
|
41
|
+
/**
|
|
42
|
+
* List all templates
|
|
43
|
+
*
|
|
44
|
+
* @param {Letta.TemplatesListTemplatesRequest} request
|
|
45
|
+
* @param {Templates.RequestOptions} requestOptions - Request-specific configuration.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* await client.templates.listtemplates()
|
|
49
|
+
*/
|
|
50
|
+
listtemplates(request?: Letta.TemplatesListTemplatesRequest, requestOptions?: Templates.RequestOptions): Promise<Letta.TemplatesListTemplatesResponse>;
|
|
41
51
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
42
52
|
Authorization: string;
|
|
43
53
|
}>;
|
|
@@ -75,7 +75,7 @@ class Templates {
|
|
|
75
75
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
76
76
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/templates/${encodeURIComponent(project)}/${encodeURIComponent(templateVersion)}/agents`),
|
|
77
77
|
method: "POST",
|
|
78
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
78
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
79
79
|
contentType: "application/json",
|
|
80
80
|
requestType: "json",
|
|
81
81
|
body: serializers.TemplatesCreateAgentsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -113,6 +113,73 @@ class Templates {
|
|
|
113
113
|
}
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
|
+
/**
|
|
117
|
+
* List all templates
|
|
118
|
+
*
|
|
119
|
+
* @param {Letta.TemplatesListTemplatesRequest} request
|
|
120
|
+
* @param {Templates.RequestOptions} requestOptions - Request-specific configuration.
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
* await client.templates.listtemplates()
|
|
124
|
+
*/
|
|
125
|
+
listtemplates() {
|
|
126
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
127
|
+
var _a, _b, _c;
|
|
128
|
+
const { limit, offset, name, projectId } = request;
|
|
129
|
+
const _queryParams = {};
|
|
130
|
+
if (limit != null) {
|
|
131
|
+
_queryParams["limit"] = limit.toString();
|
|
132
|
+
}
|
|
133
|
+
if (offset != null) {
|
|
134
|
+
_queryParams["offset"] = offset.toString();
|
|
135
|
+
}
|
|
136
|
+
if (name != null) {
|
|
137
|
+
_queryParams["name"] = name;
|
|
138
|
+
}
|
|
139
|
+
if (projectId != null) {
|
|
140
|
+
_queryParams["projectId"] = projectId;
|
|
141
|
+
}
|
|
142
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
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/templates"),
|
|
144
|
+
method: "GET",
|
|
145
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "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
|
+
contentType: "application/json",
|
|
147
|
+
queryParameters: _queryParams,
|
|
148
|
+
requestType: "json",
|
|
149
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
150
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
151
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
152
|
+
});
|
|
153
|
+
if (_response.ok) {
|
|
154
|
+
return serializers.TemplatesListTemplatesResponse.parseOrThrow(_response.body, {
|
|
155
|
+
unrecognizedObjectKeys: "passthrough",
|
|
156
|
+
allowUnrecognizedUnionMembers: true,
|
|
157
|
+
allowUnrecognizedEnumValues: true,
|
|
158
|
+
skipValidation: true,
|
|
159
|
+
breadcrumbsPrefix: ["response"],
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
if (_response.error.reason === "status-code") {
|
|
163
|
+
throw new errors.LettaError({
|
|
164
|
+
statusCode: _response.error.statusCode,
|
|
165
|
+
body: _response.error.body,
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
switch (_response.error.reason) {
|
|
169
|
+
case "non-json":
|
|
170
|
+
throw new errors.LettaError({
|
|
171
|
+
statusCode: _response.error.statusCode,
|
|
172
|
+
body: _response.error.rawBody,
|
|
173
|
+
});
|
|
174
|
+
case "timeout":
|
|
175
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/templates.");
|
|
176
|
+
case "unknown":
|
|
177
|
+
throw new errors.LettaError({
|
|
178
|
+
message: _response.error.errorMessage,
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
}
|
|
116
183
|
_getCustomAuthorizationHeaders() {
|
|
117
184
|
return __awaiter(this, void 0, void 0, function* () {
|
|
118
185
|
const tokenValue = yield core.Supplier.get(this._options.token);
|
|
@@ -15,3 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./TemplatesCreateAgentsResponse"), exports);
|
|
18
|
+
__exportStar(require("./TemplatesListTemplatesResponseTemplatesItem"), exports);
|
|
19
|
+
__exportStar(require("./TemplatesListTemplatesResponse"), exports);
|
|
@@ -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/tools/${encodeURIComponent(toolId)}`),
|
|
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.
|
|
79
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "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,
|
|
@@ -141,7 +141,7 @@ class Tools {
|
|
|
141
141
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
142
142
|
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/tools/${encodeURIComponent(toolId)}`),
|
|
143
143
|
method: "DELETE",
|
|
144
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
144
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "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
145
|
contentType: "application/json",
|
|
146
146
|
requestType: "json",
|
|
147
147
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -201,7 +201,7 @@ class Tools {
|
|
|
201
201
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
202
202
|
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/tools/${encodeURIComponent(toolId)}`),
|
|
203
203
|
method: "PATCH",
|
|
204
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
204
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "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),
|
|
205
205
|
contentType: "application/json",
|
|
206
206
|
requestType: "json",
|
|
207
207
|
body: serializers.ToolUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -278,7 +278,7 @@ class Tools {
|
|
|
278
278
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
279
279
|
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/tools/"),
|
|
280
280
|
method: "GET",
|
|
281
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
281
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "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),
|
|
282
282
|
contentType: "application/json",
|
|
283
283
|
queryParameters: _queryParams,
|
|
284
284
|
requestType: "json",
|
|
@@ -346,7 +346,7 @@ class Tools {
|
|
|
346
346
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
347
347
|
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/tools/"),
|
|
348
348
|
method: "POST",
|
|
349
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
349
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "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),
|
|
350
350
|
contentType: "application/json",
|
|
351
351
|
requestType: "json",
|
|
352
352
|
body: serializers.ToolCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -414,7 +414,7 @@ class Tools {
|
|
|
414
414
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
415
415
|
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/tools/"),
|
|
416
416
|
method: "PUT",
|
|
417
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
417
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
418
418
|
contentType: "application/json",
|
|
419
419
|
requestType: "json",
|
|
420
420
|
body: serializers.ToolCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -479,7 +479,7 @@ class Tools {
|
|
|
479
479
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
480
480
|
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/tools/add-base-tools"),
|
|
481
481
|
method: "POST",
|
|
482
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
482
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "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),
|
|
483
483
|
contentType: "application/json",
|
|
484
484
|
requestType: "json",
|
|
485
485
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -549,7 +549,7 @@ class Tools {
|
|
|
549
549
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
550
550
|
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/tools/run"),
|
|
551
551
|
method: "POST",
|
|
552
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
552
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "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),
|
|
553
553
|
contentType: "application/json",
|
|
554
554
|
requestType: "json",
|
|
555
555
|
body: serializers.ToolRunFromSource.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -616,7 +616,7 @@ class Tools {
|
|
|
616
616
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
617
617
|
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/tools/composio/apps"),
|
|
618
618
|
method: "GET",
|
|
619
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
619
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "user-id": userId != null ? userId : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
620
620
|
contentType: "application/json",
|
|
621
621
|
requestType: "json",
|
|
622
622
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -681,7 +681,7 @@ class Tools {
|
|
|
681
681
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
682
682
|
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/tools/composio/apps/${encodeURIComponent(composioAppName)}/actions`),
|
|
683
683
|
method: "GET",
|
|
684
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
684
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "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),
|
|
685
685
|
contentType: "application/json",
|
|
686
686
|
requestType: "json",
|
|
687
687
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -746,7 +746,7 @@ class Tools {
|
|
|
746
746
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
747
747
|
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/tools/composio/${encodeURIComponent(composioActionName)}`),
|
|
748
748
|
method: "POST",
|
|
749
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
749
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "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),
|
|
750
750
|
contentType: "application/json",
|
|
751
751
|
requestType: "json",
|
|
752
752
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -812,7 +812,7 @@ class Tools {
|
|
|
812
812
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
813
813
|
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/tools/mcp/servers"),
|
|
814
814
|
method: "GET",
|
|
815
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
815
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "user-id": userId != null ? userId : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
816
816
|
contentType: "application/json",
|
|
817
817
|
requestType: "json",
|
|
818
818
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -881,7 +881,7 @@ class Tools {
|
|
|
881
881
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
882
882
|
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/tools/mcp/servers"),
|
|
883
883
|
method: "PUT",
|
|
884
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
884
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "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),
|
|
885
885
|
contentType: "application/json",
|
|
886
886
|
requestType: "json",
|
|
887
887
|
body: serializers.AddMcpServerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -947,7 +947,7 @@ class Tools {
|
|
|
947
947
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
948
948
|
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/tools/mcp/servers/${encodeURIComponent(mcpServerName)}/tools`),
|
|
949
949
|
method: "GET",
|
|
950
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
950
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "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),
|
|
951
951
|
contentType: "application/json",
|
|
952
952
|
requestType: "json",
|
|
953
953
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1013,7 +1013,7 @@ class Tools {
|
|
|
1013
1013
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1014
1014
|
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/tools/mcp/servers/${encodeURIComponent(mcpServerName)}/${encodeURIComponent(mcpToolName)}`),
|
|
1015
1015
|
method: "POST",
|
|
1016
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
1016
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "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),
|
|
1017
1017
|
contentType: "application/json",
|
|
1018
1018
|
requestType: "json",
|
|
1019
1019
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1078,7 +1078,7 @@ class Tools {
|
|
|
1078
1078
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1079
1079
|
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/tools/mcp/servers/${encodeURIComponent(mcpServerName)}`),
|
|
1080
1080
|
method: "DELETE",
|
|
1081
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
1081
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "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),
|
|
1082
1082
|
contentType: "application/json",
|
|
1083
1083
|
requestType: "json",
|
|
1084
1084
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -84,7 +84,7 @@ class Voice {
|
|
|
84
84
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
85
85
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/voice-beta/${encodeURIComponent(agentId)}/chat/completions`),
|
|
86
86
|
method: "POST",
|
|
87
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
87
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "user-id": userId != null ? userId : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
88
88
|
contentType: "application/json",
|
|
89
89
|
requestType: "json",
|
|
90
90
|
body: serializers.CreateVoiceChatCompletionsRequestBody.jsonOrThrow(_body, {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Letta from "../index";
|
|
5
|
+
export interface BatchJob {
|
|
6
|
+
/** The id of the user that made this object. */
|
|
7
|
+
createdById?: string;
|
|
8
|
+
/** The id of the user that made this object. */
|
|
9
|
+
lastUpdatedById?: string;
|
|
10
|
+
/** The timestamp when the object was created. */
|
|
11
|
+
createdAt?: Date;
|
|
12
|
+
/** The timestamp when the object was last updated. */
|
|
13
|
+
updatedAt?: Date;
|
|
14
|
+
/** The status of the job. */
|
|
15
|
+
status?: Letta.JobStatus;
|
|
16
|
+
/** The unix timestamp of when the job was completed. */
|
|
17
|
+
completedAt?: Date;
|
|
18
|
+
/** The metadata of the job. */
|
|
19
|
+
metadata?: Record<string, unknown>;
|
|
20
|
+
jobType?: Letta.JobType;
|
|
21
|
+
/** The human-friendly ID of the Job */
|
|
22
|
+
id?: string;
|
|
23
|
+
}
|
package/api/types/JobType.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export type JobType = "job" | "run";
|
|
4
|
+
export type JobType = "job" | "run" | "batch";
|
|
5
5
|
export declare const JobType: {
|
|
6
6
|
readonly Job: "job";
|
|
7
7
|
readonly Run: "run";
|
|
8
|
+
readonly Batch: "batch";
|
|
8
9
|
};
|
package/api/types/JobType.js
CHANGED
package/api/types/index.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export * from "./AuthRequest";
|
|
|
22
22
|
export * from "./AuthResponse";
|
|
23
23
|
export * from "./AuthSchemeField";
|
|
24
24
|
export * from "./BaseToolRuleSchema";
|
|
25
|
+
export * from "./BatchJob";
|
|
25
26
|
export * from "./Block";
|
|
26
27
|
export * from "./BlockUpdate";
|
|
27
28
|
export * from "./ChatCompletionAssistantMessageParamContentItem";
|
|
@@ -116,7 +117,6 @@ export * from "./LlmConfigModelEndpointType";
|
|
|
116
117
|
export * from "./LlmConfigReasoningEffort";
|
|
117
118
|
export * from "./LlmConfig";
|
|
118
119
|
export * from "./LettaBatchRequest";
|
|
119
|
-
export * from "./LettaBatchResponse";
|
|
120
120
|
export * from "./LettaRequest";
|
|
121
121
|
export * from "./LettaRequestConfig";
|
|
122
122
|
export * from "./LettaResponse";
|
package/api/types/index.js
CHANGED
|
@@ -38,6 +38,7 @@ __exportStar(require("./AuthRequest"), exports);
|
|
|
38
38
|
__exportStar(require("./AuthResponse"), exports);
|
|
39
39
|
__exportStar(require("./AuthSchemeField"), exports);
|
|
40
40
|
__exportStar(require("./BaseToolRuleSchema"), exports);
|
|
41
|
+
__exportStar(require("./BatchJob"), exports);
|
|
41
42
|
__exportStar(require("./Block"), exports);
|
|
42
43
|
__exportStar(require("./BlockUpdate"), exports);
|
|
43
44
|
__exportStar(require("./ChatCompletionAssistantMessageParamContentItem"), exports);
|
|
@@ -132,7 +133,6 @@ __exportStar(require("./LlmConfigModelEndpointType"), exports);
|
|
|
132
133
|
__exportStar(require("./LlmConfigReasoningEffort"), exports);
|
|
133
134
|
__exportStar(require("./LlmConfig"), exports);
|
|
134
135
|
__exportStar(require("./LettaBatchRequest"), exports);
|
|
135
|
-
__exportStar(require("./LettaBatchResponse"), exports);
|
|
136
136
|
__exportStar(require("./LettaRequest"), exports);
|
|
137
137
|
__exportStar(require("./LettaRequestConfig"), exports);
|
|
138
138
|
__exportStar(require("./LettaResponse"), exports);
|
package/dist/Client.d.ts
CHANGED
|
@@ -16,9 +16,11 @@ import { Providers } from "./api/resources/providers/client/Client";
|
|
|
16
16
|
import { Runs } from "./api/resources/runs/client/Client";
|
|
17
17
|
import { Steps } from "./api/resources/steps/client/Client";
|
|
18
18
|
import { Tag } from "./api/resources/tag/client/Client";
|
|
19
|
+
import { Messages } from "./api/resources/messages/client/Client";
|
|
19
20
|
import { Voice } from "./api/resources/voice/client/Client";
|
|
20
21
|
import { Templates } from "./api/resources/templates/client/Client";
|
|
21
22
|
import { ClientSideAccessTokens } from "./api/resources/clientSideAccessTokens/client/Client";
|
|
23
|
+
import { Projects } from "./api/resources/projects/client/Client";
|
|
22
24
|
export declare namespace LettaClient {
|
|
23
25
|
interface Options {
|
|
24
26
|
environment?: core.Supplier<environments.LettaEnvironment | string>;
|
|
@@ -53,9 +55,11 @@ export declare class LettaClient {
|
|
|
53
55
|
protected _runs: Runs | undefined;
|
|
54
56
|
protected _steps: Steps | undefined;
|
|
55
57
|
protected _tag: Tag | undefined;
|
|
58
|
+
protected _messages: Messages | undefined;
|
|
56
59
|
protected _voice: Voice | undefined;
|
|
57
60
|
protected _templates: Templates | undefined;
|
|
58
61
|
protected _clientSideAccessTokens: ClientSideAccessTokens | undefined;
|
|
62
|
+
protected _projects: Projects | undefined;
|
|
59
63
|
constructor(_options?: LettaClient.Options);
|
|
60
64
|
get tools(): Tools;
|
|
61
65
|
get sources(): Sources;
|
|
@@ -70,7 +74,9 @@ export declare class LettaClient {
|
|
|
70
74
|
get runs(): Runs;
|
|
71
75
|
get steps(): Steps;
|
|
72
76
|
get tag(): Tag;
|
|
77
|
+
get messages(): Messages;
|
|
73
78
|
get voice(): Voice;
|
|
74
79
|
get templates(): Templates;
|
|
75
80
|
get clientSideAccessTokens(): ClientSideAccessTokens;
|
|
81
|
+
get projects(): Projects;
|
|
76
82
|
}
|
package/dist/Client.js
CHANGED
|
@@ -17,9 +17,11 @@ const Client_10 = require("./api/resources/providers/client/Client");
|
|
|
17
17
|
const Client_11 = require("./api/resources/runs/client/Client");
|
|
18
18
|
const Client_12 = require("./api/resources/steps/client/Client");
|
|
19
19
|
const Client_13 = require("./api/resources/tag/client/Client");
|
|
20
|
-
const Client_14 = require("./api/resources/
|
|
21
|
-
const Client_15 = require("./api/resources/
|
|
22
|
-
const Client_16 = require("./api/resources/
|
|
20
|
+
const Client_14 = require("./api/resources/messages/client/Client");
|
|
21
|
+
const Client_15 = require("./api/resources/voice/client/Client");
|
|
22
|
+
const Client_16 = require("./api/resources/templates/client/Client");
|
|
23
|
+
const Client_17 = require("./api/resources/clientSideAccessTokens/client/Client");
|
|
24
|
+
const Client_18 = require("./api/resources/projects/client/Client");
|
|
23
25
|
class LettaClient {
|
|
24
26
|
constructor(_options = {}) {
|
|
25
27
|
this._options = _options;
|
|
@@ -76,17 +78,25 @@ class LettaClient {
|
|
|
76
78
|
var _a;
|
|
77
79
|
return ((_a = this._tag) !== null && _a !== void 0 ? _a : (this._tag = new Client_13.Tag(this._options)));
|
|
78
80
|
}
|
|
81
|
+
get messages() {
|
|
82
|
+
var _a;
|
|
83
|
+
return ((_a = this._messages) !== null && _a !== void 0 ? _a : (this._messages = new Client_14.Messages(this._options)));
|
|
84
|
+
}
|
|
79
85
|
get voice() {
|
|
80
86
|
var _a;
|
|
81
|
-
return ((_a = this._voice) !== null && _a !== void 0 ? _a : (this._voice = new
|
|
87
|
+
return ((_a = this._voice) !== null && _a !== void 0 ? _a : (this._voice = new Client_15.Voice(this._options)));
|
|
82
88
|
}
|
|
83
89
|
get templates() {
|
|
84
90
|
var _a;
|
|
85
|
-
return ((_a = this._templates) !== null && _a !== void 0 ? _a : (this._templates = new
|
|
91
|
+
return ((_a = this._templates) !== null && _a !== void 0 ? _a : (this._templates = new Client_16.Templates(this._options)));
|
|
86
92
|
}
|
|
87
93
|
get clientSideAccessTokens() {
|
|
88
94
|
var _a;
|
|
89
|
-
return ((_a = this._clientSideAccessTokens) !== null && _a !== void 0 ? _a : (this._clientSideAccessTokens = new
|
|
95
|
+
return ((_a = this._clientSideAccessTokens) !== null && _a !== void 0 ? _a : (this._clientSideAccessTokens = new Client_17.ClientSideAccessTokens(this._options)));
|
|
96
|
+
}
|
|
97
|
+
get projects() {
|
|
98
|
+
var _a;
|
|
99
|
+
return ((_a = this._projects) !== null && _a !== void 0 ? _a : (this._projects = new Client_18.Projects(this._options)));
|
|
90
100
|
}
|
|
91
101
|
}
|
|
92
102
|
exports.LettaClient = LettaClient;
|
|
@@ -186,40 +186,6 @@ export declare class Agents {
|
|
|
186
186
|
* await client.agents.listAgentGroups("agent_id")
|
|
187
187
|
*/
|
|
188
188
|
listAgentGroups(agentId: string, request?: Letta.ListAgentGroupsRequest, requestOptions?: Agents.RequestOptions): Promise<Letta.Group[]>;
|
|
189
|
-
/**
|
|
190
|
-
* Submit a batch of agent messages for asynchronous processing.
|
|
191
|
-
* Creates a job that will fan out messages to all listed agents and process them in parallel.
|
|
192
|
-
*
|
|
193
|
-
* @param {Letta.LettaBatchRequest[]} request
|
|
194
|
-
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
195
|
-
*
|
|
196
|
-
* @throws {@link Letta.UnprocessableEntityError}
|
|
197
|
-
*
|
|
198
|
-
* @example
|
|
199
|
-
* await client.agents.createBatchMessageRequest([{
|
|
200
|
-
* messages: [{
|
|
201
|
-
* role: "user",
|
|
202
|
-
* content: [{
|
|
203
|
-
* type: "text",
|
|
204
|
-
* text: "text"
|
|
205
|
-
* }]
|
|
206
|
-
* }],
|
|
207
|
-
* agentId: "agent_id"
|
|
208
|
-
* }])
|
|
209
|
-
*/
|
|
210
|
-
createBatchMessageRequest(request: Letta.LettaBatchRequest[], requestOptions?: Agents.RequestOptions): Promise<Letta.LettaBatchResponse>;
|
|
211
|
-
/**
|
|
212
|
-
* Retrieve the result or current status of a previously submitted batch message request.
|
|
213
|
-
*
|
|
214
|
-
* @param {string} batchId
|
|
215
|
-
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
216
|
-
*
|
|
217
|
-
* @throws {@link Letta.UnprocessableEntityError}
|
|
218
|
-
*
|
|
219
|
-
* @example
|
|
220
|
-
* await client.agents.retrieveBatchMessageRequest("batch_id")
|
|
221
|
-
*/
|
|
222
|
-
retrieveBatchMessageRequest(batchId: string, requestOptions?: Agents.RequestOptions): Promise<Letta.LettaBatchResponse>;
|
|
223
189
|
/**
|
|
224
190
|
* <Note>This endpoint is only available on Letta Cloud.</Note>
|
|
225
191
|
*
|