@letta-ai/letta-client 0.0.68656 → 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/Client.d.ts +3 -0
- package/Client.js +45 -40
- package/README.md +9 -9
- 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.d.ts +78 -0
- package/api/resources/archives/client/Client.js +325 -0
- package/api/resources/archives/client/index.d.ts +1 -0
- package/api/resources/archives/client/index.js +17 -0
- package/api/resources/archives/client/requests/ArchiveCreateRequest.d.ts +13 -0
- package/api/resources/archives/client/requests/ArchiveCreateRequest.js +5 -0
- package/api/resources/archives/client/requests/ArchiveUpdateRequest.d.ts +11 -0
- package/api/resources/archives/client/requests/ArchiveUpdateRequest.js +5 -0
- package/api/resources/archives/client/requests/ListArchivesRequest.d.ts +34 -0
- package/api/resources/archives/client/requests/ListArchivesRequest.js +5 -0
- package/api/resources/archives/client/requests/index.d.ts +3 -0
- package/api/resources/archives/client/requests/index.js +2 -0
- package/api/resources/archives/index.d.ts +2 -0
- package/api/resources/archives/index.js +18 -0
- package/api/resources/archives/types/ListArchivesRequestOrder.d.ts +11 -0
- package/api/resources/archives/types/ListArchivesRequestOrder.js +10 -0
- package/api/resources/archives/types/index.d.ts +1 -0
- package/api/resources/archives/types/index.js +17 -0
- 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/index.d.ts +3 -0
- package/api/resources/index.js +4 -1
- package/api/resources/jobs/client/Client.d.ts +0 -1
- package/api/resources/jobs/client/Client.js +9 -7
- package/api/resources/jobs/client/requests/JobsListRequest.d.ts +4 -0
- 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 +15 -7
- package/api/resources/runs/client/requests/RunsListRequest.d.ts +9 -0
- 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/Archive.d.ts +35 -0
- package/api/types/Archive.js +5 -0
- package/api/types/BatchJob.d.ts +2 -0
- 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/Job.d.ts +2 -0
- 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/Run.d.ts +2 -0
- package/api/types/Step.d.ts +1 -1
- package/api/types/TerminalToolRule.d.ts +1 -1
- package/api/types/index.d.ts +2 -0
- package/api/types/index.js +2 -0
- package/dist/Client.d.ts +3 -0
- package/dist/Client.js +45 -40
- 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.d.ts +78 -0
- package/dist/api/resources/archives/client/Client.js +325 -0
- package/dist/api/resources/archives/client/index.d.ts +1 -0
- package/dist/api/resources/archives/client/index.js +17 -0
- package/dist/api/resources/archives/client/requests/ArchiveCreateRequest.d.ts +13 -0
- package/dist/api/resources/archives/client/requests/ArchiveCreateRequest.js +5 -0
- package/dist/api/resources/archives/client/requests/ArchiveUpdateRequest.d.ts +11 -0
- package/dist/api/resources/archives/client/requests/ArchiveUpdateRequest.js +5 -0
- package/dist/api/resources/archives/client/requests/ListArchivesRequest.d.ts +34 -0
- package/dist/api/resources/archives/client/requests/ListArchivesRequest.js +5 -0
- package/dist/api/resources/archives/client/requests/index.d.ts +3 -0
- package/dist/api/resources/archives/client/requests/index.js +2 -0
- package/dist/api/resources/archives/index.d.ts +2 -0
- package/dist/api/resources/archives/index.js +18 -0
- package/dist/api/resources/archives/types/ListArchivesRequestOrder.d.ts +11 -0
- package/dist/api/resources/archives/types/ListArchivesRequestOrder.js +10 -0
- package/dist/api/resources/archives/types/index.d.ts +1 -0
- package/dist/api/resources/archives/types/index.js +17 -0
- 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/index.d.ts +3 -0
- package/dist/api/resources/index.js +4 -1
- package/dist/api/resources/jobs/client/Client.d.ts +0 -1
- package/dist/api/resources/jobs/client/Client.js +9 -7
- package/dist/api/resources/jobs/client/requests/JobsListRequest.d.ts +4 -0
- 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 +15 -7
- package/dist/api/resources/runs/client/requests/RunsListRequest.d.ts +9 -0
- 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/Archive.d.ts +35 -0
- package/dist/api/types/Archive.js +5 -0
- package/dist/api/types/BatchJob.d.ts +2 -0
- 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/Job.d.ts +2 -0
- 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/Run.d.ts +2 -0
- 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 +2 -0
- package/dist/api/types/index.js +2 -0
- package/dist/serialization/resources/archives/client/index.d.ts +2 -0
- package/dist/serialization/resources/archives/client/index.js +41 -0
- package/dist/serialization/resources/archives/client/listArchives.d.ts +11 -0
- package/dist/serialization/resources/archives/client/listArchives.js +42 -0
- package/dist/serialization/resources/archives/client/requests/ArchiveCreateRequest.d.ts +13 -0
- package/dist/serialization/resources/archives/client/requests/ArchiveCreateRequest.js +44 -0
- package/dist/serialization/resources/archives/client/requests/ArchiveUpdateRequest.d.ts +13 -0
- package/dist/serialization/resources/archives/client/requests/ArchiveUpdateRequest.js +44 -0
- package/dist/serialization/resources/archives/client/requests/index.d.ts +2 -0
- package/dist/serialization/resources/archives/client/requests/index.js +7 -0
- package/dist/serialization/resources/archives/index.d.ts +2 -0
- package/dist/serialization/resources/archives/index.js +18 -0
- package/dist/serialization/resources/archives/types/ListArchivesRequestOrder.d.ts +10 -0
- package/dist/serialization/resources/archives/types/ListArchivesRequestOrder.js +41 -0
- package/dist/serialization/resources/archives/types/index.d.ts +1 -0
- package/dist/serialization/resources/archives/types/index.js +17 -0
- package/dist/serialization/resources/index.d.ts +3 -0
- package/dist/serialization/resources/index.js +4 -1
- 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/Archive.d.ts +21 -0
- package/dist/serialization/types/Archive.js +52 -0
- package/dist/serialization/types/BatchJob.d.ts +2 -0
- package/dist/serialization/types/BatchJob.js +2 -0
- package/dist/serialization/types/Job.d.ts +2 -0
- package/dist/serialization/types/Job.js +2 -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/Run.d.ts +2 -0
- package/dist/serialization/types/Run.js +2 -0
- package/dist/serialization/types/index.d.ts +2 -0
- package/dist/serialization/types/index.js +2 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +274 -1
- package/serialization/resources/archives/client/index.d.ts +2 -0
- package/serialization/resources/archives/client/index.js +41 -0
- package/serialization/resources/archives/client/listArchives.d.ts +11 -0
- package/serialization/resources/archives/client/listArchives.js +42 -0
- package/serialization/resources/archives/client/requests/ArchiveCreateRequest.d.ts +13 -0
- package/serialization/resources/archives/client/requests/ArchiveCreateRequest.js +44 -0
- package/serialization/resources/archives/client/requests/ArchiveUpdateRequest.d.ts +13 -0
- package/serialization/resources/archives/client/requests/ArchiveUpdateRequest.js +44 -0
- package/serialization/resources/archives/client/requests/index.d.ts +2 -0
- package/serialization/resources/archives/client/requests/index.js +7 -0
- package/serialization/resources/archives/index.d.ts +2 -0
- package/serialization/resources/archives/index.js +18 -0
- package/serialization/resources/archives/types/ListArchivesRequestOrder.d.ts +10 -0
- package/serialization/resources/archives/types/ListArchivesRequestOrder.js +41 -0
- package/serialization/resources/archives/types/index.d.ts +1 -0
- package/serialization/resources/archives/types/index.js +17 -0
- package/serialization/resources/index.d.ts +3 -0
- package/serialization/resources/index.js +4 -1
- 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/Archive.d.ts +21 -0
- package/serialization/types/Archive.js +52 -0
- package/serialization/types/BatchJob.d.ts +2 -0
- package/serialization/types/BatchJob.js +2 -0
- package/serialization/types/Job.d.ts +2 -0
- package/serialization/types/Job.js +2 -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/Run.d.ts +2 -0
- package/serialization/types/Run.js +2 -0
- package/serialization/types/index.d.ts +2 -0
- package/serialization/types/index.js +2 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -82,7 +82,7 @@ class Sources {
|
|
|
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
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -159,7 +159,7 @@ class Sources {
|
|
|
159
159
|
method: "PATCH",
|
|
160
160
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
161
161
|
? yield core.Supplier.get(this._options.project)
|
|
162
|
-
: 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),
|
|
163
163
|
contentType: "application/json",
|
|
164
164
|
requestType: "json",
|
|
165
165
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -235,7 +235,7 @@ class Sources {
|
|
|
235
235
|
method: "GET",
|
|
236
236
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
237
237
|
? yield core.Supplier.get(this._options.project)
|
|
238
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.
|
|
238
|
+
: 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),
|
|
239
239
|
contentType: "application/json",
|
|
240
240
|
requestType: "json",
|
|
241
241
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -84,7 +84,7 @@ class Templates {
|
|
|
84
84
|
method: "POST",
|
|
85
85
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
86
86
|
? yield core.Supplier.get(this._options.project)
|
|
87
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.
|
|
87
|
+
: 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),
|
|
88
88
|
contentType: "application/json",
|
|
89
89
|
requestType: "json",
|
|
90
90
|
body: serializers.agents.TemplatesMigrateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -150,7 +150,7 @@ class Templates {
|
|
|
150
150
|
method: "POST",
|
|
151
151
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
152
152
|
? yield core.Supplier.get(this._options.project)
|
|
153
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.
|
|
153
|
+
: 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),
|
|
154
154
|
contentType: "application/json",
|
|
155
155
|
requestType: "json",
|
|
156
156
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -206,7 +206,7 @@ class Templates {
|
|
|
206
206
|
method: "POST",
|
|
207
207
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
208
208
|
? yield core.Supplier.get(this._options.project)
|
|
209
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.
|
|
209
|
+
: 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),
|
|
210
210
|
contentType: "application/json",
|
|
211
211
|
requestType: "json",
|
|
212
212
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -81,7 +81,7 @@ class Tools {
|
|
|
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,
|
|
@@ -158,7 +158,7 @@ class Tools {
|
|
|
158
158
|
method: "PATCH",
|
|
159
159
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
160
160
|
? yield core.Supplier.get(this._options.project)
|
|
161
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.
|
|
161
|
+
: 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),
|
|
162
162
|
contentType: "application/json",
|
|
163
163
|
requestType: "json",
|
|
164
164
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -235,7 +235,7 @@ class Tools {
|
|
|
235
235
|
method: "PATCH",
|
|
236
236
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
237
237
|
? yield core.Supplier.get(this._options.project)
|
|
238
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.
|
|
238
|
+
: 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),
|
|
239
239
|
contentType: "application/json",
|
|
240
240
|
requestType: "json",
|
|
241
241
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -318,7 +318,7 @@ class Tools {
|
|
|
318
318
|
method: "PATCH",
|
|
319
319
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
320
320
|
? yield core.Supplier.get(this._options.project)
|
|
321
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.
|
|
321
|
+
: 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),
|
|
322
322
|
contentType: "application/json",
|
|
323
323
|
queryParameters: _queryParams,
|
|
324
324
|
requestType: "json",
|
|
@@ -0,0 +1,78 @@
|
|
|
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 Archives {
|
|
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 Archives {
|
|
31
|
+
protected readonly _options: Archives.Options;
|
|
32
|
+
constructor(_options?: Archives.Options);
|
|
33
|
+
/**
|
|
34
|
+
* Get a list of all archives for the current organization with optional filters and pagination.
|
|
35
|
+
*
|
|
36
|
+
* @param {Letta.ListArchivesRequest} request
|
|
37
|
+
* @param {Archives.RequestOptions} requestOptions - Request-specific configuration.
|
|
38
|
+
*
|
|
39
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* await client.archives.listArchives()
|
|
43
|
+
*/
|
|
44
|
+
listArchives(request?: Letta.ListArchivesRequest, requestOptions?: Archives.RequestOptions): core.HttpResponsePromise<Letta.Archive[]>;
|
|
45
|
+
private __listArchives;
|
|
46
|
+
/**
|
|
47
|
+
* Create a new archive.
|
|
48
|
+
*
|
|
49
|
+
* @param {Letta.ArchiveCreateRequest} request
|
|
50
|
+
* @param {Archives.RequestOptions} requestOptions - Request-specific configuration.
|
|
51
|
+
*
|
|
52
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* await client.archives.createArchive({
|
|
56
|
+
* name: "name"
|
|
57
|
+
* })
|
|
58
|
+
*/
|
|
59
|
+
createArchive(request: Letta.ArchiveCreateRequest, requestOptions?: Archives.RequestOptions): core.HttpResponsePromise<Letta.Archive>;
|
|
60
|
+
private __createArchive;
|
|
61
|
+
/**
|
|
62
|
+
* Update an existing archive's name and/or description.
|
|
63
|
+
*
|
|
64
|
+
* @param {string} archiveId
|
|
65
|
+
* @param {Letta.ArchiveUpdateRequest} request
|
|
66
|
+
* @param {Archives.RequestOptions} requestOptions - Request-specific configuration.
|
|
67
|
+
*
|
|
68
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* await client.archives.modifyArchive("archive_id")
|
|
72
|
+
*/
|
|
73
|
+
modifyArchive(archiveId: string, request?: Letta.ArchiveUpdateRequest, requestOptions?: Archives.RequestOptions): core.HttpResponsePromise<Letta.Archive>;
|
|
74
|
+
private __modifyArchive;
|
|
75
|
+
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
76
|
+
Authorization: string;
|
|
77
|
+
}>;
|
|
78
|
+
}
|
|
@@ -0,0 +1,325 @@
|
|
|
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.Archives = 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 Archives {
|
|
59
|
+
constructor(_options = {}) {
|
|
60
|
+
this._options = _options;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Get a list of all archives for the current organization with optional filters and pagination.
|
|
64
|
+
*
|
|
65
|
+
* @param {Letta.ListArchivesRequest} request
|
|
66
|
+
* @param {Archives.RequestOptions} requestOptions - Request-specific configuration.
|
|
67
|
+
*
|
|
68
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* await client.archives.listArchives()
|
|
72
|
+
*/
|
|
73
|
+
listArchives(request = {}, requestOptions) {
|
|
74
|
+
return core.HttpResponsePromise.fromPromise(this.__listArchives(request, requestOptions));
|
|
75
|
+
}
|
|
76
|
+
__listArchives() {
|
|
77
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
78
|
+
var _a, _b, _c;
|
|
79
|
+
const { before, after, limit, order, name, agentId } = request;
|
|
80
|
+
const _queryParams = {};
|
|
81
|
+
if (before != null) {
|
|
82
|
+
_queryParams["before"] = before;
|
|
83
|
+
}
|
|
84
|
+
if (after != null) {
|
|
85
|
+
_queryParams["after"] = after;
|
|
86
|
+
}
|
|
87
|
+
if (limit != null) {
|
|
88
|
+
_queryParams["limit"] = limit.toString();
|
|
89
|
+
}
|
|
90
|
+
if (order != null) {
|
|
91
|
+
_queryParams["order"] = serializers.ListArchivesRequestOrder.jsonOrThrow(order, {
|
|
92
|
+
unrecognizedObjectKeys: "strip",
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
if (name != null) {
|
|
96
|
+
_queryParams["name"] = name;
|
|
97
|
+
}
|
|
98
|
+
if (agentId != null) {
|
|
99
|
+
_queryParams["agent_id"] = agentId;
|
|
100
|
+
}
|
|
101
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
102
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/archives/"),
|
|
103
|
+
method: "GET",
|
|
104
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
105
|
+
? yield core.Supplier.get(this._options.project)
|
|
106
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.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),
|
|
107
|
+
contentType: "application/json",
|
|
108
|
+
queryParameters: _queryParams,
|
|
109
|
+
requestType: "json",
|
|
110
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
111
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
112
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
113
|
+
});
|
|
114
|
+
if (_response.ok) {
|
|
115
|
+
return {
|
|
116
|
+
data: serializers.archives.listArchives.Response.parseOrThrow(_response.body, {
|
|
117
|
+
unrecognizedObjectKeys: "passthrough",
|
|
118
|
+
allowUnrecognizedUnionMembers: true,
|
|
119
|
+
allowUnrecognizedEnumValues: true,
|
|
120
|
+
skipValidation: true,
|
|
121
|
+
breadcrumbsPrefix: ["response"],
|
|
122
|
+
}),
|
|
123
|
+
rawResponse: _response.rawResponse,
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
if (_response.error.reason === "status-code") {
|
|
127
|
+
switch (_response.error.statusCode) {
|
|
128
|
+
case 422:
|
|
129
|
+
throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
130
|
+
unrecognizedObjectKeys: "passthrough",
|
|
131
|
+
allowUnrecognizedUnionMembers: true,
|
|
132
|
+
allowUnrecognizedEnumValues: true,
|
|
133
|
+
skipValidation: true,
|
|
134
|
+
breadcrumbsPrefix: ["response"],
|
|
135
|
+
}), _response.rawResponse);
|
|
136
|
+
default:
|
|
137
|
+
throw new errors.LettaError({
|
|
138
|
+
statusCode: _response.error.statusCode,
|
|
139
|
+
body: _response.error.body,
|
|
140
|
+
rawResponse: _response.rawResponse,
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
switch (_response.error.reason) {
|
|
145
|
+
case "non-json":
|
|
146
|
+
throw new errors.LettaError({
|
|
147
|
+
statusCode: _response.error.statusCode,
|
|
148
|
+
body: _response.error.rawBody,
|
|
149
|
+
rawResponse: _response.rawResponse,
|
|
150
|
+
});
|
|
151
|
+
case "timeout":
|
|
152
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/archives/.");
|
|
153
|
+
case "unknown":
|
|
154
|
+
throw new errors.LettaError({
|
|
155
|
+
message: _response.error.errorMessage,
|
|
156
|
+
rawResponse: _response.rawResponse,
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Create a new archive.
|
|
163
|
+
*
|
|
164
|
+
* @param {Letta.ArchiveCreateRequest} request
|
|
165
|
+
* @param {Archives.RequestOptions} requestOptions - Request-specific configuration.
|
|
166
|
+
*
|
|
167
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
168
|
+
*
|
|
169
|
+
* @example
|
|
170
|
+
* await client.archives.createArchive({
|
|
171
|
+
* name: "name"
|
|
172
|
+
* })
|
|
173
|
+
*/
|
|
174
|
+
createArchive(request, requestOptions) {
|
|
175
|
+
return core.HttpResponsePromise.fromPromise(this.__createArchive(request, requestOptions));
|
|
176
|
+
}
|
|
177
|
+
__createArchive(request, requestOptions) {
|
|
178
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
179
|
+
var _a, _b, _c;
|
|
180
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
181
|
+
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/archives/"),
|
|
182
|
+
method: "POST",
|
|
183
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
184
|
+
? yield core.Supplier.get(this._options.project)
|
|
185
|
+
: 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),
|
|
186
|
+
contentType: "application/json",
|
|
187
|
+
requestType: "json",
|
|
188
|
+
body: serializers.ArchiveCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
189
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
190
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
191
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
192
|
+
});
|
|
193
|
+
if (_response.ok) {
|
|
194
|
+
return {
|
|
195
|
+
data: serializers.Archive.parseOrThrow(_response.body, {
|
|
196
|
+
unrecognizedObjectKeys: "passthrough",
|
|
197
|
+
allowUnrecognizedUnionMembers: true,
|
|
198
|
+
allowUnrecognizedEnumValues: true,
|
|
199
|
+
skipValidation: true,
|
|
200
|
+
breadcrumbsPrefix: ["response"],
|
|
201
|
+
}),
|
|
202
|
+
rawResponse: _response.rawResponse,
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
if (_response.error.reason === "status-code") {
|
|
206
|
+
switch (_response.error.statusCode) {
|
|
207
|
+
case 422:
|
|
208
|
+
throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
209
|
+
unrecognizedObjectKeys: "passthrough",
|
|
210
|
+
allowUnrecognizedUnionMembers: true,
|
|
211
|
+
allowUnrecognizedEnumValues: true,
|
|
212
|
+
skipValidation: true,
|
|
213
|
+
breadcrumbsPrefix: ["response"],
|
|
214
|
+
}), _response.rawResponse);
|
|
215
|
+
default:
|
|
216
|
+
throw new errors.LettaError({
|
|
217
|
+
statusCode: _response.error.statusCode,
|
|
218
|
+
body: _response.error.body,
|
|
219
|
+
rawResponse: _response.rawResponse,
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
switch (_response.error.reason) {
|
|
224
|
+
case "non-json":
|
|
225
|
+
throw new errors.LettaError({
|
|
226
|
+
statusCode: _response.error.statusCode,
|
|
227
|
+
body: _response.error.rawBody,
|
|
228
|
+
rawResponse: _response.rawResponse,
|
|
229
|
+
});
|
|
230
|
+
case "timeout":
|
|
231
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/archives/.");
|
|
232
|
+
case "unknown":
|
|
233
|
+
throw new errors.LettaError({
|
|
234
|
+
message: _response.error.errorMessage,
|
|
235
|
+
rawResponse: _response.rawResponse,
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Update an existing archive's name and/or description.
|
|
242
|
+
*
|
|
243
|
+
* @param {string} archiveId
|
|
244
|
+
* @param {Letta.ArchiveUpdateRequest} request
|
|
245
|
+
* @param {Archives.RequestOptions} requestOptions - Request-specific configuration.
|
|
246
|
+
*
|
|
247
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
248
|
+
*
|
|
249
|
+
* @example
|
|
250
|
+
* await client.archives.modifyArchive("archive_id")
|
|
251
|
+
*/
|
|
252
|
+
modifyArchive(archiveId, request = {}, requestOptions) {
|
|
253
|
+
return core.HttpResponsePromise.fromPromise(this.__modifyArchive(archiveId, request, requestOptions));
|
|
254
|
+
}
|
|
255
|
+
__modifyArchive(archiveId_1) {
|
|
256
|
+
return __awaiter(this, arguments, void 0, function* (archiveId, request = {}, requestOptions) {
|
|
257
|
+
var _a, _b, _c;
|
|
258
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
259
|
+
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/archives/${encodeURIComponent(archiveId)}`),
|
|
260
|
+
method: "PATCH",
|
|
261
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
262
|
+
? yield core.Supplier.get(this._options.project)
|
|
263
|
+
: 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),
|
|
264
|
+
contentType: "application/json",
|
|
265
|
+
requestType: "json",
|
|
266
|
+
body: serializers.ArchiveUpdateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
267
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
268
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
269
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
270
|
+
});
|
|
271
|
+
if (_response.ok) {
|
|
272
|
+
return {
|
|
273
|
+
data: serializers.Archive.parseOrThrow(_response.body, {
|
|
274
|
+
unrecognizedObjectKeys: "passthrough",
|
|
275
|
+
allowUnrecognizedUnionMembers: true,
|
|
276
|
+
allowUnrecognizedEnumValues: true,
|
|
277
|
+
skipValidation: true,
|
|
278
|
+
breadcrumbsPrefix: ["response"],
|
|
279
|
+
}),
|
|
280
|
+
rawResponse: _response.rawResponse,
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
if (_response.error.reason === "status-code") {
|
|
284
|
+
switch (_response.error.statusCode) {
|
|
285
|
+
case 422:
|
|
286
|
+
throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
287
|
+
unrecognizedObjectKeys: "passthrough",
|
|
288
|
+
allowUnrecognizedUnionMembers: true,
|
|
289
|
+
allowUnrecognizedEnumValues: true,
|
|
290
|
+
skipValidation: true,
|
|
291
|
+
breadcrumbsPrefix: ["response"],
|
|
292
|
+
}), _response.rawResponse);
|
|
293
|
+
default:
|
|
294
|
+
throw new errors.LettaError({
|
|
295
|
+
statusCode: _response.error.statusCode,
|
|
296
|
+
body: _response.error.body,
|
|
297
|
+
rawResponse: _response.rawResponse,
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
switch (_response.error.reason) {
|
|
302
|
+
case "non-json":
|
|
303
|
+
throw new errors.LettaError({
|
|
304
|
+
statusCode: _response.error.statusCode,
|
|
305
|
+
body: _response.error.rawBody,
|
|
306
|
+
rawResponse: _response.rawResponse,
|
|
307
|
+
});
|
|
308
|
+
case "timeout":
|
|
309
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/archives/{archive_id}.");
|
|
310
|
+
case "unknown":
|
|
311
|
+
throw new errors.LettaError({
|
|
312
|
+
message: _response.error.errorMessage,
|
|
313
|
+
rawResponse: _response.rawResponse,
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
_getCustomAuthorizationHeaders() {
|
|
319
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
320
|
+
const tokenValue = yield core.Supplier.get(this._options.token);
|
|
321
|
+
return { Authorization: `Bearer ${tokenValue}` };
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
exports.Archives = Archives;
|
|
@@ -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,34 @@
|
|
|
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 ListArchivesRequest {
|
|
10
|
+
/**
|
|
11
|
+
* Archive ID cursor for pagination. Returns archives that come before this archive ID in the specified sort order
|
|
12
|
+
*/
|
|
13
|
+
before?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Archive ID cursor for pagination. Returns archives that come after this archive ID in the specified sort order
|
|
16
|
+
*/
|
|
17
|
+
after?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Maximum number of archives to return
|
|
20
|
+
*/
|
|
21
|
+
limit?: number;
|
|
22
|
+
/**
|
|
23
|
+
* Sort order for archives by creation time. 'asc' for oldest first, 'desc' for newest first
|
|
24
|
+
*/
|
|
25
|
+
order?: Letta.ListArchivesRequestOrder;
|
|
26
|
+
/**
|
|
27
|
+
* Filter by archive name (exact match)
|
|
28
|
+
*/
|
|
29
|
+
name?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Only archives attached to this agent ID
|
|
32
|
+
*/
|
|
33
|
+
agentId?: string;
|
|
34
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./types"), exports);
|
|
18
|
+
__exportStar(require("./client"), exports);
|