@letta-ai/letta-client 0.1.143 → 0.1.145
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 +6 -74
- 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 +6 -74
- 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
|
@@ -104,7 +104,9 @@ class Blocks {
|
|
|
104
104
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
105
105
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/blocks/"),
|
|
106
106
|
method: "GET",
|
|
107
|
-
headers: Object.assign(Object.assign({ "X-
|
|
107
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
108
|
+
? yield core.Supplier.get(this._options.project)
|
|
109
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
|
|
108
110
|
contentType: "application/json",
|
|
109
111
|
queryParameters: _queryParams,
|
|
110
112
|
requestType: "json",
|
|
@@ -171,7 +173,9 @@ class Blocks {
|
|
|
171
173
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
172
174
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/blocks/"),
|
|
173
175
|
method: "POST",
|
|
174
|
-
headers: Object.assign(Object.assign({ "X-
|
|
176
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
177
|
+
? yield core.Supplier.get(this._options.project)
|
|
178
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
|
|
175
179
|
contentType: "application/json",
|
|
176
180
|
requestType: "json",
|
|
177
181
|
body: serializers.CreateBlock.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -236,7 +240,9 @@ class Blocks {
|
|
|
236
240
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
237
241
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/blocks/count"),
|
|
238
242
|
method: "GET",
|
|
239
|
-
headers: Object.assign(Object.assign({ "X-
|
|
243
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
244
|
+
? yield core.Supplier.get(this._options.project)
|
|
245
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
240
246
|
contentType: "application/json",
|
|
241
247
|
requestType: "json",
|
|
242
248
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -299,7 +305,9 @@ class Blocks {
|
|
|
299
305
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
300
306
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/blocks/${encodeURIComponent(blockId)}`),
|
|
301
307
|
method: "GET",
|
|
302
|
-
headers: Object.assign(Object.assign({ "X-
|
|
308
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
309
|
+
? yield core.Supplier.get(this._options.project)
|
|
310
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
|
|
303
311
|
contentType: "application/json",
|
|
304
312
|
requestType: "json",
|
|
305
313
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -362,7 +370,9 @@ class Blocks {
|
|
|
362
370
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
363
371
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/blocks/${encodeURIComponent(blockId)}`),
|
|
364
372
|
method: "DELETE",
|
|
365
|
-
headers: Object.assign(Object.assign({ "X-
|
|
373
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
374
|
+
? yield core.Supplier.get(this._options.project)
|
|
375
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
|
|
366
376
|
contentType: "application/json",
|
|
367
377
|
requestType: "json",
|
|
368
378
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -426,7 +436,9 @@ class Blocks {
|
|
|
426
436
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
427
437
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/blocks/${encodeURIComponent(blockId)}`),
|
|
428
438
|
method: "PATCH",
|
|
429
|
-
headers: Object.assign(Object.assign({ "X-
|
|
439
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
440
|
+
? yield core.Supplier.get(this._options.project)
|
|
441
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
|
|
430
442
|
contentType: "application/json",
|
|
431
443
|
requestType: "json",
|
|
432
444
|
body: serializers.BlockUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -10,6 +10,8 @@ export declare namespace Agents {
|
|
|
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 Agents {
|
|
|
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
|
}
|
|
@@ -77,7 +77,9 @@ class Agents {
|
|
|
77
77
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
78
78
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/blocks/${encodeURIComponent(blockId)}/agents`),
|
|
79
79
|
method: "GET",
|
|
80
|
-
headers: Object.assign(Object.assign({ "X-
|
|
80
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
81
|
+
? yield core.Supplier.get(this._options.project)
|
|
82
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
81
83
|
contentType: "application/json",
|
|
82
84
|
requestType: "json",
|
|
83
85
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -10,6 +10,8 @@ export declare namespace ClientSideAccessTokens {
|
|
|
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 ClientSideAccessTokens {
|
|
|
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
|
}
|
|
@@ -83,7 +83,9 @@ class ClientSideAccessTokens {
|
|
|
83
83
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
84
84
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/client-side-access-tokens"),
|
|
85
85
|
method: "POST",
|
|
86
|
-
headers: Object.assign(Object.assign({ "X-
|
|
86
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
87
|
+
? yield core.Supplier.get(this._options.project)
|
|
88
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
87
89
|
contentType: "application/json",
|
|
88
90
|
requestType: "json",
|
|
89
91
|
body: serializers.ClientSideAccessTokensCreateRequest.jsonOrThrow(request, {
|
|
@@ -148,7 +150,9 @@ class ClientSideAccessTokens {
|
|
|
148
150
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
149
151
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/client-side-access-tokens/${encodeURIComponent(token)}`),
|
|
150
152
|
method: "DELETE",
|
|
151
|
-
headers: Object.assign(Object.assign({ "X-
|
|
153
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
154
|
+
? yield core.Supplier.get(this._options.project)
|
|
155
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
152
156
|
contentType: "application/json",
|
|
153
157
|
requestType: "json",
|
|
154
158
|
body: request,
|
|
@@ -10,6 +10,8 @@ export declare namespace EmbeddingModels {
|
|
|
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 EmbeddingModels {
|
|
|
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
|
}
|
|
@@ -75,7 +75,9 @@ class EmbeddingModels {
|
|
|
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/models/embedding"),
|
|
77
77
|
method: "GET",
|
|
78
|
-
headers: Object.assign(Object.assign({ "X-
|
|
78
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
79
|
+
? yield core.Supplier.get(this._options.project)
|
|
80
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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
81
|
contentType: "application/json",
|
|
80
82
|
requestType: "json",
|
|
81
83
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -11,6 +11,8 @@ export declare namespace Groups {
|
|
|
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 Groups {
|
|
|
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
|
}
|
|
@@ -44,17 +44,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
44
44
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
45
45
|
});
|
|
46
46
|
};
|
|
47
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
48
|
-
var t = {};
|
|
49
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
50
|
-
t[p] = s[p];
|
|
51
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
52
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
53
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
54
|
-
t[p[i]] = s[p[i]];
|
|
55
|
-
}
|
|
56
|
-
return t;
|
|
57
|
-
};
|
|
58
47
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
59
48
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
60
49
|
};
|
|
@@ -109,7 +98,9 @@ class Groups {
|
|
|
109
98
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
110
99
|
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/groups/"),
|
|
111
100
|
method: "GET",
|
|
112
|
-
headers: Object.assign(Object.assign({ "X-
|
|
101
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
102
|
+
? yield core.Supplier.get(this._options.project)
|
|
103
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
|
|
113
104
|
contentType: "application/json",
|
|
114
105
|
queryParameters: _queryParams,
|
|
115
106
|
requestType: "json",
|
|
@@ -175,14 +166,15 @@ class Groups {
|
|
|
175
166
|
create(request, requestOptions) {
|
|
176
167
|
return __awaiter(this, void 0, void 0, function* () {
|
|
177
168
|
var _a, _b, _c;
|
|
178
|
-
const { project } = request, _body = __rest(request, ["project"]);
|
|
179
169
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
180
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/groups/"),
|
|
181
171
|
method: "POST",
|
|
182
|
-
headers: Object.assign(Object.assign({ "X-
|
|
172
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
173
|
+
? yield core.Supplier.get(this._options.project)
|
|
174
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
|
|
183
175
|
contentType: "application/json",
|
|
184
176
|
requestType: "json",
|
|
185
|
-
body: serializers.GroupCreate.jsonOrThrow(
|
|
177
|
+
body: serializers.GroupCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
186
178
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
187
179
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
188
180
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -244,7 +236,9 @@ class Groups {
|
|
|
244
236
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
245
237
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/groups/count"),
|
|
246
238
|
method: "GET",
|
|
247
|
-
headers: Object.assign(Object.assign({ "X-
|
|
239
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
240
|
+
? yield core.Supplier.get(this._options.project)
|
|
241
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
|
|
248
242
|
contentType: "application/json",
|
|
249
243
|
requestType: "json",
|
|
250
244
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -309,7 +303,9 @@ class Groups {
|
|
|
309
303
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
310
304
|
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/groups/${encodeURIComponent(groupId)}`),
|
|
311
305
|
method: "GET",
|
|
312
|
-
headers: Object.assign(Object.assign({ "X-
|
|
306
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
307
|
+
? yield core.Supplier.get(this._options.project)
|
|
308
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
|
|
313
309
|
contentType: "application/json",
|
|
314
310
|
requestType: "json",
|
|
315
311
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -374,7 +370,9 @@ class Groups {
|
|
|
374
370
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
375
371
|
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/groups/${encodeURIComponent(groupId)}`),
|
|
376
372
|
method: "DELETE",
|
|
377
|
-
headers: Object.assign(Object.assign({ "X-
|
|
373
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
374
|
+
? yield core.Supplier.get(this._options.project)
|
|
375
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
|
|
378
376
|
contentType: "application/json",
|
|
379
377
|
requestType: "json",
|
|
380
378
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -431,14 +429,15 @@ class Groups {
|
|
|
431
429
|
modify(groupId_1) {
|
|
432
430
|
return __awaiter(this, arguments, void 0, function* (groupId, request = {}, requestOptions) {
|
|
433
431
|
var _a, _b, _c;
|
|
434
|
-
const { project } = request, _body = __rest(request, ["project"]);
|
|
435
432
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
436
433
|
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/groups/${encodeURIComponent(groupId)}`),
|
|
437
434
|
method: "PATCH",
|
|
438
|
-
headers: Object.assign(Object.assign({ "X-
|
|
435
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
436
|
+
? yield core.Supplier.get(this._options.project)
|
|
437
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
|
|
439
438
|
contentType: "application/json",
|
|
440
439
|
requestType: "json",
|
|
441
|
-
body: serializers.GroupUpdate.jsonOrThrow(
|
|
440
|
+
body: serializers.GroupUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
442
441
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
443
442
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
444
443
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -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
|
}
|
|
@@ -97,7 +97,9 @@ class Messages {
|
|
|
97
97
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
98
98
|
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/groups/${encodeURIComponent(groupId)}/messages`),
|
|
99
99
|
method: "GET",
|
|
100
|
-
headers: Object.assign(Object.assign({ "X-
|
|
100
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
101
|
+
? yield core.Supplier.get(this._options.project)
|
|
102
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
|
|
101
103
|
contentType: "application/json",
|
|
102
104
|
queryParameters: _queryParams,
|
|
103
105
|
requestType: "json",
|
|
@@ -173,7 +175,9 @@ class Messages {
|
|
|
173
175
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
174
176
|
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/groups/${encodeURIComponent(groupId)}/messages`),
|
|
175
177
|
method: "POST",
|
|
176
|
-
headers: Object.assign(Object.assign({ "X-
|
|
178
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
179
|
+
? yield core.Supplier.get(this._options.project)
|
|
180
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
|
|
177
181
|
contentType: "application/json",
|
|
178
182
|
requestType: "json",
|
|
179
183
|
body: serializers.LettaRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -233,7 +237,9 @@ class Messages {
|
|
|
233
237
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
234
238
|
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/groups/${encodeURIComponent(groupId)}/messages/stream`),
|
|
235
239
|
method: "POST",
|
|
236
|
-
headers: Object.assign(Object.assign({ "X-
|
|
240
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
241
|
+
? yield core.Supplier.get(this._options.project)
|
|
242
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
|
|
237
243
|
contentType: "application/json",
|
|
238
244
|
requestType: "json",
|
|
239
245
|
body: serializers.LettaStreamingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -314,7 +320,9 @@ class Messages {
|
|
|
314
320
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
315
321
|
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/groups/${encodeURIComponent(groupId)}/messages/${encodeURIComponent(messageId)}`),
|
|
316
322
|
method: "PATCH",
|
|
317
|
-
headers: Object.assign(Object.assign({ "X-
|
|
323
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
324
|
+
? yield core.Supplier.get(this._options.project)
|
|
325
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
|
|
318
326
|
contentType: "application/json",
|
|
319
327
|
requestType: "json",
|
|
320
328
|
body: serializers.groups.MessagesModifyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -380,7 +388,9 @@ class Messages {
|
|
|
380
388
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
381
389
|
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/groups/${encodeURIComponent(groupId)}/reset-messages`),
|
|
382
390
|
method: "PATCH",
|
|
383
|
-
headers: Object.assign(Object.assign({ "X-
|
|
391
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
392
|
+
? yield core.Supplier.get(this._options.project)
|
|
393
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
|
|
384
394
|
contentType: "application/json",
|
|
385
395
|
requestType: "json",
|
|
386
396
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -10,6 +10,8 @@ export declare namespace Health {
|
|
|
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 Health {
|
|
|
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
|
}
|
|
@@ -70,7 +70,9 @@ class Health {
|
|
|
70
70
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
71
71
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/health/"),
|
|
72
72
|
method: "GET",
|
|
73
|
-
headers: Object.assign(Object.assign({ "X-
|
|
73
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
74
|
+
? yield core.Supplier.get(this._options.project)
|
|
75
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
74
76
|
contentType: "application/json",
|
|
75
77
|
requestType: "json",
|
|
76
78
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -11,6 +11,8 @@ export declare namespace Identities {
|
|
|
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 Identities {
|
|
|
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
|
}
|