@letta-ai/letta-client 0.1.142 → 0.1.144
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Client.d.ts +4 -0
- package/README.md +1 -1
- package/api/resources/agents/client/Client.d.ts +4 -0
- package/api/resources/agents/client/Client.js +31 -23
- package/api/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -2
- package/api/resources/agents/resources/blocks/client/Client.d.ts +4 -0
- package/api/resources/agents/resources/blocks/client/Client.js +15 -5
- package/api/resources/agents/resources/context/client/Client.d.ts +4 -0
- package/api/resources/agents/resources/context/client/Client.js +3 -1
- package/api/resources/agents/resources/coreMemory/client/Client.d.ts +4 -0
- package/api/resources/agents/resources/coreMemory/client/Client.js +3 -1
- package/api/resources/agents/resources/groups/client/Client.d.ts +4 -0
- package/api/resources/agents/resources/groups/client/Client.js +3 -1
- package/api/resources/agents/resources/memoryVariables/client/Client.d.ts +4 -0
- package/api/resources/agents/resources/memoryVariables/client/Client.js +3 -1
- package/api/resources/agents/resources/messages/client/Client.d.ts +4 -0
- package/api/resources/agents/resources/messages/client/Client.js +18 -6
- package/api/resources/agents/resources/passages/client/Client.d.ts +4 -0
- package/api/resources/agents/resources/passages/client/Client.js +12 -4
- package/api/resources/agents/resources/sources/client/Client.d.ts +4 -0
- package/api/resources/agents/resources/sources/client/Client.js +9 -3
- package/api/resources/agents/resources/templates/client/Client.d.ts +4 -0
- package/api/resources/agents/resources/templates/client/Client.js +9 -3
- package/api/resources/agents/resources/tools/client/Client.d.ts +4 -0
- package/api/resources/agents/resources/tools/client/Client.js +9 -3
- package/api/resources/batches/client/Client.d.ts +4 -0
- package/api/resources/batches/client/Client.js +12 -4
- package/api/resources/blocks/client/Client.d.ts +4 -0
- package/api/resources/blocks/client/Client.js +18 -6
- package/api/resources/blocks/resources/agents/client/Client.d.ts +4 -0
- package/api/resources/blocks/resources/agents/client/Client.js +3 -1
- package/api/resources/clientSideAccessTokens/client/Client.d.ts +4 -0
- package/api/resources/clientSideAccessTokens/client/Client.js +6 -2
- package/api/resources/embeddingModels/client/Client.d.ts +4 -0
- package/api/resources/embeddingModels/client/Client.js +3 -1
- package/api/resources/groups/client/Client.d.ts +4 -0
- package/api/resources/groups/client/Client.js +20 -21
- package/api/resources/groups/client/requests/GroupCreate.d.ts +0 -1
- package/api/resources/groups/client/requests/GroupUpdate.d.ts +0 -1
- package/api/resources/groups/resources/messages/client/Client.d.ts +4 -0
- package/api/resources/groups/resources/messages/client/Client.js +15 -5
- package/api/resources/health/client/Client.d.ts +4 -0
- package/api/resources/health/client/Client.js +3 -1
- package/api/resources/identities/client/Client.d.ts +4 -0
- package/api/resources/identities/client/Client.js +23 -22
- package/api/resources/identities/client/requests/IdentityCreate.d.ts +0 -1
- package/api/resources/identities/client/requests/IdentityUpsert.d.ts +0 -1
- package/api/resources/identities/resources/properties/client/Client.d.ts +4 -0
- package/api/resources/identities/resources/properties/client/Client.js +3 -1
- package/api/resources/jobs/client/Client.d.ts +4 -0
- package/api/resources/jobs/client/Client.js +12 -4
- package/api/resources/messages/client/Client.d.ts +4 -0
- package/api/resources/messages/client/Client.js +3 -1
- package/api/resources/models/client/Client.d.ts +4 -0
- package/api/resources/models/client/Client.js +3 -1
- package/api/resources/projects/client/Client.d.ts +4 -0
- package/api/resources/projects/client/Client.js +3 -1
- package/api/resources/providers/client/Client.d.ts +4 -0
- package/api/resources/providers/client/Client.js +15 -5
- package/api/resources/runs/client/Client.d.ts +4 -0
- package/api/resources/runs/client/Client.js +12 -4
- package/api/resources/runs/resources/messages/client/Client.d.ts +4 -0
- package/api/resources/runs/resources/messages/client/Client.js +3 -1
- package/api/resources/runs/resources/steps/client/Client.d.ts +4 -0
- package/api/resources/runs/resources/steps/client/Client.js +3 -1
- package/api/resources/runs/resources/usage/client/Client.d.ts +4 -0
- package/api/resources/runs/resources/usage/client/Client.js +3 -1
- package/api/resources/sources/client/Client.d.ts +4 -0
- package/api/resources/sources/client/Client.js +24 -8
- package/api/resources/sources/resources/files/client/Client.d.ts +4 -0
- package/api/resources/sources/resources/files/client/Client.js +9 -3
- package/api/resources/sources/resources/passages/client/Client.d.ts +4 -0
- package/api/resources/sources/resources/passages/client/Client.js +3 -1
- package/api/resources/steps/client/Client.d.ts +4 -13
- package/api/resources/steps/client/Client.js +10 -75
- package/api/resources/steps/client/requests/StepsListRequest.d.ts +4 -0
- package/api/resources/steps/client/requests/index.d.ts +0 -1
- package/api/resources/steps/resources/feedback/client/Client.d.ts +12 -2
- package/api/resources/steps/resources/feedback/client/Client.js +43 -11
- package/api/resources/steps/resources/feedback/client/index.d.ts +1 -1
- package/api/resources/steps/resources/feedback/client/index.js +15 -0
- package/api/resources/steps/{client/requests/AddFeedbackRequest.d.ts → resources/feedback/client/requests/FeedbackCreateRequest.d.ts} +2 -2
- package/api/resources/steps/resources/feedback/client/requests/index.d.ts +1 -0
- package/api/resources/steps/resources/feedback/client/requests/index.js +2 -0
- package/api/resources/steps/resources/index.d.ts +1 -0
- package/api/resources/steps/resources/index.js +4 -0
- package/api/resources/tags/client/Client.d.ts +4 -0
- package/api/resources/tags/client/Client.js +3 -1
- package/api/resources/telemetry/client/Client.d.ts +4 -0
- package/api/resources/telemetry/client/Client.js +3 -1
- package/api/resources/templates/client/Client.d.ts +4 -0
- package/api/resources/templates/client/Client.js +3 -1
- package/api/resources/templates/resources/agents/client/Client.d.ts +4 -0
- package/api/resources/templates/resources/agents/client/Client.js +3 -1
- package/api/resources/tools/client/Client.d.ts +4 -0
- package/api/resources/tools/client/Client.js +57 -19
- package/api/resources/voice/client/Client.d.ts +4 -0
- package/api/resources/voice/client/Client.js +3 -1
- package/dist/Client.d.ts +4 -0
- package/dist/api/resources/agents/client/Client.d.ts +4 -0
- package/dist/api/resources/agents/client/Client.js +31 -23
- package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -2
- package/dist/api/resources/agents/resources/blocks/client/Client.d.ts +4 -0
- package/dist/api/resources/agents/resources/blocks/client/Client.js +15 -5
- package/dist/api/resources/agents/resources/context/client/Client.d.ts +4 -0
- package/dist/api/resources/agents/resources/context/client/Client.js +3 -1
- package/dist/api/resources/agents/resources/coreMemory/client/Client.d.ts +4 -0
- package/dist/api/resources/agents/resources/coreMemory/client/Client.js +3 -1
- package/dist/api/resources/agents/resources/groups/client/Client.d.ts +4 -0
- package/dist/api/resources/agents/resources/groups/client/Client.js +3 -1
- package/dist/api/resources/agents/resources/memoryVariables/client/Client.d.ts +4 -0
- package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +3 -1
- package/dist/api/resources/agents/resources/messages/client/Client.d.ts +4 -0
- package/dist/api/resources/agents/resources/messages/client/Client.js +18 -6
- package/dist/api/resources/agents/resources/passages/client/Client.d.ts +4 -0
- package/dist/api/resources/agents/resources/passages/client/Client.js +12 -4
- package/dist/api/resources/agents/resources/sources/client/Client.d.ts +4 -0
- package/dist/api/resources/agents/resources/sources/client/Client.js +9 -3
- package/dist/api/resources/agents/resources/templates/client/Client.d.ts +4 -0
- package/dist/api/resources/agents/resources/templates/client/Client.js +9 -3
- package/dist/api/resources/agents/resources/tools/client/Client.d.ts +4 -0
- package/dist/api/resources/agents/resources/tools/client/Client.js +9 -3
- package/dist/api/resources/batches/client/Client.d.ts +4 -0
- package/dist/api/resources/batches/client/Client.js +12 -4
- package/dist/api/resources/blocks/client/Client.d.ts +4 -0
- package/dist/api/resources/blocks/client/Client.js +18 -6
- package/dist/api/resources/blocks/resources/agents/client/Client.d.ts +4 -0
- package/dist/api/resources/blocks/resources/agents/client/Client.js +3 -1
- package/dist/api/resources/clientSideAccessTokens/client/Client.d.ts +4 -0
- package/dist/api/resources/clientSideAccessTokens/client/Client.js +6 -2
- package/dist/api/resources/embeddingModels/client/Client.d.ts +4 -0
- package/dist/api/resources/embeddingModels/client/Client.js +3 -1
- package/dist/api/resources/groups/client/Client.d.ts +4 -0
- package/dist/api/resources/groups/client/Client.js +20 -21
- package/dist/api/resources/groups/client/requests/GroupCreate.d.ts +0 -1
- package/dist/api/resources/groups/client/requests/GroupUpdate.d.ts +0 -1
- package/dist/api/resources/groups/resources/messages/client/Client.d.ts +4 -0
- package/dist/api/resources/groups/resources/messages/client/Client.js +15 -5
- package/dist/api/resources/health/client/Client.d.ts +4 -0
- package/dist/api/resources/health/client/Client.js +3 -1
- package/dist/api/resources/identities/client/Client.d.ts +4 -0
- package/dist/api/resources/identities/client/Client.js +23 -22
- package/dist/api/resources/identities/client/requests/IdentityCreate.d.ts +0 -1
- package/dist/api/resources/identities/client/requests/IdentityUpsert.d.ts +0 -1
- package/dist/api/resources/identities/resources/properties/client/Client.d.ts +4 -0
- package/dist/api/resources/identities/resources/properties/client/Client.js +3 -1
- package/dist/api/resources/jobs/client/Client.d.ts +4 -0
- package/dist/api/resources/jobs/client/Client.js +12 -4
- package/dist/api/resources/messages/client/Client.d.ts +4 -0
- package/dist/api/resources/messages/client/Client.js +3 -1
- package/dist/api/resources/models/client/Client.d.ts +4 -0
- package/dist/api/resources/models/client/Client.js +3 -1
- package/dist/api/resources/projects/client/Client.d.ts +4 -0
- package/dist/api/resources/projects/client/Client.js +3 -1
- package/dist/api/resources/providers/client/Client.d.ts +4 -0
- package/dist/api/resources/providers/client/Client.js +15 -5
- package/dist/api/resources/runs/client/Client.d.ts +4 -0
- package/dist/api/resources/runs/client/Client.js +12 -4
- package/dist/api/resources/runs/resources/messages/client/Client.d.ts +4 -0
- package/dist/api/resources/runs/resources/messages/client/Client.js +3 -1
- package/dist/api/resources/runs/resources/steps/client/Client.d.ts +4 -0
- package/dist/api/resources/runs/resources/steps/client/Client.js +3 -1
- package/dist/api/resources/runs/resources/usage/client/Client.d.ts +4 -0
- package/dist/api/resources/runs/resources/usage/client/Client.js +3 -1
- package/dist/api/resources/sources/client/Client.d.ts +4 -0
- package/dist/api/resources/sources/client/Client.js +24 -8
- package/dist/api/resources/sources/resources/files/client/Client.d.ts +4 -0
- package/dist/api/resources/sources/resources/files/client/Client.js +9 -3
- package/dist/api/resources/sources/resources/passages/client/Client.d.ts +4 -0
- package/dist/api/resources/sources/resources/passages/client/Client.js +3 -1
- package/dist/api/resources/steps/client/Client.d.ts +4 -13
- package/dist/api/resources/steps/client/Client.js +10 -75
- package/dist/api/resources/steps/client/requests/StepsListRequest.d.ts +4 -0
- package/dist/api/resources/steps/client/requests/index.d.ts +0 -1
- package/dist/api/resources/steps/resources/feedback/client/Client.d.ts +12 -2
- package/dist/api/resources/steps/resources/feedback/client/Client.js +43 -11
- package/dist/api/resources/steps/resources/feedback/client/index.d.ts +1 -1
- package/dist/api/resources/steps/resources/feedback/client/index.js +15 -0
- package/dist/api/resources/steps/{client/requests/AddFeedbackRequest.d.ts → resources/feedback/client/requests/FeedbackCreateRequest.d.ts} +2 -2
- package/dist/api/resources/steps/resources/feedback/client/requests/index.d.ts +1 -0
- package/dist/api/resources/steps/resources/feedback/client/requests/index.js +2 -0
- package/dist/api/resources/steps/resources/index.d.ts +1 -0
- package/dist/api/resources/steps/resources/index.js +4 -0
- package/dist/api/resources/tags/client/Client.d.ts +4 -0
- package/dist/api/resources/tags/client/Client.js +3 -1
- package/dist/api/resources/telemetry/client/Client.d.ts +4 -0
- package/dist/api/resources/telemetry/client/Client.js +3 -1
- package/dist/api/resources/templates/client/Client.d.ts +4 -0
- package/dist/api/resources/templates/client/Client.js +3 -1
- package/dist/api/resources/templates/resources/agents/client/Client.d.ts +4 -0
- package/dist/api/resources/templates/resources/agents/client/Client.js +3 -1
- package/dist/api/resources/tools/client/Client.d.ts +4 -0
- package/dist/api/resources/tools/client/Client.js +57 -19
- package/dist/api/resources/voice/client/Client.d.ts +4 -0
- package/dist/api/resources/voice/client/Client.js +3 -1
- package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -1
- package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.js +1 -1
- package/dist/serialization/resources/groups/client/requests/GroupCreate.d.ts +1 -1
- package/dist/serialization/resources/groups/client/requests/GroupUpdate.d.ts +1 -1
- package/dist/serialization/resources/identities/client/requests/IdentityCreate.d.ts +1 -1
- package/dist/serialization/resources/identities/client/requests/IdentityUpsert.d.ts +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +25 -73
- package/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -1
- package/serialization/resources/agents/client/requests/CreateAgentRequest.js +1 -1
- package/serialization/resources/groups/client/requests/GroupCreate.d.ts +1 -1
- package/serialization/resources/groups/client/requests/GroupUpdate.d.ts +1 -1
- package/serialization/resources/identities/client/requests/IdentityCreate.d.ts +1 -1
- package/serialization/resources/identities/client/requests/IdentityUpsert.d.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- /package/api/resources/steps/{client/requests/AddFeedbackRequest.js → resources/feedback/client/requests/FeedbackCreateRequest.js} +0 -0
- /package/dist/api/resources/steps/{client/requests/AddFeedbackRequest.js → resources/feedback/client/requests/FeedbackCreateRequest.js} +0 -0
|
@@ -84,7 +84,9 @@ class Projects {
|
|
|
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/projects"),
|
|
86
86
|
method: "GET",
|
|
87
|
-
headers: Object.assign(Object.assign({ "X-
|
|
87
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
88
|
+
? yield core.Supplier.get(this._options.project)
|
|
89
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
88
90
|
contentType: "application/json",
|
|
89
91
|
queryParameters: _queryParams,
|
|
90
92
|
requestType: "json",
|
|
@@ -10,6 +10,8 @@ export declare namespace Providers {
|
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
token?: core.Supplier<string | undefined>;
|
|
13
|
+
/** Override the X-Project header */
|
|
14
|
+
project?: core.Supplier<string | undefined>;
|
|
13
15
|
fetcher?: core.FetchFunction;
|
|
14
16
|
}
|
|
15
17
|
interface RequestOptions {
|
|
@@ -19,6 +21,8 @@ export declare namespace Providers {
|
|
|
19
21
|
maxRetries?: number;
|
|
20
22
|
/** A hook to abort the request. */
|
|
21
23
|
abortSignal?: AbortSignal;
|
|
24
|
+
/** Override the X-Project header */
|
|
25
|
+
project?: string | undefined;
|
|
22
26
|
/** Additional headers to include in the request. */
|
|
23
27
|
headers?: Record<string, string>;
|
|
24
28
|
}
|
|
@@ -90,7 +90,9 @@ class Providers {
|
|
|
90
90
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
91
91
|
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/providers/"),
|
|
92
92
|
method: "GET",
|
|
93
|
-
headers: Object.assign(Object.assign({ "X-
|
|
93
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
94
|
+
? yield core.Supplier.get(this._options.project)
|
|
95
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
94
96
|
contentType: "application/json",
|
|
95
97
|
queryParameters: _queryParams,
|
|
96
98
|
requestType: "json",
|
|
@@ -160,7 +162,9 @@ class Providers {
|
|
|
160
162
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
161
163
|
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/providers/"),
|
|
162
164
|
method: "POST",
|
|
163
|
-
headers: Object.assign(Object.assign({ "X-
|
|
165
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
166
|
+
? yield core.Supplier.get(this._options.project)
|
|
167
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
164
168
|
contentType: "application/json",
|
|
165
169
|
requestType: "json",
|
|
166
170
|
body: serializers.ProviderCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -226,7 +230,9 @@ class Providers {
|
|
|
226
230
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
227
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/providers/${encodeURIComponent(providerId)}`),
|
|
228
232
|
method: "DELETE",
|
|
229
|
-
headers: Object.assign(Object.assign({ "X-
|
|
233
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
234
|
+
? yield core.Supplier.get(this._options.project)
|
|
235
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
230
236
|
contentType: "application/json",
|
|
231
237
|
requestType: "json",
|
|
232
238
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -288,7 +294,9 @@ class Providers {
|
|
|
288
294
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
289
295
|
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/providers/${encodeURIComponent(providerId)}`),
|
|
290
296
|
method: "PATCH",
|
|
291
|
-
headers: Object.assign(Object.assign({ "X-
|
|
297
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
298
|
+
? yield core.Supplier.get(this._options.project)
|
|
299
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
292
300
|
contentType: "application/json",
|
|
293
301
|
requestType: "json",
|
|
294
302
|
body: serializers.ProviderUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -351,7 +359,9 @@ class Providers {
|
|
|
351
359
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
352
360
|
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/providers/check"),
|
|
353
361
|
method: "GET",
|
|
354
|
-
headers: Object.assign(Object.assign({ "X-
|
|
362
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
363
|
+
? yield core.Supplier.get(this._options.project)
|
|
364
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
355
365
|
contentType: "application/json",
|
|
356
366
|
requestType: "json",
|
|
357
367
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -13,6 +13,8 @@ export declare namespace Runs {
|
|
|
13
13
|
/** Specify a custom URL to connect the client to. */
|
|
14
14
|
baseUrl?: core.Supplier<string>;
|
|
15
15
|
token?: core.Supplier<string | undefined>;
|
|
16
|
+
/** Override the X-Project header */
|
|
17
|
+
project?: core.Supplier<string | undefined>;
|
|
16
18
|
fetcher?: core.FetchFunction;
|
|
17
19
|
}
|
|
18
20
|
interface RequestOptions {
|
|
@@ -22,6 +24,8 @@ export declare namespace Runs {
|
|
|
22
24
|
maxRetries?: number;
|
|
23
25
|
/** A hook to abort the request. */
|
|
24
26
|
abortSignal?: AbortSignal;
|
|
27
|
+
/** Override the X-Project header */
|
|
28
|
+
project?: string | undefined;
|
|
25
29
|
/** Additional headers to include in the request. */
|
|
26
30
|
headers?: Record<string, string>;
|
|
27
31
|
}
|
|
@@ -101,7 +101,9 @@ class Runs {
|
|
|
101
101
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
102
102
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/runs/"),
|
|
103
103
|
method: "GET",
|
|
104
|
-
headers: Object.assign(Object.assign({ "X-
|
|
104
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
105
|
+
? yield core.Supplier.get(this._options.project)
|
|
106
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
105
107
|
contentType: "application/json",
|
|
106
108
|
queryParameters: _queryParams,
|
|
107
109
|
requestType: "json",
|
|
@@ -177,7 +179,9 @@ class Runs {
|
|
|
177
179
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
178
180
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/runs/active"),
|
|
179
181
|
method: "GET",
|
|
180
|
-
headers: Object.assign(Object.assign({ "X-
|
|
182
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
183
|
+
? yield core.Supplier.get(this._options.project)
|
|
184
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
181
185
|
contentType: "application/json",
|
|
182
186
|
queryParameters: _queryParams,
|
|
183
187
|
requestType: "json",
|
|
@@ -243,7 +247,9 @@ class Runs {
|
|
|
243
247
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
244
248
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/runs/${encodeURIComponent(runId)}`),
|
|
245
249
|
method: "GET",
|
|
246
|
-
headers: Object.assign(Object.assign({ "X-
|
|
250
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
251
|
+
? yield core.Supplier.get(this._options.project)
|
|
252
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
247
253
|
contentType: "application/json",
|
|
248
254
|
requestType: "json",
|
|
249
255
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -308,7 +314,9 @@ class Runs {
|
|
|
308
314
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
309
315
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/runs/${encodeURIComponent(runId)}`),
|
|
310
316
|
method: "DELETE",
|
|
311
|
-
headers: Object.assign(Object.assign({ "X-
|
|
317
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
318
|
+
? yield core.Supplier.get(this._options.project)
|
|
319
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
312
320
|
contentType: "application/json",
|
|
313
321
|
requestType: "json",
|
|
314
322
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -10,6 +10,8 @@ export declare namespace Messages {
|
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
token?: core.Supplier<string | undefined>;
|
|
13
|
+
/** Override the X-Project header */
|
|
14
|
+
project?: core.Supplier<string | undefined>;
|
|
13
15
|
fetcher?: core.FetchFunction;
|
|
14
16
|
}
|
|
15
17
|
interface RequestOptions {
|
|
@@ -19,6 +21,8 @@ export declare namespace Messages {
|
|
|
19
21
|
maxRetries?: number;
|
|
20
22
|
/** A hook to abort the request. */
|
|
21
23
|
abortSignal?: AbortSignal;
|
|
24
|
+
/** Override the X-Project header */
|
|
25
|
+
project?: string | undefined;
|
|
22
26
|
/** Additional headers to include in the request. */
|
|
23
27
|
headers?: Record<string, string>;
|
|
24
28
|
}
|
|
@@ -107,7 +107,9 @@ class Messages {
|
|
|
107
107
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
108
108
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/runs/${encodeURIComponent(runId)}/messages`),
|
|
109
109
|
method: "GET",
|
|
110
|
-
headers: Object.assign(Object.assign({ "X-
|
|
110
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
111
|
+
? yield core.Supplier.get(this._options.project)
|
|
112
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
111
113
|
contentType: "application/json",
|
|
112
114
|
queryParameters: _queryParams,
|
|
113
115
|
requestType: "json",
|
|
@@ -10,6 +10,8 @@ export declare namespace Steps {
|
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
token?: core.Supplier<string | undefined>;
|
|
13
|
+
/** Override the X-Project header */
|
|
14
|
+
project?: core.Supplier<string | undefined>;
|
|
13
15
|
fetcher?: core.FetchFunction;
|
|
14
16
|
}
|
|
15
17
|
interface RequestOptions {
|
|
@@ -19,6 +21,8 @@ export declare namespace Steps {
|
|
|
19
21
|
maxRetries?: number;
|
|
20
22
|
/** A hook to abort the request. */
|
|
21
23
|
abortSignal?: AbortSignal;
|
|
24
|
+
/** Override the X-Project header */
|
|
25
|
+
project?: string | undefined;
|
|
22
26
|
/** Additional headers to include in the request. */
|
|
23
27
|
headers?: Record<string, string>;
|
|
24
28
|
}
|
|
@@ -101,7 +101,9 @@ class Steps {
|
|
|
101
101
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
102
102
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/runs/${encodeURIComponent(runId)}/steps`),
|
|
103
103
|
method: "GET",
|
|
104
|
-
headers: Object.assign(Object.assign({ "X-
|
|
104
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
105
|
+
? yield core.Supplier.get(this._options.project)
|
|
106
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
105
107
|
contentType: "application/json",
|
|
106
108
|
queryParameters: _queryParams,
|
|
107
109
|
requestType: "json",
|
|
@@ -10,6 +10,8 @@ export declare namespace Usage {
|
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
token?: core.Supplier<string | undefined>;
|
|
13
|
+
/** Override the X-Project header */
|
|
14
|
+
project?: core.Supplier<string | undefined>;
|
|
13
15
|
fetcher?: core.FetchFunction;
|
|
14
16
|
}
|
|
15
17
|
interface RequestOptions {
|
|
@@ -19,6 +21,8 @@ export declare namespace Usage {
|
|
|
19
21
|
maxRetries?: number;
|
|
20
22
|
/** A hook to abort the request. */
|
|
21
23
|
abortSignal?: AbortSignal;
|
|
24
|
+
/** Override the X-Project header */
|
|
25
|
+
project?: string | undefined;
|
|
22
26
|
/** Additional headers to include in the request. */
|
|
23
27
|
headers?: Record<string, string>;
|
|
24
28
|
}
|
|
@@ -76,7 +76,9 @@ class Usage {
|
|
|
76
76
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
77
77
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/runs/${encodeURIComponent(runId)}/usage`),
|
|
78
78
|
method: "GET",
|
|
79
|
-
headers: Object.assign(Object.assign({ "X-
|
|
79
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
80
|
+
? yield core.Supplier.get(this._options.project)
|
|
81
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
80
82
|
contentType: "application/json",
|
|
81
83
|
requestType: "json",
|
|
82
84
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -12,6 +12,8 @@ export declare namespace Sources {
|
|
|
12
12
|
/** Specify a custom URL to connect the client to. */
|
|
13
13
|
baseUrl?: core.Supplier<string>;
|
|
14
14
|
token?: core.Supplier<string | undefined>;
|
|
15
|
+
/** Override the X-Project header */
|
|
16
|
+
project?: core.Supplier<string | undefined>;
|
|
15
17
|
fetcher?: core.FetchFunction;
|
|
16
18
|
}
|
|
17
19
|
interface RequestOptions {
|
|
@@ -21,6 +23,8 @@ export declare namespace Sources {
|
|
|
21
23
|
maxRetries?: number;
|
|
22
24
|
/** A hook to abort the request. */
|
|
23
25
|
abortSignal?: AbortSignal;
|
|
26
|
+
/** Override the X-Project header */
|
|
27
|
+
project?: string | undefined;
|
|
24
28
|
/** Additional headers to include in the request. */
|
|
25
29
|
headers?: Record<string, string>;
|
|
26
30
|
}
|
|
@@ -85,7 +85,9 @@ class Sources {
|
|
|
85
85
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
86
86
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/sources/count"),
|
|
87
87
|
method: "GET",
|
|
88
|
-
headers: Object.assign(Object.assign({ "X-
|
|
88
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
89
|
+
? yield core.Supplier.get(this._options.project)
|
|
90
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
89
91
|
contentType: "application/json",
|
|
90
92
|
requestType: "json",
|
|
91
93
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -150,7 +152,9 @@ class Sources {
|
|
|
150
152
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
151
153
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}`),
|
|
152
154
|
method: "GET",
|
|
153
|
-
headers: Object.assign(Object.assign({ "X-
|
|
155
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
156
|
+
? yield core.Supplier.get(this._options.project)
|
|
157
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
154
158
|
contentType: "application/json",
|
|
155
159
|
requestType: "json",
|
|
156
160
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -215,7 +219,9 @@ class Sources {
|
|
|
215
219
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
216
220
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}`),
|
|
217
221
|
method: "DELETE",
|
|
218
|
-
headers: Object.assign(Object.assign({ "X-
|
|
222
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
223
|
+
? yield core.Supplier.get(this._options.project)
|
|
224
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
219
225
|
contentType: "application/json",
|
|
220
226
|
requestType: "json",
|
|
221
227
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -275,7 +281,9 @@ class Sources {
|
|
|
275
281
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
276
282
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}`),
|
|
277
283
|
method: "PATCH",
|
|
278
|
-
headers: Object.assign(Object.assign({ "X-
|
|
284
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
285
|
+
? yield core.Supplier.get(this._options.project)
|
|
286
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
279
287
|
contentType: "application/json",
|
|
280
288
|
requestType: "json",
|
|
281
289
|
body: serializers.SourceUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -341,7 +349,9 @@ class Sources {
|
|
|
341
349
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
342
350
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/sources/name/${encodeURIComponent(sourceName)}`),
|
|
343
351
|
method: "GET",
|
|
344
|
-
headers: Object.assign(Object.assign({ "X-
|
|
352
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
353
|
+
? yield core.Supplier.get(this._options.project)
|
|
354
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
345
355
|
contentType: "application/json",
|
|
346
356
|
requestType: "json",
|
|
347
357
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -405,7 +415,9 @@ class Sources {
|
|
|
405
415
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
406
416
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/sources/"),
|
|
407
417
|
method: "GET",
|
|
408
|
-
headers: Object.assign(Object.assign({ "X-
|
|
418
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
419
|
+
? yield core.Supplier.get(this._options.project)
|
|
420
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
409
421
|
contentType: "application/json",
|
|
410
422
|
requestType: "json",
|
|
411
423
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -472,7 +484,9 @@ class Sources {
|
|
|
472
484
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
473
485
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/sources/"),
|
|
474
486
|
method: "POST",
|
|
475
|
-
headers: Object.assign(Object.assign({ "X-
|
|
487
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
488
|
+
? yield core.Supplier.get(this._options.project)
|
|
489
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
476
490
|
contentType: "application/json",
|
|
477
491
|
requestType: "json",
|
|
478
492
|
body: serializers.SourceCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -545,7 +559,9 @@ class Sources {
|
|
|
545
559
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
546
560
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/files/${encodeURIComponent(fileId)}`),
|
|
547
561
|
method: "GET",
|
|
548
|
-
headers: Object.assign(Object.assign({ "X-
|
|
562
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
563
|
+
? yield core.Supplier.get(this._options.project)
|
|
564
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
549
565
|
contentType: "application/json",
|
|
550
566
|
queryParameters: _queryParams,
|
|
551
567
|
requestType: "json",
|
|
@@ -12,6 +12,8 @@ export declare namespace Files {
|
|
|
12
12
|
/** Specify a custom URL to connect the client to. */
|
|
13
13
|
baseUrl?: core.Supplier<string>;
|
|
14
14
|
token?: core.Supplier<string | undefined>;
|
|
15
|
+
/** Override the X-Project header */
|
|
16
|
+
project?: core.Supplier<string | undefined>;
|
|
15
17
|
fetcher?: core.FetchFunction;
|
|
16
18
|
}
|
|
17
19
|
interface RequestOptions {
|
|
@@ -21,6 +23,8 @@ export declare namespace Files {
|
|
|
21
23
|
maxRetries?: number;
|
|
22
24
|
/** A hook to abort the request. */
|
|
23
25
|
abortSignal?: AbortSignal;
|
|
26
|
+
/** Override the X-Project header */
|
|
27
|
+
project?: string | undefined;
|
|
24
28
|
/** Additional headers to include in the request. */
|
|
25
29
|
headers?: Record<string, string>;
|
|
26
30
|
}
|
|
@@ -80,7 +80,9 @@ class Files {
|
|
|
80
80
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
81
81
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/upload`),
|
|
82
82
|
method: "POST",
|
|
83
|
-
headers: Object.assign(Object.assign(Object.assign({ "X-
|
|
83
|
+
headers: Object.assign(Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
84
|
+
? yield core.Supplier.get(this._options.project)
|
|
85
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
84
86
|
requestType: "file",
|
|
85
87
|
duplex: _maybeEncodedRequest.duplex,
|
|
86
88
|
body: _maybeEncodedRequest.body,
|
|
@@ -158,7 +160,9 @@ class Files {
|
|
|
158
160
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
159
161
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/files`),
|
|
160
162
|
method: "GET",
|
|
161
|
-
headers: Object.assign(Object.assign({ "X-
|
|
163
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
164
|
+
? yield core.Supplier.get(this._options.project)
|
|
165
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
162
166
|
contentType: "application/json",
|
|
163
167
|
queryParameters: _queryParams,
|
|
164
168
|
requestType: "json",
|
|
@@ -225,7 +229,9 @@ class Files {
|
|
|
225
229
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
226
230
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/${encodeURIComponent(fileId)}`),
|
|
227
231
|
method: "DELETE",
|
|
228
|
-
headers: Object.assign(Object.assign({ "X-
|
|
232
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
233
|
+
? yield core.Supplier.get(this._options.project)
|
|
234
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
229
235
|
contentType: "application/json",
|
|
230
236
|
requestType: "json",
|
|
231
237
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -10,6 +10,8 @@ export declare namespace Passages {
|
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
token?: core.Supplier<string | undefined>;
|
|
13
|
+
/** Override the X-Project header */
|
|
14
|
+
project?: core.Supplier<string | undefined>;
|
|
13
15
|
fetcher?: core.FetchFunction;
|
|
14
16
|
}
|
|
15
17
|
interface RequestOptions {
|
|
@@ -19,6 +21,8 @@ export declare namespace Passages {
|
|
|
19
21
|
maxRetries?: number;
|
|
20
22
|
/** A hook to abort the request. */
|
|
21
23
|
abortSignal?: AbortSignal;
|
|
24
|
+
/** Override the X-Project header */
|
|
25
|
+
project?: string | undefined;
|
|
22
26
|
/** Additional headers to include in the request. */
|
|
23
27
|
headers?: Record<string, string>;
|
|
24
28
|
}
|
|
@@ -88,7 +88,9 @@ class Passages {
|
|
|
88
88
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
89
89
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/passages`),
|
|
90
90
|
method: "GET",
|
|
91
|
-
headers: Object.assign(Object.assign({ "X-
|
|
91
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
92
|
+
? yield core.Supplier.get(this._options.project)
|
|
93
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
92
94
|
contentType: "application/json",
|
|
93
95
|
queryParameters: _queryParams,
|
|
94
96
|
requestType: "json",
|
|
@@ -11,6 +11,8 @@ export declare namespace Steps {
|
|
|
11
11
|
/** Specify a custom URL to connect the client to. */
|
|
12
12
|
baseUrl?: core.Supplier<string>;
|
|
13
13
|
token?: core.Supplier<string | undefined>;
|
|
14
|
+
/** Override the X-Project header */
|
|
15
|
+
project?: core.Supplier<string | undefined>;
|
|
14
16
|
fetcher?: core.FetchFunction;
|
|
15
17
|
}
|
|
16
18
|
interface RequestOptions {
|
|
@@ -20,6 +22,8 @@ export declare namespace Steps {
|
|
|
20
22
|
maxRetries?: number;
|
|
21
23
|
/** A hook to abort the request. */
|
|
22
24
|
abortSignal?: AbortSignal;
|
|
25
|
+
/** Override the X-Project header */
|
|
26
|
+
project?: string | undefined;
|
|
23
27
|
/** Additional headers to include in the request. */
|
|
24
28
|
headers?: Record<string, string>;
|
|
25
29
|
}
|
|
@@ -54,19 +58,6 @@ export declare class Steps {
|
|
|
54
58
|
* await client.steps.retrieve("step_id")
|
|
55
59
|
*/
|
|
56
60
|
retrieve(stepId: string, requestOptions?: Steps.RequestOptions): Promise<Letta.Step>;
|
|
57
|
-
/**
|
|
58
|
-
* Add feedback to a step.
|
|
59
|
-
*
|
|
60
|
-
* @param {string} stepId
|
|
61
|
-
* @param {Letta.AddFeedbackRequest} request
|
|
62
|
-
* @param {Steps.RequestOptions} requestOptions - Request-specific configuration.
|
|
63
|
-
*
|
|
64
|
-
* @throws {@link Letta.UnprocessableEntityError}
|
|
65
|
-
*
|
|
66
|
-
* @example
|
|
67
|
-
* await client.steps.addFeedback("step_id")
|
|
68
|
-
*/
|
|
69
|
-
addFeedback(stepId: string, request?: Letta.AddFeedbackRequest, requestOptions?: Steps.RequestOptions): Promise<Letta.Step>;
|
|
70
61
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
71
62
|
Authorization: string;
|
|
72
63
|
}>;
|