@letta-ai/letta-client 0.0.68657 → 0.0.68658
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/api/resources/agents/client/Client.js +9 -9
- package/api/resources/agents/resources/blocks/client/Client.js +5 -5
- package/api/resources/agents/resources/context/client/Client.js +1 -1
- package/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
- package/api/resources/agents/resources/files/client/Client.js +4 -4
- package/api/resources/agents/resources/folders/client/Client.js +3 -3
- package/api/resources/agents/resources/groups/client/Client.js +1 -1
- package/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
- package/api/resources/agents/resources/messages/client/Client.js +10 -10
- package/api/resources/agents/resources/passages/client/Client.js +5 -5
- package/api/resources/agents/resources/sources/client/Client.js +3 -3
- package/api/resources/agents/resources/templates/client/Client.js +3 -3
- package/api/resources/agents/resources/tools/client/Client.js +4 -4
- package/api/resources/archives/client/Client.js +3 -3
- package/api/resources/batches/client/Client.js +4 -4
- package/api/resources/batches/resources/messages/client/Client.js +1 -1
- package/api/resources/blocks/client/Client.js +6 -6
- package/api/resources/blocks/resources/agents/client/Client.js +1 -1
- package/api/resources/clientSideAccessTokens/client/Client.js +3 -3
- package/api/resources/folders/client/Client.js +8 -8
- package/api/resources/folders/resources/agents/client/Client.js +1 -1
- package/api/resources/folders/resources/files/client/Client.js +3 -3
- package/api/resources/folders/resources/passages/client/Client.js +1 -1
- package/api/resources/groups/client/Client.js +6 -6
- package/api/resources/groups/resources/messages/client/Client.js +5 -5
- package/api/resources/health/client/Client.js +1 -1
- package/api/resources/identities/client/Client.js +7 -7
- package/api/resources/identities/resources/agents/client/Client.js +1 -1
- package/api/resources/identities/resources/blocks/client/Client.js +1 -1
- package/api/resources/identities/resources/properties/client/Client.js +1 -1
- package/api/resources/jobs/client/Client.js +5 -5
- package/api/resources/models/client/Client.js +2 -2
- package/api/resources/models/resources/embeddings/client/Client.js +1 -1
- package/api/resources/projects/client/Client.js +1 -1
- package/api/resources/providers/client/Client.js +6 -6
- package/api/resources/runs/client/Client.js +5 -5
- package/api/resources/runs/resources/messages/client/Client.js +1 -1
- package/api/resources/runs/resources/steps/client/Client.js +1 -1
- package/api/resources/runs/resources/usage/client/Client.js +1 -1
- package/api/resources/sources/client/Client.js +10 -10
- package/api/resources/sources/resources/files/client/Client.js +3 -3
- package/api/resources/sources/resources/passages/client/Client.js +1 -1
- package/api/resources/steps/client/Client.d.ts +3 -0
- package/api/resources/steps/client/Client.js +7 -2
- package/api/resources/steps/index.d.ts +1 -1
- package/api/resources/steps/index.js +1 -1
- package/api/resources/steps/resources/feedback/client/Client.js +1 -1
- package/api/resources/steps/resources/index.d.ts +3 -0
- package/api/resources/steps/resources/index.js +4 -1
- package/api/resources/steps/resources/messages/client/Client.d.ts +50 -0
- package/api/resources/steps/resources/messages/client/Client.js +166 -0
- package/api/resources/steps/resources/messages/client/index.d.ts +1 -0
- package/api/resources/steps/resources/messages/client/index.js +17 -0
- package/api/resources/steps/resources/messages/client/requests/MessagesListRequest.d.ts +30 -0
- package/api/resources/steps/resources/messages/client/requests/MessagesListRequest.js +5 -0
- package/api/resources/steps/resources/messages/client/requests/index.d.ts +1 -0
- package/api/resources/steps/resources/messages/client/requests/index.js +2 -0
- package/api/resources/steps/resources/messages/index.d.ts +2 -0
- package/api/resources/steps/resources/messages/index.js +18 -0
- package/api/resources/steps/resources/messages/types/MessagesListRequestOrder.d.ts +11 -0
- package/api/resources/steps/resources/messages/types/MessagesListRequestOrder.js +10 -0
- package/api/resources/steps/resources/messages/types/MessagesListResponseItem.d.ts +5 -0
- package/api/resources/steps/resources/messages/types/MessagesListResponseItem.js +5 -0
- package/api/resources/steps/resources/messages/types/index.d.ts +2 -0
- package/api/resources/steps/resources/messages/types/index.js +18 -0
- package/api/resources/steps/resources/metrics/client/Client.js +1 -1
- package/api/resources/steps/resources/trace/client/Client.js +1 -1
- package/api/resources/tags/client/Client.js +1 -1
- package/api/resources/telemetry/client/Client.js +1 -1
- package/api/resources/templates/client/Client.js +9 -9
- package/api/resources/templates/resources/agents/client/Client.js +1 -1
- package/api/resources/tools/client/Client.js +20 -20
- package/api/resources/voice/client/Client.js +1 -1
- package/api/types/ChildToolRule.d.ts +1 -1
- package/api/types/ConditionalToolRule.d.ts +1 -1
- package/api/types/ContinueToolRule.d.ts +1 -1
- package/api/types/InitToolRule.d.ts +1 -1
- package/api/types/MaxCountPerStepToolRule.d.ts +1 -1
- package/api/types/Memory.d.ts +3 -1
- package/api/types/MemoryAgentType.d.ts +8 -0
- package/api/types/MemoryAgentType.js +5 -0
- package/api/types/ParentToolRule.d.ts +1 -1
- package/api/types/RequiredBeforeExitToolRule.d.ts +1 -1
- package/api/types/RequiresApprovalToolRule.d.ts +1 -1
- package/api/types/Step.d.ts +1 -1
- package/api/types/TerminalToolRule.d.ts +1 -1
- package/api/types/index.d.ts +1 -0
- package/api/types/index.js +1 -0
- package/dist/api/resources/agents/client/Client.js +9 -9
- package/dist/api/resources/agents/resources/blocks/client/Client.js +5 -5
- package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/files/client/Client.js +4 -4
- package/dist/api/resources/agents/resources/folders/client/Client.js +3 -3
- package/dist/api/resources/agents/resources/groups/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/messages/client/Client.js +10 -10
- package/dist/api/resources/agents/resources/passages/client/Client.js +5 -5
- package/dist/api/resources/agents/resources/sources/client/Client.js +3 -3
- package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
- package/dist/api/resources/agents/resources/tools/client/Client.js +4 -4
- package/dist/api/resources/archives/client/Client.js +3 -3
- package/dist/api/resources/batches/client/Client.js +4 -4
- package/dist/api/resources/batches/resources/messages/client/Client.js +1 -1
- package/dist/api/resources/blocks/client/Client.js +6 -6
- package/dist/api/resources/blocks/resources/agents/client/Client.js +1 -1
- package/dist/api/resources/clientSideAccessTokens/client/Client.js +3 -3
- package/dist/api/resources/folders/client/Client.js +8 -8
- package/dist/api/resources/folders/resources/agents/client/Client.js +1 -1
- package/dist/api/resources/folders/resources/files/client/Client.js +3 -3
- package/dist/api/resources/folders/resources/passages/client/Client.js +1 -1
- package/dist/api/resources/groups/client/Client.js +6 -6
- package/dist/api/resources/groups/resources/messages/client/Client.js +5 -5
- package/dist/api/resources/health/client/Client.js +1 -1
- package/dist/api/resources/identities/client/Client.js +7 -7
- package/dist/api/resources/identities/resources/agents/client/Client.js +1 -1
- package/dist/api/resources/identities/resources/blocks/client/Client.js +1 -1
- package/dist/api/resources/identities/resources/properties/client/Client.js +1 -1
- package/dist/api/resources/jobs/client/Client.js +5 -5
- package/dist/api/resources/models/client/Client.js +2 -2
- package/dist/api/resources/models/resources/embeddings/client/Client.js +1 -1
- package/dist/api/resources/projects/client/Client.js +1 -1
- package/dist/api/resources/providers/client/Client.js +6 -6
- package/dist/api/resources/runs/client/Client.js +5 -5
- package/dist/api/resources/runs/resources/messages/client/Client.js +1 -1
- package/dist/api/resources/runs/resources/steps/client/Client.js +1 -1
- package/dist/api/resources/runs/resources/usage/client/Client.js +1 -1
- package/dist/api/resources/sources/client/Client.js +10 -10
- package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
- package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
- package/dist/api/resources/steps/client/Client.d.ts +3 -0
- package/dist/api/resources/steps/client/Client.js +7 -2
- package/dist/api/resources/steps/index.d.ts +1 -1
- package/dist/api/resources/steps/index.js +1 -1
- package/dist/api/resources/steps/resources/feedback/client/Client.js +1 -1
- package/dist/api/resources/steps/resources/index.d.ts +3 -0
- package/dist/api/resources/steps/resources/index.js +4 -1
- package/dist/api/resources/steps/resources/messages/client/Client.d.ts +50 -0
- package/dist/api/resources/steps/resources/messages/client/Client.js +166 -0
- package/dist/api/resources/steps/resources/messages/client/index.d.ts +1 -0
- package/dist/api/resources/steps/resources/messages/client/index.js +17 -0
- package/dist/api/resources/steps/resources/messages/client/requests/MessagesListRequest.d.ts +30 -0
- package/dist/api/resources/steps/resources/messages/client/requests/MessagesListRequest.js +5 -0
- package/dist/api/resources/steps/resources/messages/client/requests/index.d.ts +1 -0
- package/dist/api/resources/steps/resources/messages/client/requests/index.js +2 -0
- package/dist/api/resources/steps/resources/messages/index.d.ts +2 -0
- package/dist/api/resources/steps/resources/messages/index.js +18 -0
- package/dist/api/resources/steps/resources/messages/types/MessagesListRequestOrder.d.ts +11 -0
- package/dist/api/resources/steps/resources/messages/types/MessagesListRequestOrder.js +10 -0
- package/dist/api/resources/steps/resources/messages/types/MessagesListResponseItem.d.ts +5 -0
- package/dist/api/resources/steps/resources/messages/types/MessagesListResponseItem.js +5 -0
- package/dist/api/resources/steps/resources/messages/types/index.d.ts +2 -0
- package/dist/api/resources/steps/resources/messages/types/index.js +18 -0
- package/dist/api/resources/steps/resources/metrics/client/Client.js +1 -1
- package/dist/api/resources/steps/resources/trace/client/Client.js +1 -1
- package/dist/api/resources/tags/client/Client.js +1 -1
- package/dist/api/resources/telemetry/client/Client.js +1 -1
- package/dist/api/resources/templates/client/Client.js +9 -9
- package/dist/api/resources/templates/resources/agents/client/Client.js +1 -1
- package/dist/api/resources/tools/client/Client.js +20 -20
- package/dist/api/resources/voice/client/Client.js +1 -1
- package/dist/api/types/ChildToolRule.d.ts +1 -1
- package/dist/api/types/ConditionalToolRule.d.ts +1 -1
- package/dist/api/types/ContinueToolRule.d.ts +1 -1
- package/dist/api/types/InitToolRule.d.ts +1 -1
- package/dist/api/types/MaxCountPerStepToolRule.d.ts +1 -1
- package/dist/api/types/Memory.d.ts +3 -1
- package/dist/api/types/MemoryAgentType.d.ts +8 -0
- package/dist/api/types/MemoryAgentType.js +5 -0
- package/dist/api/types/ParentToolRule.d.ts +1 -1
- package/dist/api/types/RequiredBeforeExitToolRule.d.ts +1 -1
- package/dist/api/types/RequiresApprovalToolRule.d.ts +1 -1
- package/dist/api/types/Step.d.ts +1 -1
- package/dist/api/types/TerminalToolRule.d.ts +1 -1
- package/dist/api/types/index.d.ts +1 -0
- package/dist/api/types/index.js +1 -0
- package/dist/serialization/resources/steps/index.d.ts +1 -1
- package/dist/serialization/resources/steps/index.js +1 -1
- package/dist/serialization/resources/steps/resources/index.d.ts +2 -0
- package/dist/serialization/resources/steps/resources/index.js +3 -1
- package/dist/serialization/resources/steps/resources/messages/client/index.d.ts +1 -0
- package/dist/serialization/resources/steps/resources/messages/client/index.js +37 -0
- package/dist/serialization/resources/steps/resources/messages/client/list.d.ts +11 -0
- package/dist/serialization/resources/steps/resources/messages/client/list.js +42 -0
- package/dist/serialization/resources/steps/resources/messages/index.d.ts +2 -0
- package/dist/serialization/resources/steps/resources/messages/index.js +18 -0
- package/dist/serialization/resources/steps/resources/messages/types/MessagesListRequestOrder.d.ts +10 -0
- package/dist/serialization/resources/steps/resources/messages/types/MessagesListRequestOrder.js +41 -0
- package/dist/serialization/resources/steps/resources/messages/types/MessagesListResponseItem.d.ts +19 -0
- package/dist/serialization/resources/steps/resources/messages/types/MessagesListResponseItem.js +60 -0
- package/dist/serialization/resources/steps/resources/messages/types/index.d.ts +2 -0
- package/dist/serialization/resources/steps/resources/messages/types/index.js +18 -0
- package/dist/serialization/types/Memory.d.ts +2 -0
- package/dist/serialization/types/Memory.js +2 -0
- package/dist/serialization/types/MemoryAgentType.d.ts +11 -0
- package/dist/serialization/types/MemoryAgentType.js +42 -0
- package/dist/serialization/types/index.d.ts +1 -0
- package/dist/serialization/types/index.js +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +73 -0
- package/serialization/resources/steps/index.d.ts +1 -1
- package/serialization/resources/steps/index.js +1 -1
- package/serialization/resources/steps/resources/index.d.ts +2 -0
- package/serialization/resources/steps/resources/index.js +3 -1
- package/serialization/resources/steps/resources/messages/client/index.d.ts +1 -0
- package/serialization/resources/steps/resources/messages/client/index.js +37 -0
- package/serialization/resources/steps/resources/messages/client/list.d.ts +11 -0
- package/serialization/resources/steps/resources/messages/client/list.js +42 -0
- package/serialization/resources/steps/resources/messages/index.d.ts +2 -0
- package/serialization/resources/steps/resources/messages/index.js +18 -0
- package/serialization/resources/steps/resources/messages/types/MessagesListRequestOrder.d.ts +10 -0
- package/serialization/resources/steps/resources/messages/types/MessagesListRequestOrder.js +41 -0
- package/serialization/resources/steps/resources/messages/types/MessagesListResponseItem.d.ts +19 -0
- package/serialization/resources/steps/resources/messages/types/MessagesListResponseItem.js +60 -0
- package/serialization/resources/steps/resources/messages/types/index.d.ts +2 -0
- package/serialization/resources/steps/resources/messages/types/index.js +18 -0
- package/serialization/types/Memory.d.ts +2 -0
- package/serialization/types/Memory.js +2 -0
- package/serialization/types/MemoryAgentType.d.ts +11 -0
- package/serialization/types/MemoryAgentType.js +42 -0
- package/serialization/types/index.d.ts +1 -0
- package/serialization/types/index.js +1 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -129,7 +129,7 @@ class Runs {
|
|
|
129
129
|
method: "GET",
|
|
130
130
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
131
131
|
? yield core.Supplier.get(this._options.project)
|
|
132
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.
|
|
132
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68658", "User-Agent": "@letta-ai/letta-client/0.0.68658", "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),
|
|
133
133
|
contentType: "application/json",
|
|
134
134
|
queryParameters: _queryParams,
|
|
135
135
|
requestType: "json",
|
|
@@ -219,7 +219,7 @@ class Runs {
|
|
|
219
219
|
method: "GET",
|
|
220
220
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
221
221
|
? yield core.Supplier.get(this._options.project)
|
|
222
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.
|
|
222
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68658", "User-Agent": "@letta-ai/letta-client/0.0.68658", "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),
|
|
223
223
|
contentType: "application/json",
|
|
224
224
|
queryParameters: _queryParams,
|
|
225
225
|
requestType: "json",
|
|
@@ -296,7 +296,7 @@ class Runs {
|
|
|
296
296
|
method: "GET",
|
|
297
297
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
298
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.0.
|
|
299
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68658", "User-Agent": "@letta-ai/letta-client/0.0.68658", "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),
|
|
300
300
|
contentType: "application/json",
|
|
301
301
|
requestType: "json",
|
|
302
302
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -372,7 +372,7 @@ class Runs {
|
|
|
372
372
|
method: "DELETE",
|
|
373
373
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
374
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.0.
|
|
375
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68658", "User-Agent": "@letta-ai/letta-client/0.0.68658", "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),
|
|
376
376
|
contentType: "application/json",
|
|
377
377
|
requestType: "json",
|
|
378
378
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -437,7 +437,7 @@ class Runs {
|
|
|
437
437
|
method: "POST",
|
|
438
438
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
439
439
|
? yield core.Supplier.get(this._options.project)
|
|
440
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.
|
|
440
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68658", "User-Agent": "@letta-ai/letta-client/0.0.68658", "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),
|
|
441
441
|
contentType: "application/json",
|
|
442
442
|
requestType: "json",
|
|
443
443
|
body: serializers.RetrieveStreamRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -98,7 +98,7 @@ class Messages {
|
|
|
98
98
|
method: "GET",
|
|
99
99
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
100
100
|
? yield core.Supplier.get(this._options.project)
|
|
101
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.
|
|
101
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68658", "User-Agent": "@letta-ai/letta-client/0.0.68658", "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),
|
|
102
102
|
contentType: "application/json",
|
|
103
103
|
queryParameters: _queryParams,
|
|
104
104
|
requestType: "json",
|
|
@@ -106,7 +106,7 @@ class Steps {
|
|
|
106
106
|
method: "GET",
|
|
107
107
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
108
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.0.
|
|
109
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68658", "User-Agent": "@letta-ai/letta-client/0.0.68658", "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),
|
|
110
110
|
contentType: "application/json",
|
|
111
111
|
queryParameters: _queryParams,
|
|
112
112
|
requestType: "json",
|
|
@@ -81,7 +81,7 @@ class Usage {
|
|
|
81
81
|
method: "GET",
|
|
82
82
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
83
83
|
? yield core.Supplier.get(this._options.project)
|
|
84
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.
|
|
84
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68658", "User-Agent": "@letta-ai/letta-client/0.0.68658", "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),
|
|
85
85
|
contentType: "application/json",
|
|
86
86
|
requestType: "json",
|
|
87
87
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -90,7 +90,7 @@ class Sources {
|
|
|
90
90
|
method: "GET",
|
|
91
91
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
92
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.0.
|
|
93
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68658", "User-Agent": "@letta-ai/letta-client/0.0.68658", "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
94
|
contentType: "application/json",
|
|
95
95
|
requestType: "json",
|
|
96
96
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -166,7 +166,7 @@ class Sources {
|
|
|
166
166
|
method: "GET",
|
|
167
167
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
168
168
|
? yield core.Supplier.get(this._options.project)
|
|
169
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.
|
|
169
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68658", "User-Agent": "@letta-ai/letta-client/0.0.68658", "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),
|
|
170
170
|
contentType: "application/json",
|
|
171
171
|
requestType: "json",
|
|
172
172
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -242,7 +242,7 @@ class Sources {
|
|
|
242
242
|
method: "DELETE",
|
|
243
243
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
244
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.0.
|
|
245
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68658", "User-Agent": "@letta-ai/letta-client/0.0.68658", "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),
|
|
246
246
|
contentType: "application/json",
|
|
247
247
|
requestType: "json",
|
|
248
248
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -310,7 +310,7 @@ class Sources {
|
|
|
310
310
|
method: "PATCH",
|
|
311
311
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
312
312
|
? yield core.Supplier.get(this._options.project)
|
|
313
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.
|
|
313
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68658", "User-Agent": "@letta-ai/letta-client/0.0.68658", "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),
|
|
314
314
|
contentType: "application/json",
|
|
315
315
|
requestType: "json",
|
|
316
316
|
body: serializers.SourceUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -387,7 +387,7 @@ class Sources {
|
|
|
387
387
|
method: "GET",
|
|
388
388
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
389
389
|
? yield core.Supplier.get(this._options.project)
|
|
390
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.
|
|
390
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68658", "User-Agent": "@letta-ai/letta-client/0.0.68658", "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),
|
|
391
391
|
contentType: "application/json",
|
|
392
392
|
requestType: "json",
|
|
393
393
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -474,7 +474,7 @@ class Sources {
|
|
|
474
474
|
method: "GET",
|
|
475
475
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
476
476
|
? yield core.Supplier.get(this._options.project)
|
|
477
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.
|
|
477
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68658", "User-Agent": "@letta-ai/letta-client/0.0.68658", "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),
|
|
478
478
|
contentType: "application/json",
|
|
479
479
|
queryParameters: _queryParams,
|
|
480
480
|
requestType: "json",
|
|
@@ -550,7 +550,7 @@ class Sources {
|
|
|
550
550
|
method: "GET",
|
|
551
551
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
552
552
|
? yield core.Supplier.get(this._options.project)
|
|
553
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.
|
|
553
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68658", "User-Agent": "@letta-ai/letta-client/0.0.68658", "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),
|
|
554
554
|
contentType: "application/json",
|
|
555
555
|
requestType: "json",
|
|
556
556
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -628,7 +628,7 @@ class Sources {
|
|
|
628
628
|
method: "POST",
|
|
629
629
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
630
630
|
? yield core.Supplier.get(this._options.project)
|
|
631
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.
|
|
631
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68658", "User-Agent": "@letta-ai/letta-client/0.0.68658", "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),
|
|
632
632
|
contentType: "application/json",
|
|
633
633
|
requestType: "json",
|
|
634
634
|
body: serializers.SourceCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -705,7 +705,7 @@ class Sources {
|
|
|
705
705
|
method: "GET",
|
|
706
706
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
707
707
|
? yield core.Supplier.get(this._options.project)
|
|
708
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.
|
|
708
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68658", "User-Agent": "@letta-ai/letta-client/0.0.68658", "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),
|
|
709
709
|
contentType: "application/json",
|
|
710
710
|
requestType: "json",
|
|
711
711
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -788,7 +788,7 @@ class Sources {
|
|
|
788
788
|
method: "GET",
|
|
789
789
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
790
790
|
? yield core.Supplier.get(this._options.project)
|
|
791
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.
|
|
791
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68658", "User-Agent": "@letta-ai/letta-client/0.0.68658", "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),
|
|
792
792
|
contentType: "application/json",
|
|
793
793
|
queryParameters: _queryParams,
|
|
794
794
|
requestType: "json",
|
|
@@ -93,7 +93,7 @@ class Files {
|
|
|
93
93
|
method: "POST",
|
|
94
94
|
headers: Object.assign(Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
95
95
|
? yield core.Supplier.get(this._options.project)
|
|
96
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.
|
|
96
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68658", "User-Agent": "@letta-ai/letta-client/0.0.68658", "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),
|
|
97
97
|
queryParameters: _queryParams,
|
|
98
98
|
requestType: "file",
|
|
99
99
|
duplex: _maybeEncodedRequest.duplex,
|
|
@@ -186,7 +186,7 @@ class Files {
|
|
|
186
186
|
method: "GET",
|
|
187
187
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
188
188
|
? yield core.Supplier.get(this._options.project)
|
|
189
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.
|
|
189
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68658", "User-Agent": "@letta-ai/letta-client/0.0.68658", "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),
|
|
190
190
|
contentType: "application/json",
|
|
191
191
|
queryParameters: _queryParams,
|
|
192
192
|
requestType: "json",
|
|
@@ -264,7 +264,7 @@ class Files {
|
|
|
264
264
|
method: "DELETE",
|
|
265
265
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
266
266
|
? yield core.Supplier.get(this._options.project)
|
|
267
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.
|
|
267
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68658", "User-Agent": "@letta-ai/letta-client/0.0.68658", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
268
268
|
contentType: "application/json",
|
|
269
269
|
requestType: "json",
|
|
270
270
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -93,7 +93,7 @@ class Passages {
|
|
|
93
93
|
method: "GET",
|
|
94
94
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
95
95
|
? yield core.Supplier.get(this._options.project)
|
|
96
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.
|
|
96
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68658", "User-Agent": "@letta-ai/letta-client/0.0.68658", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
97
97
|
contentType: "application/json",
|
|
98
98
|
queryParameters: _queryParams,
|
|
99
99
|
requestType: "json",
|
|
@@ -7,6 +7,7 @@ import * as Letta from "../../../index";
|
|
|
7
7
|
import { Metrics } from "../resources/metrics/client/Client";
|
|
8
8
|
import { Trace } from "../resources/trace/client/Client";
|
|
9
9
|
import { Feedback } from "../resources/feedback/client/Client";
|
|
10
|
+
import { Messages } from "../resources/messages/client/Client";
|
|
10
11
|
export declare namespace Steps {
|
|
11
12
|
interface Options {
|
|
12
13
|
environment?: core.Supplier<environments.LettaEnvironment | string>;
|
|
@@ -35,10 +36,12 @@ export declare class Steps {
|
|
|
35
36
|
protected _metrics: Metrics | undefined;
|
|
36
37
|
protected _trace: Trace | undefined;
|
|
37
38
|
protected _feedback: Feedback | undefined;
|
|
39
|
+
protected _messages: Messages | undefined;
|
|
38
40
|
constructor(_options?: Steps.Options);
|
|
39
41
|
get metrics(): Metrics;
|
|
40
42
|
get trace(): Trace;
|
|
41
43
|
get feedback(): Feedback;
|
|
44
|
+
get messages(): Messages;
|
|
42
45
|
/**
|
|
43
46
|
* List steps with optional pagination and date filters.
|
|
44
47
|
*
|
|
@@ -58,6 +58,7 @@ const errors = __importStar(require("../../../../errors/index"));
|
|
|
58
58
|
const Client_1 = require("../resources/metrics/client/Client");
|
|
59
59
|
const Client_2 = require("../resources/trace/client/Client");
|
|
60
60
|
const Client_3 = require("../resources/feedback/client/Client");
|
|
61
|
+
const Client_4 = require("../resources/messages/client/Client");
|
|
61
62
|
class Steps {
|
|
62
63
|
constructor(_options = {}) {
|
|
63
64
|
this._options = _options;
|
|
@@ -74,6 +75,10 @@ class Steps {
|
|
|
74
75
|
var _a;
|
|
75
76
|
return ((_a = this._feedback) !== null && _a !== void 0 ? _a : (this._feedback = new Client_3.Feedback(this._options)));
|
|
76
77
|
}
|
|
78
|
+
get messages() {
|
|
79
|
+
var _a;
|
|
80
|
+
return ((_a = this._messages) !== null && _a !== void 0 ? _a : (this._messages = new Client_4.Messages(this._options)));
|
|
81
|
+
}
|
|
77
82
|
/**
|
|
78
83
|
* List steps with optional pagination and date filters.
|
|
79
84
|
*
|
|
@@ -154,7 +159,7 @@ class Steps {
|
|
|
154
159
|
method: "GET",
|
|
155
160
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
156
161
|
? 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.0.
|
|
162
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68658", "User-Agent": "@letta-ai/letta-client/0.0.68658", "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),
|
|
158
163
|
contentType: "application/json",
|
|
159
164
|
queryParameters: _queryParams,
|
|
160
165
|
requestType: "json",
|
|
@@ -231,7 +236,7 @@ class Steps {
|
|
|
231
236
|
method: "GET",
|
|
232
237
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
233
238
|
? 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.0.
|
|
239
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68658", "User-Agent": "@letta-ai/letta-client/0.0.68658", "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),
|
|
235
240
|
contentType: "application/json",
|
|
236
241
|
requestType: "json",
|
|
237
242
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -15,5 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./types"), exports);
|
|
18
|
-
__exportStar(require("./client"), exports);
|
|
19
18
|
__exportStar(require("./resources"), exports);
|
|
19
|
+
__exportStar(require("./client"), exports);
|
|
@@ -82,7 +82,7 @@ class Feedback {
|
|
|
82
82
|
method: "PATCH",
|
|
83
83
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
84
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.0.
|
|
85
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68658", "User-Agent": "@letta-ai/letta-client/0.0.68658", "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),
|
|
86
86
|
contentType: "application/json",
|
|
87
87
|
requestType: "json",
|
|
88
88
|
body: serializers.steps.ModifyFeedbackRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
export * as messages from "./messages";
|
|
2
|
+
export * from "./messages/types";
|
|
1
3
|
export * as metrics from "./metrics";
|
|
2
4
|
export * as trace from "./trace";
|
|
3
5
|
export * as feedback from "./feedback";
|
|
4
6
|
export * from "./feedback/client/requests";
|
|
7
|
+
export * from "./messages/client/requests";
|
|
@@ -36,8 +36,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.feedback = exports.trace = exports.metrics = void 0;
|
|
39
|
+
exports.feedback = exports.trace = exports.metrics = exports.messages = void 0;
|
|
40
|
+
exports.messages = __importStar(require("./messages"));
|
|
41
|
+
__exportStar(require("./messages/types"), exports);
|
|
40
42
|
exports.metrics = __importStar(require("./metrics"));
|
|
41
43
|
exports.trace = __importStar(require("./trace"));
|
|
42
44
|
exports.feedback = __importStar(require("./feedback"));
|
|
43
45
|
__exportStar(require("./feedback/client/requests"), exports);
|
|
46
|
+
__exportStar(require("./messages/client/requests"), exports);
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../../../environments";
|
|
5
|
+
import * as core from "../../../../../../core";
|
|
6
|
+
import * as Letta from "../../../../../index";
|
|
7
|
+
export declare namespace Messages {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.LettaEnvironment | string>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
12
|
+
token?: core.Supplier<string | undefined>;
|
|
13
|
+
/** Override the X-Project header */
|
|
14
|
+
project?: core.Supplier<string | undefined>;
|
|
15
|
+
fetcher?: core.FetchFunction;
|
|
16
|
+
}
|
|
17
|
+
interface RequestOptions {
|
|
18
|
+
/** The maximum time to wait for a response in seconds. */
|
|
19
|
+
timeoutInSeconds?: number;
|
|
20
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
21
|
+
maxRetries?: number;
|
|
22
|
+
/** A hook to abort the request. */
|
|
23
|
+
abortSignal?: AbortSignal;
|
|
24
|
+
/** Override the X-Project header */
|
|
25
|
+
project?: string | undefined;
|
|
26
|
+
/** Additional headers to include in the request. */
|
|
27
|
+
headers?: Record<string, string>;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export declare class Messages {
|
|
31
|
+
protected readonly _options: Messages.Options;
|
|
32
|
+
constructor(_options?: Messages.Options);
|
|
33
|
+
/**
|
|
34
|
+
* List messages for a given step.
|
|
35
|
+
*
|
|
36
|
+
* @param {string} stepId
|
|
37
|
+
* @param {Letta.steps.MessagesListRequest} request
|
|
38
|
+
* @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
|
|
39
|
+
*
|
|
40
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* await client.steps.messages.list("step_id")
|
|
44
|
+
*/
|
|
45
|
+
list(stepId: string, request?: Letta.steps.MessagesListRequest, requestOptions?: Messages.RequestOptions): core.HttpResponsePromise<Letta.steps.MessagesListResponseItem[]>;
|
|
46
|
+
private __list;
|
|
47
|
+
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
48
|
+
Authorization: string;
|
|
49
|
+
}>;
|
|
50
|
+
}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
39
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
40
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
41
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
42
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
43
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
44
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
48
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
49
|
+
};
|
|
50
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
|
+
exports.Messages = void 0;
|
|
52
|
+
const environments = __importStar(require("../../../../../../environments"));
|
|
53
|
+
const core = __importStar(require("../../../../../../core"));
|
|
54
|
+
const Letta = __importStar(require("../../../../../index"));
|
|
55
|
+
const serializers = __importStar(require("../../../../../../serialization/index"));
|
|
56
|
+
const url_join_1 = __importDefault(require("url-join"));
|
|
57
|
+
const errors = __importStar(require("../../../../../../errors/index"));
|
|
58
|
+
class Messages {
|
|
59
|
+
constructor(_options = {}) {
|
|
60
|
+
this._options = _options;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* List messages for a given step.
|
|
64
|
+
*
|
|
65
|
+
* @param {string} stepId
|
|
66
|
+
* @param {Letta.steps.MessagesListRequest} request
|
|
67
|
+
* @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
|
|
68
|
+
*
|
|
69
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* await client.steps.messages.list("step_id")
|
|
73
|
+
*/
|
|
74
|
+
list(stepId, request = {}, requestOptions) {
|
|
75
|
+
return core.HttpResponsePromise.fromPromise(this.__list(stepId, request, requestOptions));
|
|
76
|
+
}
|
|
77
|
+
__list(stepId_1) {
|
|
78
|
+
return __awaiter(this, arguments, void 0, function* (stepId, request = {}, requestOptions) {
|
|
79
|
+
var _a, _b, _c;
|
|
80
|
+
const { before, after, limit, order, orderBy } = request;
|
|
81
|
+
const _queryParams = {};
|
|
82
|
+
if (before != null) {
|
|
83
|
+
_queryParams["before"] = before;
|
|
84
|
+
}
|
|
85
|
+
if (after != null) {
|
|
86
|
+
_queryParams["after"] = after;
|
|
87
|
+
}
|
|
88
|
+
if (limit != null) {
|
|
89
|
+
_queryParams["limit"] = limit.toString();
|
|
90
|
+
}
|
|
91
|
+
if (order != null) {
|
|
92
|
+
_queryParams["order"] = serializers.steps.MessagesListRequestOrder.jsonOrThrow(order, {
|
|
93
|
+
unrecognizedObjectKeys: "strip",
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
if (orderBy != null) {
|
|
97
|
+
_queryParams["order_by"] = orderBy;
|
|
98
|
+
}
|
|
99
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
100
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/steps/${encodeURIComponent(stepId)}/messages`),
|
|
101
|
+
method: "GET",
|
|
102
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
103
|
+
? yield core.Supplier.get(this._options.project)
|
|
104
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68658", "User-Agent": "@letta-ai/letta-client/0.0.68658", "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
|
+
contentType: "application/json",
|
|
106
|
+
queryParameters: _queryParams,
|
|
107
|
+
requestType: "json",
|
|
108
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
109
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
110
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
111
|
+
});
|
|
112
|
+
if (_response.ok) {
|
|
113
|
+
return {
|
|
114
|
+
data: serializers.steps.messages.list.Response.parseOrThrow(_response.body, {
|
|
115
|
+
unrecognizedObjectKeys: "passthrough",
|
|
116
|
+
allowUnrecognizedUnionMembers: true,
|
|
117
|
+
allowUnrecognizedEnumValues: true,
|
|
118
|
+
skipValidation: true,
|
|
119
|
+
breadcrumbsPrefix: ["response"],
|
|
120
|
+
}),
|
|
121
|
+
rawResponse: _response.rawResponse,
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
if (_response.error.reason === "status-code") {
|
|
125
|
+
switch (_response.error.statusCode) {
|
|
126
|
+
case 422:
|
|
127
|
+
throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
128
|
+
unrecognizedObjectKeys: "passthrough",
|
|
129
|
+
allowUnrecognizedUnionMembers: true,
|
|
130
|
+
allowUnrecognizedEnumValues: true,
|
|
131
|
+
skipValidation: true,
|
|
132
|
+
breadcrumbsPrefix: ["response"],
|
|
133
|
+
}), _response.rawResponse);
|
|
134
|
+
default:
|
|
135
|
+
throw new errors.LettaError({
|
|
136
|
+
statusCode: _response.error.statusCode,
|
|
137
|
+
body: _response.error.body,
|
|
138
|
+
rawResponse: _response.rawResponse,
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
switch (_response.error.reason) {
|
|
143
|
+
case "non-json":
|
|
144
|
+
throw new errors.LettaError({
|
|
145
|
+
statusCode: _response.error.statusCode,
|
|
146
|
+
body: _response.error.rawBody,
|
|
147
|
+
rawResponse: _response.rawResponse,
|
|
148
|
+
});
|
|
149
|
+
case "timeout":
|
|
150
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/steps/{step_id}/messages.");
|
|
151
|
+
case "unknown":
|
|
152
|
+
throw new errors.LettaError({
|
|
153
|
+
message: _response.error.errorMessage,
|
|
154
|
+
rawResponse: _response.rawResponse,
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
_getCustomAuthorizationHeaders() {
|
|
160
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
161
|
+
const tokenValue = yield core.Supplier.get(this._options.token);
|
|
162
|
+
return { Authorization: `Bearer ${tokenValue}` };
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
exports.Messages = Messages;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests"), exports);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Letta from "../../../../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {}
|
|
8
|
+
*/
|
|
9
|
+
export interface MessagesListRequest {
|
|
10
|
+
/**
|
|
11
|
+
* Message ID cursor for pagination. Returns messages that come before this message ID in the specified sort order
|
|
12
|
+
*/
|
|
13
|
+
before?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Message ID cursor for pagination. Returns messages that come after this message ID in the specified sort order
|
|
16
|
+
*/
|
|
17
|
+
after?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Maximum number of messages to return
|
|
20
|
+
*/
|
|
21
|
+
limit?: number;
|
|
22
|
+
/**
|
|
23
|
+
* Sort order for messages by creation time. 'asc' for oldest first, 'desc' for newest first
|
|
24
|
+
*/
|
|
25
|
+
order?: Letta.steps.MessagesListRequestOrder;
|
|
26
|
+
/**
|
|
27
|
+
* Sort by field
|
|
28
|
+
*/
|
|
29
|
+
orderBy?: "created_at";
|
|
30
|
+
}
|