From 27c2ff22b33945025a0d84e6f73cd38ae09446ac Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Sat, 14 Dec 2024 21:59:05 +0000
Subject: [PATCH] Release 0.5.3
---
.fernignore | 1 +
.github/workflows/ci.yml | 30 +
.gitignore | 3 +
.npmignore | 9 +
.prettierrc.yml | 2 +
README.md | 167 +-
jest.config.js | 5 +
package.json | 44 +
reference.md | 3827 +++++++++++++++++
src/Client.ts | 78 +
src/api/errors/ConflictError.ts | 17 +
src/api/errors/InternalServerError.ts | 16 +
src/api/errors/NotFoundError.ts | 16 +
src/api/errors/UnprocessableEntityError.ts | 17 +
src/api/errors/index.ts | 4 +
src/api/index.ts | 3 +
src/api/resources/agents/client/Client.ts | 2252 ++++++++++
src/api/resources/agents/client/index.ts | 1 +
.../AgentsListArchivalMemoryRequest.ts | 22 +
.../requests/AgentsListMessagesRequest.ts | 30 +
.../client/requests/AgentsListRequest.ts | 18 +
.../client/requests/AgentsMigrateRequest.ts | 17 +
.../requests/AgentsVersionTemplateRequest.ts | 12 +
.../client/requests/BlockLabelUpdate.ts | 17 +
.../client/requests/BlockLimitUpdate.ts | 17 +
.../agents/client/requests/CreateAgent.ts | 40 +
.../client/requests/CreateArchivalMemory.ts | 14 +
.../agents/client/requests/LettaRequest.ts | 23 +
.../client/requests/LettaStreamingRequest.ts | 25 +
.../client/requests/UpdateAgentState.ts | 38 +
.../agents/client/requests/UpdateMessage.ts | 26 +
.../resources/agents/client/requests/index.ts | 13 +
src/api/resources/agents/index.ts | 2 +
.../types/AgentsListMessagesResponse.ts | 9 +
.../types/AgentsListMessagesResponseItem.ts | 39 +
.../agents/types/AgentsMigrateResponse.ts | 7 +
.../types/AgentsVersionTemplateResponse.ts | 8 +
.../agents/types/LettaRequestMessages.ts | 10 +
.../types/LettaStreamingRequestMessages.ts | 10 +
src/api/resources/agents/types/index.ts | 6 +
src/api/resources/blocks/client/Client.ts | 418 ++
src/api/resources/blocks/client/index.ts | 1 +
.../blocks/client/requests/BlockUpdate.ts | 24 +
.../requests/BlocksListMemoryRequest.ts | 22 +
.../resources/blocks/client/requests/index.ts | 2 +
src/api/resources/blocks/index.ts | 1 +
src/api/resources/health/client/Client.ts | 98 +
src/api/resources/health/client/index.ts | 1 +
src/api/resources/health/index.ts | 1 +
src/api/resources/index.ts | 13 +
src/api/resources/jobs/client/Client.ts | 332 ++
src/api/resources/jobs/client/index.ts | 1 +
.../jobs/client/requests/JobsListRequest.ts | 14 +
.../resources/jobs/client/requests/index.ts | 1 +
src/api/resources/jobs/index.ts | 1 +
src/api/resources/models/client/Client.ts | 160 +
src/api/resources/models/client/index.ts | 1 +
src/api/resources/models/index.ts | 1 +
src/api/resources/sources/client/Client.ts | 981 +++++
src/api/resources/sources/client/index.ts | 1 +
.../client/requests/BodyUploadFileToSource.ts | 9 +
.../sources/client/requests/SourceCreate.ts | 22 +
.../sources/client/requests/SourceUpdate.ts | 20 +
.../client/requests/SourcesAttachRequest.ts | 16 +
.../client/requests/SourcesDetachRequest.ts | 16 +
.../requests/SourcesListFilesRequest.ts | 18 +
.../sources/client/requests/index.ts | 6 +
src/api/resources/sources/index.ts | 1 +
src/api/resources/tools/client/Client.ts | 645 +++
src/api/resources/tools/client/index.ts | 1 +
.../tools/client/requests/ToolUpdate.ts | 24 +
.../tools/client/requests/ToolsListRequest.ts | 12 +
.../resources/tools/client/requests/index.ts | 2 +
src/api/resources/tools/index.ts | 1 +
src/api/types/AgentState.ts | 51 +
src/api/types/AgentType.ts | 14 +
src/api/types/ApiKey.ts | 14 +
src/api/types/ApiKeyCreate.ts | 10 +
src/api/types/ArchivalMemorySummary.ts | 8 +
src/api/types/AssistantFile.ts | 13 +
src/api/types/AssistantMessageInput.ts | 12 +
src/api/types/AssistantMessageOutput.ts | 9 +
src/api/types/AuthRequest.ts | 8 +
src/api/types/AuthResponse.ts | 10 +
src/api/types/BaseToolRule.ts | 8 +
src/api/types/Block.ts | 42 +
src/api/types/BlockCreate.ts | 22 +
src/api/types/ChatCompletionRequest.ts | 31 +
.../ChatCompletionRequestFunctionCall.ts | 7 +
.../ChatCompletionRequestMessagesItem.ts | 11 +
src/api/types/ChatCompletionRequestStop.ts | 5 +
.../types/ChatCompletionRequestToolChoice.ts | 7 +
src/api/types/ChatCompletionResponse.ts | 18 +
src/api/types/Choice.ts | 13 +
src/api/types/ConflictErrorBody.ts | 7 +
src/api/types/ContextWindowOverview.ts | 43 +
src/api/types/CreateAssistantFileRequest.ts | 8 +
src/api/types/CreateAssistantRequest.ts | 22 +
src/api/types/CreateMessageRequest.ts | 14 +
src/api/types/CreateRunRequest.ts | 20 +
src/api/types/CreateThreadRequest.ts | 12 +
src/api/types/CreateThreadRunRequest.ts | 20 +
src/api/types/DeleteAssistantFileResponse.ts | 11 +
src/api/types/DeleteAssistantResponse.ts | 11 +
src/api/types/DeleteThreadResponse.ts | 11 +
src/api/types/E2BSandboxConfig.ts | 12 +
src/api/types/EmbeddingConfig.ts | 35 +
src/api/types/FileMetadata.ts | 33 +
src/api/types/Function.ts | 10 +
src/api/types/FunctionCallDelta.ts | 9 +
src/api/types/FunctionCallInput.ts | 7 +
src/api/types/FunctionCallMessage.ts | 19 +
.../types/FunctionCallMessageFunctionCall.ts | 7 +
src/api/types/FunctionReturn.ts | 23 +
src/api/types/FunctionReturnStatus.ts | 10 +
src/api/types/FunctionSchema.ts | 9 +
src/api/types/Health.ts | 11 +
src/api/types/HttpValidationError.ts | 9 +
src/api/types/ImageFile.ts | 8 +
src/api/types/InternalMonologue.ts | 17 +
src/api/types/InternalServerErrorBody.ts | 7 +
src/api/types/Job.ts | 30 +
src/api/types/JobStatus.ts | 16 +
src/api/types/LettaResponse.ts | 68 +
.../types/LettaResponseAssistantMessage.ts | 10 +
src/api/types/LettaResponseFunctionCall.ts | 9 +
.../types/LettaResponseFunctionCallDelta.ts | 9 +
.../types/LettaResponseFunctionCallMessage.ts | 20 +
...ResponseFunctionCallMessageFunctionCall.ts | 9 +
...ponseFunctionCallMessageFunctionCallOne.ts | 9 +
...onseFunctionCallMessageFunctionCallZero.ts | 9 +
src/api/types/LettaResponseFunctionReturn.ts | 24 +
.../LettaResponseFunctionReturnStatus.ts | 10 +
.../types/LettaResponseInternalMonologue.ts | 18 +
.../LettaResponseLettaUsageStatistics.ts | 23 +
src/api/types/LettaResponseSystemMessage.ts | 18 +
src/api/types/LettaResponseUserMessage.ts | 18 +
.../LettaSchemasLettaMessageFunctionCall.ts | 9 +
.../types/LettaSchemasMessageMessageOutput.ts | 43 +
...aSchemasOpenaiChatCompletionRequestTool.ts | 10 +
...emasOpenaiChatCompletionRequestToolCall.ts | 11 +
...aiChatCompletionRequestToolCallFunction.ts | 8 +
...penaiChatCompletionResponseFunctionCall.ts | 8 +
...emasOpenaiChatCompletionResponseMessage.ts | 12 +
...masOpenaiChatCompletionResponseToolCall.ts | 11 +
...asOpenaiChatCompletionsToolCallFunction.ts | 10 +
...hemasOpenaiChatCompletionsToolCallInput.ts | 13 +
...emasOpenaiChatCompletionsToolCallOutput.ts | 13 +
.../types/LettaSchemasOpenaiOpenaiToolCall.ts | 13 +
src/api/types/LettaSchemasToolTool.ts | 38 +
src/api/types/LettaUsageStatistics.ts | 23 +
src/api/types/ListMessagesResponse.ts | 10 +
src/api/types/LlmConfig.ts | 31 +
src/api/types/LlmConfigModelEndpointType.ts | 45 +
src/api/types/LocalSandboxConfig.ts | 8 +
src/api/types/LogProbToken.ts | 9 +
src/api/types/Memory.ts | 18 +
src/api/types/MessageContentLogProb.ts | 12 +
src/api/types/MessageCreate.ts | 17 +
src/api/types/MessageCreateRole.ts | 13 +
src/api/types/MessageFile.ts | 13 +
src/api/types/MessageInput.ts | 43 +
src/api/types/MessageRole.ts | 13 +
src/api/types/ModifyMessageRequest.ts | 8 +
src/api/types/ModifyRunRequest.ts | 8 +
src/api/types/ModifyThreadRequest.ts | 8 +
src/api/types/NotFoundErrorBody.ts | 9 +
src/api/types/NotFoundErrorBodyMessage.ts | 13 +
src/api/types/OpenAiAssistant.ts | 28 +
src/api/types/OpenAiError.ts | 10 +
src/api/types/OpenAiMessage.ts | 27 +
src/api/types/OpenAiMessageContentItem.ts | 7 +
src/api/types/OpenAiMessageCreationStep.ts | 9 +
src/api/types/OpenAiRun.ts | 45 +
src/api/types/OpenAiRunStep.ts | 35 +
src/api/types/OpenAiRunStepStepDefaults.ts | 10 +
src/api/types/OpenAiThread.ts | 16 +
src/api/types/OpenAiToolCallsStep.ts | 11 +
src/api/types/OpenAiUsage.ts | 12 +
src/api/types/Organization.ts | 12 +
src/api/types/OrganizationCreate.ts | 8 +
src/api/types/Passage.ts | 41 +
src/api/types/RecallMemorySummary.ts | 8 +
src/api/types/RequiredAction.ts | 10 +
src/api/types/ResponseFormat.ts | 7 +
src/api/types/SandboxConfig.ts | 24 +
src/api/types/SandboxConfigCreate.ts | 10 +
src/api/types/SandboxConfigCreateConfig.ts | 10 +
src/api/types/SandboxConfigUpdate.ts | 13 +
src/api/types/SandboxConfigUpdateConfig.ts | 10 +
src/api/types/SandboxEnvironmentVariable.ts | 26 +
.../types/SandboxEnvironmentVariableCreate.ts | 12 +
.../types/SandboxEnvironmentVariableUpdate.ts | 15 +
src/api/types/SandboxType.ts | 10 +
src/api/types/Source.ts | 39 +
.../types/SubmitToolOutputsToRunRequest.ts | 10 +
src/api/types/SystemMessageInput.ts | 9 +
src/api/types/SystemMessageOutput.ts | 17 +
src/api/types/Text.ts | 9 +
src/api/types/ToolCallFunctionOutput.ts | 10 +
src/api/types/ToolCallOutput.ts | 10 +
src/api/types/ToolCreate.ts | 20 +
src/api/types/ToolFunctionChoice.ts | 10 +
src/api/types/ToolInput.ts | 10 +
src/api/types/ToolMessage.ts | 9 +
src/api/types/UsageStatistics.ts | 9 +
src/api/types/User.ts | 26 +
src/api/types/UserCreate.ts | 10 +
src/api/types/UserMessageInput.ts | 11 +
src/api/types/UserMessageInputContent.ts | 5 +
src/api/types/UserMessageOutput.ts | 17 +
src/api/types/UserUpdate.ts | 12 +
src/api/types/ValidationError.ts | 11 +
src/api/types/ValidationErrorLocItem.ts | 5 +
src/api/types/index.ts | 140 +
src/core/api-promise/APIPromise.ts | 54 +
src/core/api-promise/index.ts | 1 +
src/core/auth/BasicAuth.ts | 31 +
src/core/auth/BearerToken.ts | 15 +
src/core/auth/index.ts | 2 +
src/core/fetcher/APIResponse.ts | 12 +
src/core/fetcher/Fetcher.ts | 143 +
src/core/fetcher/Supplier.ts | 11 +
src/core/fetcher/createRequestUrl.ts | 10 +
src/core/fetcher/getFetchFn.ts | 25 +
src/core/fetcher/getHeader.ts | 8 +
src/core/fetcher/getRequestBody.ts | 14 +
src/core/fetcher/getResponseBody.ts | 34 +
src/core/fetcher/index.ts | 5 +
src/core/fetcher/makeRequest.ts | 44 +
src/core/fetcher/requestWithRetries.ts | 33 +
src/core/fetcher/signals.ts | 38 +
.../Node18UniversalStreamWrapper.ts | 256 ++
.../stream-wrappers/NodePre18StreamWrapper.ts | 106 +
.../stream-wrappers/UndiciStreamWrapper.ts | 243 ++
.../stream-wrappers/chooseStreamWrapper.ts | 33 +
src/core/form-data-utils/FormDataWrapper.ts | 177 +
src/core/form-data-utils/index.ts | 1 +
src/core/index.ts | 5 +
src/core/runtime/index.ts | 1 +
src/core/runtime/runtime.ts | 126 +
src/environments.ts | 9 +
src/errors/LettaError.ts | 45 +
src/errors/LettaTimeoutError.ts | 10 +
src/errors/index.ts | 2 +
src/index.ts | 4 +
src/version.ts | 1 +
tests/custom.test.ts | 13 +
tests/unit/auth/BasicAuth.test.ts | 22 +
tests/unit/auth/BearerToken.test.ts | 14 +
tests/unit/fetcher/Fetcher.test.ts | 73 +
tests/unit/fetcher/createRequestUrl.test.ts | 51 +
tests/unit/fetcher/getFetchFn.test.ts | 22 +
tests/unit/fetcher/getRequestBody.test.ts | 77 +
tests/unit/fetcher/getResponseBody.test.ts | 64 +
tests/unit/fetcher/makeRequest.test.ts | 54 +
tests/unit/fetcher/requestWithRetries.test.ts | 133 +
tests/unit/fetcher/signals.test.ts | 69 +
.../Node18UniversalStreamWrapper.test.ts | 178 +
.../NodePre18StreamWrapper.test.ts | 124 +
.../UndiciStreamWrapper.test.ts | 153 +
.../chooseStreamWrapper.test.ts | 43 +
.../fetcher/stream-wrappers/webpack.test.ts | 38 +
tests/unit/fetcher/test-file.txt | 1 +
.../form-data-utils/formDataWrapper.test.ts | 127 +
tsconfig.json | 17 +
yarn.lock | 3208 ++++++++++++++
267 files changed, 18083 insertions(+), 2 deletions(-)
create mode 100644 .fernignore
create mode 100644 .github/workflows/ci.yml
create mode 100644 .gitignore
create mode 100644 .npmignore
create mode 100644 .prettierrc.yml
create mode 100644 jest.config.js
create mode 100644 package.json
create mode 100644 reference.md
create mode 100644 src/Client.ts
create mode 100644 src/api/errors/ConflictError.ts
create mode 100644 src/api/errors/InternalServerError.ts
create mode 100644 src/api/errors/NotFoundError.ts
create mode 100644 src/api/errors/UnprocessableEntityError.ts
create mode 100644 src/api/errors/index.ts
create mode 100644 src/api/index.ts
create mode 100644 src/api/resources/agents/client/Client.ts
create mode 100644 src/api/resources/agents/client/index.ts
create mode 100644 src/api/resources/agents/client/requests/AgentsListArchivalMemoryRequest.ts
create mode 100644 src/api/resources/agents/client/requests/AgentsListMessagesRequest.ts
create mode 100644 src/api/resources/agents/client/requests/AgentsListRequest.ts
create mode 100644 src/api/resources/agents/client/requests/AgentsMigrateRequest.ts
create mode 100644 src/api/resources/agents/client/requests/AgentsVersionTemplateRequest.ts
create mode 100644 src/api/resources/agents/client/requests/BlockLabelUpdate.ts
create mode 100644 src/api/resources/agents/client/requests/BlockLimitUpdate.ts
create mode 100644 src/api/resources/agents/client/requests/CreateAgent.ts
create mode 100644 src/api/resources/agents/client/requests/CreateArchivalMemory.ts
create mode 100644 src/api/resources/agents/client/requests/LettaRequest.ts
create mode 100644 src/api/resources/agents/client/requests/LettaStreamingRequest.ts
create mode 100644 src/api/resources/agents/client/requests/UpdateAgentState.ts
create mode 100644 src/api/resources/agents/client/requests/UpdateMessage.ts
create mode 100644 src/api/resources/agents/client/requests/index.ts
create mode 100644 src/api/resources/agents/index.ts
create mode 100644 src/api/resources/agents/types/AgentsListMessagesResponse.ts
create mode 100644 src/api/resources/agents/types/AgentsListMessagesResponseItem.ts
create mode 100644 src/api/resources/agents/types/AgentsMigrateResponse.ts
create mode 100644 src/api/resources/agents/types/AgentsVersionTemplateResponse.ts
create mode 100644 src/api/resources/agents/types/LettaRequestMessages.ts
create mode 100644 src/api/resources/agents/types/LettaStreamingRequestMessages.ts
create mode 100644 src/api/resources/agents/types/index.ts
create mode 100644 src/api/resources/blocks/client/Client.ts
create mode 100644 src/api/resources/blocks/client/index.ts
create mode 100644 src/api/resources/blocks/client/requests/BlockUpdate.ts
create mode 100644 src/api/resources/blocks/client/requests/BlocksListMemoryRequest.ts
create mode 100644 src/api/resources/blocks/client/requests/index.ts
create mode 100644 src/api/resources/blocks/index.ts
create mode 100644 src/api/resources/health/client/Client.ts
create mode 100644 src/api/resources/health/client/index.ts
create mode 100644 src/api/resources/health/index.ts
create mode 100644 src/api/resources/index.ts
create mode 100644 src/api/resources/jobs/client/Client.ts
create mode 100644 src/api/resources/jobs/client/index.ts
create mode 100644 src/api/resources/jobs/client/requests/JobsListRequest.ts
create mode 100644 src/api/resources/jobs/client/requests/index.ts
create mode 100644 src/api/resources/jobs/index.ts
create mode 100644 src/api/resources/models/client/Client.ts
create mode 100644 src/api/resources/models/client/index.ts
create mode 100644 src/api/resources/models/index.ts
create mode 100644 src/api/resources/sources/client/Client.ts
create mode 100644 src/api/resources/sources/client/index.ts
create mode 100644 src/api/resources/sources/client/requests/BodyUploadFileToSource.ts
create mode 100644 src/api/resources/sources/client/requests/SourceCreate.ts
create mode 100644 src/api/resources/sources/client/requests/SourceUpdate.ts
create mode 100644 src/api/resources/sources/client/requests/SourcesAttachRequest.ts
create mode 100644 src/api/resources/sources/client/requests/SourcesDetachRequest.ts
create mode 100644 src/api/resources/sources/client/requests/SourcesListFilesRequest.ts
create mode 100644 src/api/resources/sources/client/requests/index.ts
create mode 100644 src/api/resources/sources/index.ts
create mode 100644 src/api/resources/tools/client/Client.ts
create mode 100644 src/api/resources/tools/client/index.ts
create mode 100644 src/api/resources/tools/client/requests/ToolUpdate.ts
create mode 100644 src/api/resources/tools/client/requests/ToolsListRequest.ts
create mode 100644 src/api/resources/tools/client/requests/index.ts
create mode 100644 src/api/resources/tools/index.ts
create mode 100644 src/api/types/AgentState.ts
create mode 100644 src/api/types/AgentType.ts
create mode 100644 src/api/types/ApiKey.ts
create mode 100644 src/api/types/ApiKeyCreate.ts
create mode 100644 src/api/types/ArchivalMemorySummary.ts
create mode 100644 src/api/types/AssistantFile.ts
create mode 100644 src/api/types/AssistantMessageInput.ts
create mode 100644 src/api/types/AssistantMessageOutput.ts
create mode 100644 src/api/types/AuthRequest.ts
create mode 100644 src/api/types/AuthResponse.ts
create mode 100644 src/api/types/BaseToolRule.ts
create mode 100644 src/api/types/Block.ts
create mode 100644 src/api/types/BlockCreate.ts
create mode 100644 src/api/types/ChatCompletionRequest.ts
create mode 100644 src/api/types/ChatCompletionRequestFunctionCall.ts
create mode 100644 src/api/types/ChatCompletionRequestMessagesItem.ts
create mode 100644 src/api/types/ChatCompletionRequestStop.ts
create mode 100644 src/api/types/ChatCompletionRequestToolChoice.ts
create mode 100644 src/api/types/ChatCompletionResponse.ts
create mode 100644 src/api/types/Choice.ts
create mode 100644 src/api/types/ConflictErrorBody.ts
create mode 100644 src/api/types/ContextWindowOverview.ts
create mode 100644 src/api/types/CreateAssistantFileRequest.ts
create mode 100644 src/api/types/CreateAssistantRequest.ts
create mode 100644 src/api/types/CreateMessageRequest.ts
create mode 100644 src/api/types/CreateRunRequest.ts
create mode 100644 src/api/types/CreateThreadRequest.ts
create mode 100644 src/api/types/CreateThreadRunRequest.ts
create mode 100644 src/api/types/DeleteAssistantFileResponse.ts
create mode 100644 src/api/types/DeleteAssistantResponse.ts
create mode 100644 src/api/types/DeleteThreadResponse.ts
create mode 100644 src/api/types/E2BSandboxConfig.ts
create mode 100644 src/api/types/EmbeddingConfig.ts
create mode 100644 src/api/types/FileMetadata.ts
create mode 100644 src/api/types/Function.ts
create mode 100644 src/api/types/FunctionCallDelta.ts
create mode 100644 src/api/types/FunctionCallInput.ts
create mode 100644 src/api/types/FunctionCallMessage.ts
create mode 100644 src/api/types/FunctionCallMessageFunctionCall.ts
create mode 100644 src/api/types/FunctionReturn.ts
create mode 100644 src/api/types/FunctionReturnStatus.ts
create mode 100644 src/api/types/FunctionSchema.ts
create mode 100644 src/api/types/Health.ts
create mode 100644 src/api/types/HttpValidationError.ts
create mode 100644 src/api/types/ImageFile.ts
create mode 100644 src/api/types/InternalMonologue.ts
create mode 100644 src/api/types/InternalServerErrorBody.ts
create mode 100644 src/api/types/Job.ts
create mode 100644 src/api/types/JobStatus.ts
create mode 100644 src/api/types/LettaResponse.ts
create mode 100644 src/api/types/LettaResponseAssistantMessage.ts
create mode 100644 src/api/types/LettaResponseFunctionCall.ts
create mode 100644 src/api/types/LettaResponseFunctionCallDelta.ts
create mode 100644 src/api/types/LettaResponseFunctionCallMessage.ts
create mode 100644 src/api/types/LettaResponseFunctionCallMessageFunctionCall.ts
create mode 100644 src/api/types/LettaResponseFunctionCallMessageFunctionCallOne.ts
create mode 100644 src/api/types/LettaResponseFunctionCallMessageFunctionCallZero.ts
create mode 100644 src/api/types/LettaResponseFunctionReturn.ts
create mode 100644 src/api/types/LettaResponseFunctionReturnStatus.ts
create mode 100644 src/api/types/LettaResponseInternalMonologue.ts
create mode 100644 src/api/types/LettaResponseLettaUsageStatistics.ts
create mode 100644 src/api/types/LettaResponseSystemMessage.ts
create mode 100644 src/api/types/LettaResponseUserMessage.ts
create mode 100644 src/api/types/LettaSchemasLettaMessageFunctionCall.ts
create mode 100644 src/api/types/LettaSchemasMessageMessageOutput.ts
create mode 100644 src/api/types/LettaSchemasOpenaiChatCompletionRequestTool.ts
create mode 100644 src/api/types/LettaSchemasOpenaiChatCompletionRequestToolCall.ts
create mode 100644 src/api/types/LettaSchemasOpenaiChatCompletionRequestToolCallFunction.ts
create mode 100644 src/api/types/LettaSchemasOpenaiChatCompletionResponseFunctionCall.ts
create mode 100644 src/api/types/LettaSchemasOpenaiChatCompletionResponseMessage.ts
create mode 100644 src/api/types/LettaSchemasOpenaiChatCompletionResponseToolCall.ts
create mode 100644 src/api/types/LettaSchemasOpenaiChatCompletionsToolCallFunction.ts
create mode 100644 src/api/types/LettaSchemasOpenaiChatCompletionsToolCallInput.ts
create mode 100644 src/api/types/LettaSchemasOpenaiChatCompletionsToolCallOutput.ts
create mode 100644 src/api/types/LettaSchemasOpenaiOpenaiToolCall.ts
create mode 100644 src/api/types/LettaSchemasToolTool.ts
create mode 100644 src/api/types/LettaUsageStatistics.ts
create mode 100644 src/api/types/ListMessagesResponse.ts
create mode 100644 src/api/types/LlmConfig.ts
create mode 100644 src/api/types/LlmConfigModelEndpointType.ts
create mode 100644 src/api/types/LocalSandboxConfig.ts
create mode 100644 src/api/types/LogProbToken.ts
create mode 100644 src/api/types/Memory.ts
create mode 100644 src/api/types/MessageContentLogProb.ts
create mode 100644 src/api/types/MessageCreate.ts
create mode 100644 src/api/types/MessageCreateRole.ts
create mode 100644 src/api/types/MessageFile.ts
create mode 100644 src/api/types/MessageInput.ts
create mode 100644 src/api/types/MessageRole.ts
create mode 100644 src/api/types/ModifyMessageRequest.ts
create mode 100644 src/api/types/ModifyRunRequest.ts
create mode 100644 src/api/types/ModifyThreadRequest.ts
create mode 100644 src/api/types/NotFoundErrorBody.ts
create mode 100644 src/api/types/NotFoundErrorBodyMessage.ts
create mode 100644 src/api/types/OpenAiAssistant.ts
create mode 100644 src/api/types/OpenAiError.ts
create mode 100644 src/api/types/OpenAiMessage.ts
create mode 100644 src/api/types/OpenAiMessageContentItem.ts
create mode 100644 src/api/types/OpenAiMessageCreationStep.ts
create mode 100644 src/api/types/OpenAiRun.ts
create mode 100644 src/api/types/OpenAiRunStep.ts
create mode 100644 src/api/types/OpenAiRunStepStepDefaults.ts
create mode 100644 src/api/types/OpenAiThread.ts
create mode 100644 src/api/types/OpenAiToolCallsStep.ts
create mode 100644 src/api/types/OpenAiUsage.ts
create mode 100644 src/api/types/Organization.ts
create mode 100644 src/api/types/OrganizationCreate.ts
create mode 100644 src/api/types/Passage.ts
create mode 100644 src/api/types/RecallMemorySummary.ts
create mode 100644 src/api/types/RequiredAction.ts
create mode 100644 src/api/types/ResponseFormat.ts
create mode 100644 src/api/types/SandboxConfig.ts
create mode 100644 src/api/types/SandboxConfigCreate.ts
create mode 100644 src/api/types/SandboxConfigCreateConfig.ts
create mode 100644 src/api/types/SandboxConfigUpdate.ts
create mode 100644 src/api/types/SandboxConfigUpdateConfig.ts
create mode 100644 src/api/types/SandboxEnvironmentVariable.ts
create mode 100644 src/api/types/SandboxEnvironmentVariableCreate.ts
create mode 100644 src/api/types/SandboxEnvironmentVariableUpdate.ts
create mode 100644 src/api/types/SandboxType.ts
create mode 100644 src/api/types/Source.ts
create mode 100644 src/api/types/SubmitToolOutputsToRunRequest.ts
create mode 100644 src/api/types/SystemMessageInput.ts
create mode 100644 src/api/types/SystemMessageOutput.ts
create mode 100644 src/api/types/Text.ts
create mode 100644 src/api/types/ToolCallFunctionOutput.ts
create mode 100644 src/api/types/ToolCallOutput.ts
create mode 100644 src/api/types/ToolCreate.ts
create mode 100644 src/api/types/ToolFunctionChoice.ts
create mode 100644 src/api/types/ToolInput.ts
create mode 100644 src/api/types/ToolMessage.ts
create mode 100644 src/api/types/UsageStatistics.ts
create mode 100644 src/api/types/User.ts
create mode 100644 src/api/types/UserCreate.ts
create mode 100644 src/api/types/UserMessageInput.ts
create mode 100644 src/api/types/UserMessageInputContent.ts
create mode 100644 src/api/types/UserMessageOutput.ts
create mode 100644 src/api/types/UserUpdate.ts
create mode 100644 src/api/types/ValidationError.ts
create mode 100644 src/api/types/ValidationErrorLocItem.ts
create mode 100644 src/api/types/index.ts
create mode 100644 src/core/api-promise/APIPromise.ts
create mode 100644 src/core/api-promise/index.ts
create mode 100644 src/core/auth/BasicAuth.ts
create mode 100644 src/core/auth/BearerToken.ts
create mode 100644 src/core/auth/index.ts
create mode 100644 src/core/fetcher/APIResponse.ts
create mode 100644 src/core/fetcher/Fetcher.ts
create mode 100644 src/core/fetcher/Supplier.ts
create mode 100644 src/core/fetcher/createRequestUrl.ts
create mode 100644 src/core/fetcher/getFetchFn.ts
create mode 100644 src/core/fetcher/getHeader.ts
create mode 100644 src/core/fetcher/getRequestBody.ts
create mode 100644 src/core/fetcher/getResponseBody.ts
create mode 100644 src/core/fetcher/index.ts
create mode 100644 src/core/fetcher/makeRequest.ts
create mode 100644 src/core/fetcher/requestWithRetries.ts
create mode 100644 src/core/fetcher/signals.ts
create mode 100644 src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.ts
create mode 100644 src/core/fetcher/stream-wrappers/NodePre18StreamWrapper.ts
create mode 100644 src/core/fetcher/stream-wrappers/UndiciStreamWrapper.ts
create mode 100644 src/core/fetcher/stream-wrappers/chooseStreamWrapper.ts
create mode 100644 src/core/form-data-utils/FormDataWrapper.ts
create mode 100644 src/core/form-data-utils/index.ts
create mode 100644 src/core/index.ts
create mode 100644 src/core/runtime/index.ts
create mode 100644 src/core/runtime/runtime.ts
create mode 100644 src/environments.ts
create mode 100644 src/errors/LettaError.ts
create mode 100644 src/errors/LettaTimeoutError.ts
create mode 100644 src/errors/index.ts
create mode 100644 src/index.ts
create mode 100644 src/version.ts
create mode 100644 tests/custom.test.ts
create mode 100644 tests/unit/auth/BasicAuth.test.ts
create mode 100644 tests/unit/auth/BearerToken.test.ts
create mode 100644 tests/unit/fetcher/Fetcher.test.ts
create mode 100644 tests/unit/fetcher/createRequestUrl.test.ts
create mode 100644 tests/unit/fetcher/getFetchFn.test.ts
create mode 100644 tests/unit/fetcher/getRequestBody.test.ts
create mode 100644 tests/unit/fetcher/getResponseBody.test.ts
create mode 100644 tests/unit/fetcher/makeRequest.test.ts
create mode 100644 tests/unit/fetcher/requestWithRetries.test.ts
create mode 100644 tests/unit/fetcher/signals.test.ts
create mode 100644 tests/unit/fetcher/stream-wrappers/Node18UniversalStreamWrapper.test.ts
create mode 100644 tests/unit/fetcher/stream-wrappers/NodePre18StreamWrapper.test.ts
create mode 100644 tests/unit/fetcher/stream-wrappers/UndiciStreamWrapper.test.ts
create mode 100644 tests/unit/fetcher/stream-wrappers/chooseStreamWrapper.test.ts
create mode 100644 tests/unit/fetcher/stream-wrappers/webpack.test.ts
create mode 100644 tests/unit/fetcher/test-file.txt
create mode 100644 tests/unit/form-data-utils/formDataWrapper.test.ts
create mode 100644 tsconfig.json
create mode 100644 yarn.lock
diff --git a/.fernignore b/.fernignore
new file mode 100644
index 0000000..084a8eb
--- /dev/null
+++ b/.fernignore
@@ -0,0 +1 @@
+# Specify files that shouldn't be modified by Fern
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..cf13c1c
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,30 @@
+name: ci
+
+on: [push]
+
+jobs:
+ compile:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout repo
+ uses: actions/checkout@v3
+
+ - name: Set up node
+ uses: actions/setup-node@v3
+
+ - name: Compile
+ run: yarn && yarn build
+
+ test:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout repo
+ uses: actions/checkout@v3
+
+ - name: Set up node
+ uses: actions/setup-node@v3
+
+ - name: Compile
+ run: yarn && yarn test
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..72271e0
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+node_modules
+.DS_Store
+/dist
\ No newline at end of file
diff --git a/.npmignore b/.npmignore
new file mode 100644
index 0000000..6db0876
--- /dev/null
+++ b/.npmignore
@@ -0,0 +1,9 @@
+node_modules
+src
+tests
+.gitignore
+.github
+.fernignore
+.prettierrc.yml
+tsconfig.json
+yarn.lock
\ No newline at end of file
diff --git a/.prettierrc.yml b/.prettierrc.yml
new file mode 100644
index 0000000..0c06786
--- /dev/null
+++ b/.prettierrc.yml
@@ -0,0 +1,2 @@
+tabWidth: 4
+printWidth: 120
diff --git a/README.md b/README.md
index c8f86a9..1123421 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,165 @@
-# letta-typescript-sdk
-A TypeScript SDK for accessing the Letta API
+# Letta TypeScript Library
+
+[](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Ffern-demo%2Fletta-typescript-sdk)
+[](https://www.npmjs.com/package/letta)
+
+The Letta TypeScript library provides convenient access to the Letta API from TypeScript.
+
+## Installation
+
+```sh
+npm i -s letta
+```
+
+## Reference
+
+A full reference for this library is available [here](./reference.md).
+
+## Usage
+
+Instantiate and use the client with the following:
+
+```typescript
+import { LettaClient } from "letta";
+
+const client = new LettaClient({ token: "YOUR_TOKEN" });
+await client.tools.create({
+ source_code: "source_code",
+});
+```
+
+## Request And Response Types
+
+The SDK exports all request and response types as TypeScript interfaces. Simply import them with the
+following namespace:
+
+```typescript
+import { Letta } from "letta";
+
+const request: Letta.ToolUpdate = {
+ ...
+};
+```
+
+## Exception Handling
+
+When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error
+will be thrown.
+
+```typescript
+import { LettaError } from "letta";
+
+try {
+ await client.tools.create(...);
+} catch (err) {
+ if (err instanceof LettaError) {
+ console.log(err.statusCode);
+ console.log(err.message);
+ console.log(err.body);
+ }
+}
+```
+
+## Advanced
+
+### Raw Responses
+
+The SDK provides access to raw response data, including headers, through the `.asRaw()` method. When using `.asRaw()`,
+the parsed response body will be available in the `body` field, along with the response headers:
+
+```typescript
+const response = await client.tools.create(...).asRaw();
+
+console.log(response.headers['X-My-Header']);
+console.log(response.body);
+```
+
+### Additional Headers
+
+If you would like to send additional headers as part of the request, use the `headers` request option.
+
+```typescript
+const response = await client.tools.create(..., {
+ headers: {
+ 'X-Custom-Header': 'custom value'
+ }
+});
+```
+
+### Retries
+
+The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long
+as the request is deemed retriable and the number of retry attempts has not grown larger than the configured
+retry limit (default: 2).
+
+A request is deemed retriable when any of the following HTTP status codes is returned:
+
+- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)
+- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)
+- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors)
+
+Use the `maxRetries` request option to configure this behavior.
+
+```typescript
+const response = await client.tools.create(..., {
+ maxRetries: 0 // override maxRetries at the request level
+});
+```
+
+### Timeouts
+
+The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior.
+
+```typescript
+const response = await client.tools.create(..., {
+ timeoutInSeconds: 30 // override timeout to 30s
+});
+```
+
+### Aborting Requests
+
+The SDK allows users to abort requests at any point by passing in an abort signal.
+
+```typescript
+const controller = new AbortController();
+const response = await client.tools.create(..., {
+ abortSignal: controller.signal
+});
+controller.abort(); // aborts the request
+```
+
+### Runtime Compatibility
+
+The SDK defaults to `node-fetch` but will use the global fetch client if present. The SDK works in the following
+runtimes:
+
+- Node.js 18+
+- Vercel
+- Cloudflare Workers
+- Deno v1.25+
+- Bun 1.0+
+- React Native
+
+### Customizing Fetch Client
+
+The SDK provides a way for your to customize the underlying HTTP client / Fetch function. If you're running in an
+unsupported environment, this provides a way for you to break glass and ensure the SDK works.
+
+```typescript
+import { LettaClient } from "letta";
+
+const client = new LettaClient({
+ ...
+ fetcher: // provide your implementation here
+});
+```
+
+## Contributing
+
+While we value open-source contributions to this SDK, this library is generated programmatically.
+Additions made directly to this library would have to be moved over to our generation code,
+otherwise they would be overwritten upon the next generated release. Feel free to open a PR as
+a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
+an issue first to discuss with us!
+
+On the other hand, contributions to the README are always very welcome!
diff --git a/jest.config.js b/jest.config.js
new file mode 100644
index 0000000..35d6e65
--- /dev/null
+++ b/jest.config.js
@@ -0,0 +1,5 @@
+/** @type {import('jest').Config} */
+module.exports = {
+ preset: "ts-jest",
+ testEnvironment: "node",
+};
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..1fead34
--- /dev/null
+++ b/package.json
@@ -0,0 +1,44 @@
+{
+ "name": "letta",
+ "version": "0.5.3",
+ "private": false,
+ "repository": "https://github.com/fern-demo/letta-typescript-sdk",
+ "main": "./index.js",
+ "types": "./index.d.ts",
+ "scripts": {
+ "format": "prettier . --write --ignore-unknown",
+ "build": "tsc",
+ "prepack": "cp -rv dist/. .",
+ "test": "jest"
+ },
+ "dependencies": {
+ "url-join": "4.0.1",
+ "form-data": "^4.0.0",
+ "formdata-node": "^6.0.3",
+ "node-fetch": "2.7.0",
+ "qs": "6.11.2",
+ "readable-stream": "^4.5.2",
+ "js-base64": "3.7.2",
+ "form-data-encoder": "^4.0.2"
+ },
+ "devDependencies": {
+ "@types/url-join": "4.0.1",
+ "@types/qs": "6.9.8",
+ "@types/node-fetch": "2.6.9",
+ "@types/readable-stream": "^4.0.15",
+ "webpack": "^5.94.0",
+ "ts-loader": "^9.3.1",
+ "jest": "29.7.0",
+ "@types/jest": "29.5.5",
+ "ts-jest": "29.1.1",
+ "jest-environment-jsdom": "29.7.0",
+ "@types/node": "17.0.33",
+ "prettier": "2.7.1",
+ "typescript": "4.6.4"
+ },
+ "browser": {
+ "fs": false,
+ "os": false,
+ "path": false
+ }
+}
diff --git a/reference.md b/reference.md
new file mode 100644
index 0000000..f499ec2
--- /dev/null
+++ b/reference.md
@@ -0,0 +1,3827 @@
+# Reference
+
+## Tools
+
+client.tools.get(toolId) -> Letta.LettaSchemasToolTool
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Get a tool by ID
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.tools.get("tool_id");
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**toolId:** `string`
+
+
+
+
+
+-
+
+**requestOptions:** `Tools.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.tools.delete(toolId) -> unknown
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Delete a tool by name
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.tools.delete("tool_id");
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**toolId:** `string`
+
+
+
+
+
+-
+
+**requestOptions:** `Tools.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.tools.update(toolId, { ...params }) -> Letta.LettaSchemasToolTool
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Update an existing tool
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.tools.update("tool_id");
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**toolId:** `string`
+
+
+
+
+
+-
+
+**request:** `Letta.ToolUpdate`
+
+
+
+
+
+-
+
+**requestOptions:** `Tools.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.tools.getIdByName(toolName) -> string
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Get a tool ID by name
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.tools.getIdByName("tool_name");
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**toolName:** `string`
+
+
+
+
+
+-
+
+**requestOptions:** `Tools.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.tools.list({ ...params }) -> Letta.LettaSchemasToolTool[]
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Get a list of all tools available to agents belonging to the org of the user
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.tools.list();
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**request:** `Letta.ToolsListRequest`
+
+
+
+
+
+-
+
+**requestOptions:** `Tools.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.tools.create({ ...params }) -> Letta.LettaSchemasToolTool
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Create a new tool
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.tools.create({
+ source_code: "source_code",
+});
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**request:** `Letta.ToolCreate`
+
+
+
+
+
+-
+
+**requestOptions:** `Tools.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.tools.upsert({ ...params }) -> Letta.LettaSchemasToolTool
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Create or update a tool
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.tools.upsert({
+ source_code: "source_code",
+});
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**request:** `Letta.ToolCreate`
+
+
+
+
+
+-
+
+**requestOptions:** `Tools.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.tools.addBases() -> Letta.LettaSchemasToolTool[]
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Add base tools
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.tools.addBases();
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**requestOptions:** `Tools.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+## Sources
+
+client.sources.get(sourceId) -> Letta.Source
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Get all sources
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.sources.get("source_id");
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**sourceId:** `string`
+
+
+
+
+
+-
+
+**requestOptions:** `Sources.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.sources.delete(sourceId) -> unknown
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Delete a data source.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.sources.delete("source_id");
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**sourceId:** `string`
+
+
+
+
+
+-
+
+**requestOptions:** `Sources.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.sources.update(sourceId, { ...params }) -> Letta.Source
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Update the name or documentation of an existing data source.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.sources.update("source_id");
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**sourceId:** `string`
+
+
+
+
+
+-
+
+**request:** `Letta.SourceUpdate`
+
+
+
+
+
+-
+
+**requestOptions:** `Sources.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.sources.getIdByName(sourceName) -> string
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Get a source by name
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.sources.getIdByName("source_name");
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**sourceName:** `string`
+
+
+
+
+
+-
+
+**requestOptions:** `Sources.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.sources.list() -> Letta.Source[]
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+List all data sources created by a user.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.sources.list();
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**requestOptions:** `Sources.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.sources.create({ ...params }) -> Letta.Source
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Create a new data source.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.sources.create({
+ name: "name",
+});
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**request:** `Letta.SourceCreate`
+
+
+
+
+
+-
+
+**requestOptions:** `Sources.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.sources.attach(sourceId, { ...params }) -> Letta.Source
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Attach a data source to an existing agent.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.sources.attach("source_id", {
+ agent_id: "agent_id",
+});
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**sourceId:** `string`
+
+
+
+
+
+-
+
+**request:** `Letta.SourcesAttachRequest`
+
+
+
+
+
+-
+
+**requestOptions:** `Sources.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.sources.detach(sourceId, { ...params }) -> Letta.Source
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Detach a data source from an existing agent.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.sources.detach("source_id", {
+ agent_id: "agent_id",
+});
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**sourceId:** `string`
+
+
+
+
+
+-
+
+**request:** `Letta.SourcesDetachRequest`
+
+
+
+
+
+-
+
+**requestOptions:** `Sources.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.sources.uploadFile(file, sourceId) -> Letta.Job
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Upload a file to a data source.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.sources.uploadFile(fs.createReadStream("/path/to/your/file"), "source_id");
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**file:** `File | fs.ReadStream | Blob`
+
+
+
+
+
+-
+
+**sourceId:** `string`
+
+
+
+
+
+-
+
+**requestOptions:** `Sources.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.sources.listPassages(sourceId) -> Letta.Passage[]
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+List all passages associated with a data source.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.sources.listPassages("source_id");
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**sourceId:** `string`
+
+
+
+
+
+-
+
+**requestOptions:** `Sources.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.sources.listFiles(sourceId, { ...params }) -> Letta.FileMetadata[]
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+List paginated files associated with a data source.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.sources.listFiles("source_id");
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**sourceId:** `string`
+
+
+
+
+
+-
+
+**request:** `Letta.SourcesListFilesRequest`
+
+
+
+
+
+-
+
+**requestOptions:** `Sources.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.sources.deleteFile(sourceId, fileId) -> void
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Delete a data source.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.sources.deleteFile("source_id", "file_id");
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**sourceId:** `string`
+
+
+
+
+
+-
+
+**fileId:** `string`
+
+
+
+
+
+-
+
+**requestOptions:** `Sources.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+## Agents
+
+client.agents.list({ ...params }) -> Letta.AgentState[]
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+List all agents associated with a given user.
+This endpoint retrieves a list of all agents and their configurations associated with the specified user ID.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.agents.list();
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**request:** `Letta.AgentsListRequest`
+
+
+
+
+
+-
+
+**requestOptions:** `Agents.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.agents.create({ ...params }) -> Letta.AgentState
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Create a new agent with the specified configuration.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.agents.create();
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**request:** `Letta.CreateAgent`
+
+
+
+
+
+-
+
+**requestOptions:** `Agents.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.agents.getContextWindow(agentId) -> Letta.ContextWindowOverview
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Retrieve the context window of a specific agent.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.agents.getContextWindow("agent_id");
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**agentId:** `string`
+
+
+
+
+
+-
+
+**requestOptions:** `Agents.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.agents.get(agentId) -> Letta.Source[]
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Get the sources associated with an agent.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.agents.get("agent_id");
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**agentId:** `string`
+
+
+
+
+
+-
+
+**requestOptions:** `Agents.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.agents.delete(agentId) -> unknown
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Delete an agent.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.agents.delete("agent_id");
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**agentId:** `string`
+
+
+
+
+
+-
+
+**requestOptions:** `Agents.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.agents.update(agentId, { ...params }) -> Letta.AgentState
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Update an exsiting agent
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.agents.update("agent_id", {
+ id: "id",
+});
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**agentId:** `string`
+
+
+
+
+
+-
+
+**request:** `Letta.UpdateAgentState`
+
+
+
+
+
+-
+
+**requestOptions:** `Agents.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.agents.listTools(agentId) -> Letta.LettaSchemasToolTool[]
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Get tools from an existing agent
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.agents.listTools("agent_id");
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**agentId:** `string`
+
+
+
+
+
+-
+
+**requestOptions:** `Agents.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.agents.addToTool(agentId, toolId) -> Letta.AgentState
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Add tools to an existing agent
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.agents.addToTool("agent_id", "tool_id");
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**agentId:** `string`
+
+
+
+
+
+-
+
+**toolId:** `string`
+
+
+
+
+
+-
+
+**requestOptions:** `Agents.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.agents.removeFromTool(agentId, toolId) -> Letta.AgentState
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Add tools to an existing agent
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.agents.removeFromTool("agent_id", "tool_id");
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**agentId:** `string`
+
+
+
+
+
+-
+
+**toolId:** `string`
+
+
+
+
+
+-
+
+**requestOptions:** `Agents.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.agents.listInContextMessages(agentId) -> Letta.LettaSchemasMessageMessageOutput[]
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Retrieve the messages in the context of a specific agent.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.agents.listInContextMessages("agent_id");
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**agentId:** `string`
+
+
+
+
+
+-
+
+**requestOptions:** `Agents.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.agents.getMemory(agentId) -> Letta.Memory
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Retrieve the memory state of a specific agent.
+This endpoint fetches the current memory state of the agent identified by the user ID and agent ID.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.agents.getMemory("agent_id");
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**agentId:** `string`
+
+
+
+
+
+-
+
+**requestOptions:** `Agents.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.agents.updateMemory(agentId, { ...params }) -> Letta.Memory
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Update the core memory of a specific agent.
+This endpoint accepts new memory contents (labels as keys, and values as values) and updates the core memory of the agent identified by the user ID and agent ID.
+This endpoint accepts new memory contents to update the core memory of the agent.
+This endpoint only supports modifying existing blocks; it does not support deleting/unlinking or creating/linking blocks.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.agents.updateMemory("agent_id", {
+ key: "value",
+});
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**agentId:** `string`
+
+
+
+
+
+-
+
+**request:** `Record`
+
+
+
+
+
+-
+
+**requestOptions:** `Agents.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.agents.updateMemoryLabel(agentId, { ...params }) -> Letta.Memory
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Update the label of a block in an agent's memory.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.agents.updateMemoryLabel("agent_id", {
+ current_label: "current_label",
+ new_label: "new_label",
+});
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**agentId:** `string`
+
+
+
+
+
+-
+
+**request:** `Letta.BlockLabelUpdate`
+
+
+
+
+
+-
+
+**requestOptions:** `Agents.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.agents.addMemory(agentId, { ...params }) -> Letta.Memory
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Creates a memory block and links it to the agent.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.agents.addMemory("agent_id", {
+ value: "value",
+ label: "label",
+});
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**agentId:** `string`
+
+
+
+
+
+-
+
+**request:** `Letta.BlockCreate`
+
+
+
+
+
+-
+
+**requestOptions:** `Agents.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.agents.removeMemory(agentId, blockLabel) -> Letta.Memory
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Removes a memory block from an agent by unlnking it. If the block is not linked to any other agent, it is deleted.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.agents.removeMemory("agent_id", "block_label");
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**agentId:** `string`
+
+
+
+
+
+-
+
+**blockLabel:** `string`
+
+
+
+
+
+-
+
+**requestOptions:** `Agents.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.agents.updateMemoryLimit(agentId, { ...params }) -> Letta.Memory
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Update the limit of a block in an agent's memory.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.agents.updateMemoryLimit("agent_id", {
+ label: "label",
+ limit: 1,
+});
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**agentId:** `string`
+
+
+
+
+
+-
+
+**request:** `Letta.BlockLimitUpdate`
+
+
+
+
+
+-
+
+**requestOptions:** `Agents.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.agents.getRecallMemorySummary(agentId) -> Letta.RecallMemorySummary
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Retrieve the summary of the recall memory of a specific agent.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.agents.getRecallMemorySummary("agent_id");
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**agentId:** `string`
+
+
+
+
+
+-
+
+**requestOptions:** `Agents.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.agents.getArchivalMemorySummary(agentId) -> Letta.ArchivalMemorySummary
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Retrieve the summary of the archival memory of a specific agent.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.agents.getArchivalMemorySummary("agent_id");
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**agentId:** `string`
+
+
+
+
+
+-
+
+**requestOptions:** `Agents.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.agents.listArchivalMemory(agentId, { ...params }) -> Letta.Passage[]
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Retrieve the memories in an agent's archival memory store (paginated query).
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.agents.listArchivalMemory("agent_id");
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**agentId:** `string`
+
+
+
+
+
+-
+
+**request:** `Letta.AgentsListArchivalMemoryRequest`
+
+
+
+
+
+-
+
+**requestOptions:** `Agents.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.agents.createArchivalMemory(agentId, { ...params }) -> Letta.Passage[]
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Insert a memory into an agent's archival memory store.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.agents.createArchivalMemory("agent_id", {
+ text: "text",
+});
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**agentId:** `string`
+
+
+
+
+
+-
+
+**request:** `Letta.CreateArchivalMemory`
+
+
+
+
+
+-
+
+**requestOptions:** `Agents.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.agents.deleteArchivalMemory(agentId, memoryId) -> unknown
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Delete a memory from an agent's archival memory store.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.agents.deleteArchivalMemory("agent_id", "memory_id");
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**agentId:** `string`
+
+
+
+
+
+-
+
+**memoryId:** `string`
+
+
+
+
+
+-
+
+**requestOptions:** `Agents.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.agents.listMessages(agentId, { ...params }) -> Letta.AgentsListMessagesResponse
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Retrieve message history for an agent.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.agents.listMessages("agent_id");
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**agentId:** `string`
+
+
+
+
+
+-
+
+**request:** `Letta.AgentsListMessagesRequest`
+
+
+
+
+
+-
+
+**requestOptions:** `Agents.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.agents.createMessage(agentId, { ...params }) -> Letta.LettaResponse
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Process a user message and return the agent's response.
+This endpoint accepts a message from a user and processes it through the agent.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.agents.createMessage("agent_id", {
+ messages: [
+ {
+ role: "user",
+ text: "text",
+ },
+ ],
+});
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**agentId:** `string`
+
+
+
+
+
+-
+
+**request:** `Letta.LettaRequest`
+
+
+
+
+
+-
+
+**requestOptions:** `Agents.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.agents.updateMessage(agentId, messageId, { ...params }) -> Letta.LettaSchemasMessageMessageOutput
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Update the details of a message associated with an agent.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.agents.updateMessage("agent_id", "message_id", {
+ id: "id",
+});
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**agentId:** `string`
+
+
+
+
+
+-
+
+**messageId:** `string`
+
+
+
+
+
+-
+
+**request:** `Letta.UpdateMessage`
+
+
+
+
+
+-
+
+**requestOptions:** `Agents.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.agents.createMessageStream(agentId, { ...params }) -> void
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Process a user message and return the agent's response.
+This endpoint accepts a message from a user and processes it through the agent.
+It will stream the steps of the response always, and stream the tokens if 'stream_tokens' is set to True.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.agents.createMessageStream("agent_id", {
+ messages: [
+ {
+ role: "user",
+ text: "text",
+ },
+ ],
+});
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**agentId:** `string`
+
+
+
+
+
+-
+
+**request:** `Letta.LettaStreamingRequest`
+
+
+
+
+
+-
+
+**requestOptions:** `Agents.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.agents.versionTemplate(agentId, { ...params }) -> Letta.AgentsVersionTemplateResponse
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Creates a versioned version of an agent
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.agents.versionTemplate("agent_id");
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**agentId:** `string` — The agent ID of the agent to migrate, if this agent is not a template, it will create a agent template from the agent provided as well
+
+
+
+
+
+-
+
+**request:** `Letta.AgentsVersionTemplateRequest`
+
+
+
+
+
+-
+
+**requestOptions:** `Agents.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.agents.migrate(agentId, { ...params }) -> Letta.AgentsMigrateResponse
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Migrate an agent to a new versioned agent template
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.agents.migrate("agent_id", {
+ to_template: "to_template",
+ preserve_core_memories: true,
+});
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**agentId:** `string`
+
+
+
+
+
+-
+
+**request:** `Letta.AgentsMigrateRequest`
+
+
+
+
+
+-
+
+**requestOptions:** `Agents.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+## Models
+
+client.models.list() -> Letta.LlmConfig[]
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.models.list();
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**requestOptions:** `Models.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.models.listEmbeddingModels() -> Letta.EmbeddingConfig[]
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.models.listEmbeddingModels();
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**requestOptions:** `Models.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+## Blocks
+
+client.blocks.listMemory({ ...params }) -> Letta.Block[]
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.blocks.listMemory();
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**request:** `Letta.BlocksListMemoryRequest`
+
+
+
+
+
+-
+
+**requestOptions:** `Blocks.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.blocks.createMemory({ ...params }) -> Letta.Block
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.blocks.createMemory({
+ value: "value",
+ label: "label",
+});
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**request:** `Letta.BlockCreate`
+
+
+
+
+
+-
+
+**requestOptions:** `Blocks.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.blocks.getMemory(blockId) -> Letta.Block
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.blocks.getMemory("block_id");
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**blockId:** `string`
+
+
+
+
+
+-
+
+**requestOptions:** `Blocks.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.blocks.deleteMemory(blockId) -> Letta.Block
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.blocks.deleteMemory("block_id");
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**blockId:** `string`
+
+
+
+
+
+-
+
+**requestOptions:** `Blocks.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.blocks.updateMemory(blockId, { ...params }) -> Letta.Block
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.blocks.updateMemory("block_id");
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**blockId:** `string`
+
+
+
+
+
+-
+
+**request:** `Letta.BlockUpdate`
+
+
+
+
+
+-
+
+**requestOptions:** `Blocks.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+## Jobs
+
+client.jobs.list({ ...params }) -> Letta.Job[]
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+List all jobs.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.jobs.list();
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**request:** `Letta.JobsListRequest`
+
+
+
+
+
+-
+
+**requestOptions:** `Jobs.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.jobs.listActive() -> Letta.Job[]
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+List all active jobs.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.jobs.listActive();
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**requestOptions:** `Jobs.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.jobs.get(jobId) -> Letta.Job
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Get the status of a job.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.jobs.get("job_id");
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**jobId:** `string`
+
+
+
+
+
+-
+
+**requestOptions:** `Jobs.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.jobs.delete(jobId) -> Letta.Job
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Delete a job by its job_id.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.jobs.delete("job_id");
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**jobId:** `string`
+
+
+
+
+
+-
+
+**requestOptions:** `Jobs.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+## Health
+
+client.health.check() -> Letta.Health
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.health.check();
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**requestOptions:** `Health.RequestOptions`
+
+
+
+
+
+
+
+
+
diff --git a/src/Client.ts b/src/Client.ts
new file mode 100644
index 0000000..a3723a2
--- /dev/null
+++ b/src/Client.ts
@@ -0,0 +1,78 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as environments from "./environments";
+import * as core from "./core";
+import { Tools } from "./api/resources/tools/client/Client";
+import { Sources } from "./api/resources/sources/client/Client";
+import { Agents } from "./api/resources/agents/client/Client";
+import { Models } from "./api/resources/models/client/Client";
+import { Blocks } from "./api/resources/blocks/client/Client";
+import { Jobs } from "./api/resources/jobs/client/Client";
+import { Health } from "./api/resources/health/client/Client";
+
+export declare namespace LettaClient {
+ interface Options {
+ environment?: core.Supplier;
+ token: core.Supplier;
+ fetcher?: core.FetchFunction;
+ }
+
+ interface RequestOptions {
+ /** The maximum time to wait for a response in seconds. */
+ timeoutInSeconds?: number;
+ /** The number of times to retry the request. Defaults to 2. */
+ maxRetries?: number;
+ /** A hook to abort the request. */
+ abortSignal?: AbortSignal;
+ /** Additional headers to include in the request. */
+ headers?: Record;
+ }
+}
+
+export class LettaClient {
+ constructor(protected readonly _options: LettaClient.Options) {}
+
+ protected _tools: Tools | undefined;
+
+ public get tools(): Tools {
+ return (this._tools ??= new Tools(this._options));
+ }
+
+ protected _sources: Sources | undefined;
+
+ public get sources(): Sources {
+ return (this._sources ??= new Sources(this._options));
+ }
+
+ protected _agents: Agents | undefined;
+
+ public get agents(): Agents {
+ return (this._agents ??= new Agents(this._options));
+ }
+
+ protected _models: Models | undefined;
+
+ public get models(): Models {
+ return (this._models ??= new Models(this._options));
+ }
+
+ protected _blocks: Blocks | undefined;
+
+ public get blocks(): Blocks {
+ return (this._blocks ??= new Blocks(this._options));
+ }
+
+ protected _jobs: Jobs | undefined;
+
+ public get jobs(): Jobs {
+ return (this._jobs ??= new Jobs(this._options));
+ }
+
+ protected _health: Health | undefined;
+
+ public get health(): Health {
+ return (this._health ??= new Health(this._options));
+ }
+}
diff --git a/src/api/errors/ConflictError.ts b/src/api/errors/ConflictError.ts
new file mode 100644
index 0000000..5c3fb64
--- /dev/null
+++ b/src/api/errors/ConflictError.ts
@@ -0,0 +1,17 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as errors from "../../errors/index";
+import * as Letta from "../index";
+
+export class ConflictError extends errors.LettaError {
+ constructor(body: Letta.ConflictErrorBody) {
+ super({
+ message: "ConflictError",
+ statusCode: 409,
+ body: body,
+ });
+ Object.setPrototypeOf(this, ConflictError.prototype);
+ }
+}
diff --git a/src/api/errors/InternalServerError.ts b/src/api/errors/InternalServerError.ts
new file mode 100644
index 0000000..d41a95c
--- /dev/null
+++ b/src/api/errors/InternalServerError.ts
@@ -0,0 +1,16 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as errors from "../../errors/index";
+
+export class InternalServerError extends errors.LettaError {
+ constructor(body?: unknown) {
+ super({
+ message: "InternalServerError",
+ statusCode: 500,
+ body: body,
+ });
+ Object.setPrototypeOf(this, InternalServerError.prototype);
+ }
+}
diff --git a/src/api/errors/NotFoundError.ts b/src/api/errors/NotFoundError.ts
new file mode 100644
index 0000000..8b9f390
--- /dev/null
+++ b/src/api/errors/NotFoundError.ts
@@ -0,0 +1,16 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as errors from "../../errors/index";
+
+export class NotFoundError extends errors.LettaError {
+ constructor(body?: unknown) {
+ super({
+ message: "NotFoundError",
+ statusCode: 404,
+ body: body,
+ });
+ Object.setPrototypeOf(this, NotFoundError.prototype);
+ }
+}
diff --git a/src/api/errors/UnprocessableEntityError.ts b/src/api/errors/UnprocessableEntityError.ts
new file mode 100644
index 0000000..4f57450
--- /dev/null
+++ b/src/api/errors/UnprocessableEntityError.ts
@@ -0,0 +1,17 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as errors from "../../errors/index";
+import * as Letta from "../index";
+
+export class UnprocessableEntityError extends errors.LettaError {
+ constructor(body: Letta.HttpValidationError) {
+ super({
+ message: "UnprocessableEntityError",
+ statusCode: 422,
+ body: body,
+ });
+ Object.setPrototypeOf(this, UnprocessableEntityError.prototype);
+ }
+}
diff --git a/src/api/errors/index.ts b/src/api/errors/index.ts
new file mode 100644
index 0000000..0689576
--- /dev/null
+++ b/src/api/errors/index.ts
@@ -0,0 +1,4 @@
+export * from "./UnprocessableEntityError";
+export * from "./NotFoundError";
+export * from "./InternalServerError";
+export * from "./ConflictError";
diff --git a/src/api/index.ts b/src/api/index.ts
new file mode 100644
index 0000000..3006072
--- /dev/null
+++ b/src/api/index.ts
@@ -0,0 +1,3 @@
+export * from "./resources";
+export * from "./types";
+export * from "./errors";
diff --git a/src/api/resources/agents/client/Client.ts b/src/api/resources/agents/client/Client.ts
new file mode 100644
index 0000000..e68385f
--- /dev/null
+++ b/src/api/resources/agents/client/Client.ts
@@ -0,0 +1,2252 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as environments from "../../../../environments";
+import * as core from "../../../../core";
+import * as Letta from "../../../index";
+import urlJoin from "url-join";
+import * as errors from "../../../../errors/index";
+
+export declare namespace Agents {
+ interface Options {
+ environment?: core.Supplier;
+ token: core.Supplier;
+ fetcher?: core.FetchFunction;
+ }
+
+ interface RequestOptions {
+ /** The maximum time to wait for a response in seconds. */
+ timeoutInSeconds?: number;
+ /** The number of times to retry the request. Defaults to 2. */
+ maxRetries?: number;
+ /** A hook to abort the request. */
+ abortSignal?: AbortSignal;
+ /** Additional headers to include in the request. */
+ headers?: Record;
+ }
+}
+
+export class Agents {
+ constructor(protected readonly _options: Agents.Options) {}
+
+ /**
+ * List all agents associated with a given user.
+ * This endpoint retrieves a list of all agents and their configurations associated with the specified user ID.
+ *
+ * @param {Letta.AgentsListRequest} request
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.agents.list()
+ */
+ public list(
+ request: Letta.AgentsListRequest = {},
+ requestOptions?: Agents.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const { name, tags } = request;
+ const _queryParams: Record = {};
+ if (name != null) {
+ _queryParams["name"] = name;
+ }
+ if (tags != null) {
+ if (Array.isArray(tags)) {
+ _queryParams["tags"] = tags.map((item) => item);
+ } else {
+ _queryParams["tags"] = tags;
+ }
+ }
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ "v1/agents/"
+ ),
+ method: "GET",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ queryParameters: _queryParams,
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.AgentState[],
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/agents/.");
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Create a new agent with the specified configuration.
+ *
+ * @param {Letta.CreateAgent} request
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.agents.create()
+ */
+ public create(
+ request: Letta.CreateAgent = {},
+ requestOptions?: Agents.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ "v1/agents/"
+ ),
+ method: "POST",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ body: request,
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.AgentState,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/agents/.");
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Retrieve the context window of a specific agent.
+ *
+ * @param {string} agentId
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.agents.getContextWindow("agent_id")
+ */
+ public getContextWindow(
+ agentId: string,
+ requestOptions?: Agents.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/agents/${encodeURIComponent(agentId)}/context`
+ ),
+ method: "GET",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.ContextWindowOverview,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling GET /v1/agents/{agent_id}/context."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Get the sources associated with an agent.
+ *
+ * @param {string} agentId
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.agents.get("agent_id")
+ */
+ public get(agentId: string, requestOptions?: Agents.RequestOptions): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/agents/${encodeURIComponent(agentId)}/sources`
+ ),
+ method: "GET",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.Source[],
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling GET /v1/agents/{agent_id}/sources."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Delete an agent.
+ *
+ * @param {string} agentId
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.agents.delete("agent_id")
+ */
+ public delete(agentId: string, requestOptions?: Agents.RequestOptions): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/agents/${encodeURIComponent(agentId)}`
+ ),
+ method: "DELETE",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling DELETE /v1/agents/{agent_id}."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Update an exsiting agent
+ *
+ * @param {string} agentId
+ * @param {Letta.UpdateAgentState} request
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.agents.update("agent_id", {
+ * id: "id"
+ * })
+ */
+ public update(
+ agentId: string,
+ request: Letta.UpdateAgentState,
+ requestOptions?: Agents.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/agents/${encodeURIComponent(agentId)}`
+ ),
+ method: "PATCH",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ body: request,
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.AgentState,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling PATCH /v1/agents/{agent_id}."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Get tools from an existing agent
+ *
+ * @param {string} agentId
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.agents.listTools("agent_id")
+ */
+ public listTools(
+ agentId: string,
+ requestOptions?: Agents.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/agents/${encodeURIComponent(agentId)}/tools`
+ ),
+ method: "GET",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.LettaSchemasToolTool[],
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling GET /v1/agents/{agent_id}/tools."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Add tools to an existing agent
+ *
+ * @param {string} agentId
+ * @param {string} toolId
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.agents.addToTool("agent_id", "tool_id")
+ */
+ public addToTool(
+ agentId: string,
+ toolId: string,
+ requestOptions?: Agents.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/agents/${encodeURIComponent(agentId)}/add-tool/${encodeURIComponent(toolId)}`
+ ),
+ method: "PATCH",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.AgentState,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling PATCH /v1/agents/{agent_id}/add-tool/{tool_id}."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Add tools to an existing agent
+ *
+ * @param {string} agentId
+ * @param {string} toolId
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.agents.removeFromTool("agent_id", "tool_id")
+ */
+ public removeFromTool(
+ agentId: string,
+ toolId: string,
+ requestOptions?: Agents.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/agents/${encodeURIComponent(agentId)}/remove-tool/${encodeURIComponent(toolId)}`
+ ),
+ method: "PATCH",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.AgentState,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling PATCH /v1/agents/{agent_id}/remove-tool/{tool_id}."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Retrieve the messages in the context of a specific agent.
+ *
+ * @param {string} agentId
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.agents.listInContextMessages("agent_id")
+ */
+ public listInContextMessages(
+ agentId: string,
+ requestOptions?: Agents.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/agents/${encodeURIComponent(agentId)}/memory/messages`
+ ),
+ method: "GET",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.LettaSchemasMessageMessageOutput[],
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling GET /v1/agents/{agent_id}/memory/messages."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Retrieve the memory state of a specific agent.
+ * This endpoint fetches the current memory state of the agent identified by the user ID and agent ID.
+ *
+ * @param {string} agentId
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.agents.getMemory("agent_id")
+ */
+ public getMemory(agentId: string, requestOptions?: Agents.RequestOptions): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/agents/${encodeURIComponent(agentId)}/memory`
+ ),
+ method: "GET",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.Memory,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling GET /v1/agents/{agent_id}/memory."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Update the core memory of a specific agent.
+ * This endpoint accepts new memory contents (labels as keys, and values as values) and updates the core memory of the agent identified by the user ID and agent ID.
+ * This endpoint accepts new memory contents to update the core memory of the agent.
+ * This endpoint only supports modifying existing blocks; it does not support deleting/unlinking or creating/linking blocks.
+ *
+ * @param {string} agentId
+ * @param {Record} request
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.agents.updateMemory("agent_id", {
+ * "key": "value"
+ * })
+ */
+ public updateMemory(
+ agentId: string,
+ request: Record,
+ requestOptions?: Agents.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/agents/${encodeURIComponent(agentId)}/memory`
+ ),
+ method: "PATCH",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ body: request,
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.Memory,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling PATCH /v1/agents/{agent_id}/memory."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Update the label of a block in an agent's memory.
+ *
+ * @param {string} agentId
+ * @param {Letta.BlockLabelUpdate} request
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.agents.updateMemoryLabel("agent_id", {
+ * current_label: "current_label",
+ * new_label: "new_label"
+ * })
+ */
+ public updateMemoryLabel(
+ agentId: string,
+ request: Letta.BlockLabelUpdate,
+ requestOptions?: Agents.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/agents/${encodeURIComponent(agentId)}/memory/label`
+ ),
+ method: "PATCH",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ body: request,
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.Memory,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling PATCH /v1/agents/{agent_id}/memory/label."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Creates a memory block and links it to the agent.
+ *
+ * @param {string} agentId
+ * @param {Letta.BlockCreate} request
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.agents.addMemory("agent_id", {
+ * value: "value",
+ * label: "label"
+ * })
+ */
+ public addMemory(
+ agentId: string,
+ request: Letta.BlockCreate,
+ requestOptions?: Agents.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/agents/${encodeURIComponent(agentId)}/memory/block`
+ ),
+ method: "POST",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ body: request,
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.Memory,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling POST /v1/agents/{agent_id}/memory/block."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Removes a memory block from an agent by unlnking it. If the block is not linked to any other agent, it is deleted.
+ *
+ * @param {string} agentId
+ * @param {string} blockLabel
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.agents.removeMemory("agent_id", "block_label")
+ */
+ public removeMemory(
+ agentId: string,
+ blockLabel: string,
+ requestOptions?: Agents.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/agents/${encodeURIComponent(agentId)}/memory/block/${encodeURIComponent(blockLabel)}`
+ ),
+ method: "DELETE",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.Memory,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling DELETE /v1/agents/{agent_id}/memory/block/{block_label}."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Update the limit of a block in an agent's memory.
+ *
+ * @param {string} agentId
+ * @param {Letta.BlockLimitUpdate} request
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.agents.updateMemoryLimit("agent_id", {
+ * label: "label",
+ * limit: 1
+ * })
+ */
+ public updateMemoryLimit(
+ agentId: string,
+ request: Letta.BlockLimitUpdate,
+ requestOptions?: Agents.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/agents/${encodeURIComponent(agentId)}/memory/limit`
+ ),
+ method: "PATCH",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ body: request,
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.Memory,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling PATCH /v1/agents/{agent_id}/memory/limit."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Retrieve the summary of the recall memory of a specific agent.
+ *
+ * @param {string} agentId
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.agents.getRecallMemorySummary("agent_id")
+ */
+ public getRecallMemorySummary(
+ agentId: string,
+ requestOptions?: Agents.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/agents/${encodeURIComponent(agentId)}/memory/recall`
+ ),
+ method: "GET",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.RecallMemorySummary,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling GET /v1/agents/{agent_id}/memory/recall."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Retrieve the summary of the archival memory of a specific agent.
+ *
+ * @param {string} agentId
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.agents.getArchivalMemorySummary("agent_id")
+ */
+ public getArchivalMemorySummary(
+ agentId: string,
+ requestOptions?: Agents.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/agents/${encodeURIComponent(agentId)}/memory/archival`
+ ),
+ method: "GET",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.ArchivalMemorySummary,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling GET /v1/agents/{agent_id}/memory/archival."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Retrieve the memories in an agent's archival memory store (paginated query).
+ *
+ * @param {string} agentId
+ * @param {Letta.AgentsListArchivalMemoryRequest} request
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.agents.listArchivalMemory("agent_id")
+ */
+ public listArchivalMemory(
+ agentId: string,
+ request: Letta.AgentsListArchivalMemoryRequest = {},
+ requestOptions?: Agents.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const { after, before, limit } = request;
+ const _queryParams: Record = {};
+ if (after != null) {
+ _queryParams["after"] = after.toString();
+ }
+ if (before != null) {
+ _queryParams["before"] = before.toString();
+ }
+ if (limit != null) {
+ _queryParams["limit"] = limit.toString();
+ }
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/agents/${encodeURIComponent(agentId)}/archival`
+ ),
+ method: "GET",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ queryParameters: _queryParams,
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.Passage[],
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling GET /v1/agents/{agent_id}/archival."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Insert a memory into an agent's archival memory store.
+ *
+ * @param {string} agentId
+ * @param {Letta.CreateArchivalMemory} request
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.agents.createArchivalMemory("agent_id", {
+ * text: "text"
+ * })
+ */
+ public createArchivalMemory(
+ agentId: string,
+ request: Letta.CreateArchivalMemory,
+ requestOptions?: Agents.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/agents/${encodeURIComponent(agentId)}/archival`
+ ),
+ method: "POST",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ body: request,
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.Passage[],
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling POST /v1/agents/{agent_id}/archival."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Delete a memory from an agent's archival memory store.
+ *
+ * @param {string} agentId
+ * @param {string} memoryId
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.agents.deleteArchivalMemory("agent_id", "memory_id")
+ */
+ public deleteArchivalMemory(
+ agentId: string,
+ memoryId: string,
+ requestOptions?: Agents.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/agents/${encodeURIComponent(agentId)}/archival/${encodeURIComponent(memoryId)}`
+ ),
+ method: "DELETE",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling DELETE /v1/agents/{agent_id}/archival/{memory_id}."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Retrieve message history for an agent.
+ *
+ * @param {string} agentId
+ * @param {Letta.AgentsListMessagesRequest} request
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.agents.listMessages("agent_id")
+ */
+ public listMessages(
+ agentId: string,
+ request: Letta.AgentsListMessagesRequest = {},
+ requestOptions?: Agents.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const {
+ before,
+ limit,
+ msg_object: msgObject,
+ assistant_message_tool_name: assistantMessageToolName,
+ assistant_message_tool_kwarg: assistantMessageToolKwarg,
+ } = request;
+ const _queryParams: Record = {};
+ if (before != null) {
+ _queryParams["before"] = before;
+ }
+ if (limit != null) {
+ _queryParams["limit"] = limit.toString();
+ }
+ if (msgObject != null) {
+ _queryParams["msg_object"] = msgObject.toString();
+ }
+ if (assistantMessageToolName != null) {
+ _queryParams["assistant_message_tool_name"] = assistantMessageToolName;
+ }
+ if (assistantMessageToolKwarg != null) {
+ _queryParams["assistant_message_tool_kwarg"] = assistantMessageToolKwarg;
+ }
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/agents/${encodeURIComponent(agentId)}/messages`
+ ),
+ method: "GET",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ queryParameters: _queryParams,
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.AgentsListMessagesResponse,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling GET /v1/agents/{agent_id}/messages."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Process a user message and return the agent's response.
+ * This endpoint accepts a message from a user and processes it through the agent.
+ *
+ * @param {string} agentId
+ * @param {Letta.LettaRequest} request
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.agents.createMessage("agent_id", {
+ * messages: [{
+ * role: "user",
+ * text: "text"
+ * }]
+ * })
+ */
+ public createMessage(
+ agentId: string,
+ request: Letta.LettaRequest,
+ requestOptions?: Agents.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/agents/${encodeURIComponent(agentId)}/messages`
+ ),
+ method: "POST",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ body: request,
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.LettaResponse,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling POST /v1/agents/{agent_id}/messages."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Update the details of a message associated with an agent.
+ *
+ * @param {string} agentId
+ * @param {string} messageId
+ * @param {Letta.UpdateMessage} request
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.agents.updateMessage("agent_id", "message_id", {
+ * id: "id"
+ * })
+ */
+ public updateMessage(
+ agentId: string,
+ messageId: string,
+ request: Letta.UpdateMessage,
+ requestOptions?: Agents.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/agents/${encodeURIComponent(agentId)}/messages/${encodeURIComponent(messageId)}`
+ ),
+ method: "PATCH",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ body: request,
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.LettaSchemasMessageMessageOutput,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling PATCH /v1/agents/{agent_id}/messages/{message_id}."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Process a user message and return the agent's response.
+ * This endpoint accepts a message from a user and processes it through the agent.
+ * It will stream the steps of the response always, and stream the tokens if 'stream_tokens' is set to True.
+ *
+ * @param {string} agentId
+ * @param {Letta.LettaStreamingRequest} request
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.agents.createMessageStream("agent_id", {
+ * messages: [{
+ * role: "user",
+ * text: "text"
+ * }]
+ * })
+ */
+ public createMessageStream(
+ agentId: string,
+ request: Letta.LettaStreamingRequest,
+ requestOptions?: Agents.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/agents/${encodeURIComponent(agentId)}/messages/stream`
+ ),
+ method: "POST",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ body: request,
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: undefined,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling POST /v1/agents/{agent_id}/messages/stream."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Creates a versioned version of an agent
+ *
+ * @param {string} agentId - The agent ID of the agent to migrate, if this agent is not a template, it will create a agent template from the agent provided as well
+ * @param {Letta.AgentsVersionTemplateRequest} request
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.NotFoundError}
+ * @throws {@link Letta.InternalServerError}
+ *
+ * @example
+ * await client.agents.versionTemplate("agent_id")
+ */
+ public versionTemplate(
+ agentId: string,
+ request: Letta.AgentsVersionTemplateRequest = {},
+ requestOptions?: Agents.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const { returnAgentId, ..._body } = request;
+ const _queryParams: Record = {};
+ if (returnAgentId != null) {
+ _queryParams["returnAgentId"] = returnAgentId.toString();
+ }
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/agents/${encodeURIComponent(agentId)}/version-template`
+ ),
+ method: "POST",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ queryParameters: _queryParams,
+ requestType: "json",
+ body: _body,
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.AgentsVersionTemplateResponse,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 404:
+ throw new Letta.NotFoundError(_response.error.body as unknown);
+ case 500:
+ throw new Letta.InternalServerError(_response.error.body as unknown);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling POST /v1/agents/{agent_id}/version-template."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Migrate an agent to a new versioned agent template
+ *
+ * @param {string} agentId
+ * @param {Letta.AgentsMigrateRequest} request
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.NotFoundError}
+ * @throws {@link Letta.ConflictError}
+ * @throws {@link Letta.InternalServerError}
+ *
+ * @example
+ * await client.agents.migrate("agent_id", {
+ * to_template: "to_template",
+ * preserve_core_memories: true
+ * })
+ */
+ public migrate(
+ agentId: string,
+ request: Letta.AgentsMigrateRequest,
+ requestOptions?: Agents.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/agents/${encodeURIComponent(agentId)}/migrate`
+ ),
+ method: "POST",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ body: request,
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.AgentsMigrateResponse,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 404:
+ throw new Letta.NotFoundError(_response.error.body as unknown);
+ case 409:
+ throw new Letta.ConflictError(_response.error.body as Letta.ConflictErrorBody);
+ case 500:
+ throw new Letta.InternalServerError(_response.error.body as unknown);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling POST /v1/agents/{agent_id}/migrate."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ protected async _getAuthorizationHeader(): Promise {
+ return `Bearer ${await core.Supplier.get(this._options.token)}`;
+ }
+}
diff --git a/src/api/resources/agents/client/index.ts b/src/api/resources/agents/client/index.ts
new file mode 100644
index 0000000..415726b
--- /dev/null
+++ b/src/api/resources/agents/client/index.ts
@@ -0,0 +1 @@
+export * from "./requests";
diff --git a/src/api/resources/agents/client/requests/AgentsListArchivalMemoryRequest.ts b/src/api/resources/agents/client/requests/AgentsListArchivalMemoryRequest.ts
new file mode 100644
index 0000000..d0a10b4
--- /dev/null
+++ b/src/api/resources/agents/client/requests/AgentsListArchivalMemoryRequest.ts
@@ -0,0 +1,22 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * @example
+ * {}
+ */
+export interface AgentsListArchivalMemoryRequest {
+ /**
+ * Unique ID of the memory to start the query range at.
+ */
+ after?: number;
+ /**
+ * Unique ID of the memory to end the query range at.
+ */
+ before?: number;
+ /**
+ * How many results to include in the response.
+ */
+ limit?: number;
+}
diff --git a/src/api/resources/agents/client/requests/AgentsListMessagesRequest.ts b/src/api/resources/agents/client/requests/AgentsListMessagesRequest.ts
new file mode 100644
index 0000000..2c6498f
--- /dev/null
+++ b/src/api/resources/agents/client/requests/AgentsListMessagesRequest.ts
@@ -0,0 +1,30 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * @example
+ * {}
+ */
+export interface AgentsListMessagesRequest {
+ /**
+ * Message before which to retrieve the returned messages.
+ */
+ before?: string;
+ /**
+ * Maximum number of messages to retrieve.
+ */
+ limit?: number;
+ /**
+ * If true, returns Message objects. If false, return LettaMessage objects.
+ */
+ msg_object?: boolean;
+ /**
+ * The name of the designated message tool.
+ */
+ assistant_message_tool_name?: string;
+ /**
+ * The name of the message argument in the designated message tool.
+ */
+ assistant_message_tool_kwarg?: string;
+}
diff --git a/src/api/resources/agents/client/requests/AgentsListRequest.ts b/src/api/resources/agents/client/requests/AgentsListRequest.ts
new file mode 100644
index 0000000..fcb8e3b
--- /dev/null
+++ b/src/api/resources/agents/client/requests/AgentsListRequest.ts
@@ -0,0 +1,18 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * @example
+ * {}
+ */
+export interface AgentsListRequest {
+ /**
+ * Name of the agent
+ */
+ name?: string;
+ /**
+ * List of tags to filter agents by
+ */
+ tags?: string | string[];
+}
diff --git a/src/api/resources/agents/client/requests/AgentsMigrateRequest.ts b/src/api/resources/agents/client/requests/AgentsMigrateRequest.ts
new file mode 100644
index 0000000..f9e9061
--- /dev/null
+++ b/src/api/resources/agents/client/requests/AgentsMigrateRequest.ts
@@ -0,0 +1,17 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * @example
+ * {
+ * to_template: "to_template",
+ * preserve_core_memories: true
+ * }
+ */
+export interface AgentsMigrateRequest {
+ to_template: string;
+ /** If you chose to not preserve core memories, you should provide the new variables for the core memories */
+ variables?: Record;
+ preserve_core_memories: boolean;
+}
diff --git a/src/api/resources/agents/client/requests/AgentsVersionTemplateRequest.ts b/src/api/resources/agents/client/requests/AgentsVersionTemplateRequest.ts
new file mode 100644
index 0000000..7feda18
--- /dev/null
+++ b/src/api/resources/agents/client/requests/AgentsVersionTemplateRequest.ts
@@ -0,0 +1,12 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * @example
+ * {}
+ */
+export interface AgentsVersionTemplateRequest {
+ returnAgentId?: boolean;
+ migrate_deployed_agents?: boolean;
+}
diff --git a/src/api/resources/agents/client/requests/BlockLabelUpdate.ts b/src/api/resources/agents/client/requests/BlockLabelUpdate.ts
new file mode 100644
index 0000000..2d1e5aa
--- /dev/null
+++ b/src/api/resources/agents/client/requests/BlockLabelUpdate.ts
@@ -0,0 +1,17 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * @example
+ * {
+ * current_label: "current_label",
+ * new_label: "new_label"
+ * }
+ */
+export interface BlockLabelUpdate {
+ /** Current label of the block. */
+ current_label: string;
+ /** New label of the block. */
+ new_label: string;
+}
diff --git a/src/api/resources/agents/client/requests/BlockLimitUpdate.ts b/src/api/resources/agents/client/requests/BlockLimitUpdate.ts
new file mode 100644
index 0000000..3daaf7d
--- /dev/null
+++ b/src/api/resources/agents/client/requests/BlockLimitUpdate.ts
@@ -0,0 +1,17 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * @example
+ * {
+ * label: "label",
+ * limit: 1
+ * }
+ */
+export interface BlockLimitUpdate {
+ /** Label of the block. */
+ label: string;
+ /** New limit of the block. */
+ limit: number;
+}
diff --git a/src/api/resources/agents/client/requests/CreateAgent.ts b/src/api/resources/agents/client/requests/CreateAgent.ts
new file mode 100644
index 0000000..a01f41b
--- /dev/null
+++ b/src/api/resources/agents/client/requests/CreateAgent.ts
@@ -0,0 +1,40 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../../../../index";
+
+/**
+ * @example
+ * {}
+ */
+export interface CreateAgent {
+ /** The description of the agent. */
+ description?: string;
+ /** The metadata of the agent. */
+ metadata_?: Record;
+ /** The user id of the agent. */
+ user_id?: string;
+ /** The name of the agent. */
+ name?: string;
+ /** The ids of the messages in the agent's in-context memory. */
+ message_ids?: string[];
+ /** The in-context memory of the agent. */
+ memory?: Letta.Memory;
+ /** The tools used by the agent. */
+ tools?: string[];
+ /** The tool rules governing the agent. */
+ tool_rules?: Letta.BaseToolRule[];
+ /** The tags associated with the agent. */
+ tags?: string[];
+ /** The system prompt used by the agent. */
+ system?: string;
+ /** The type of agent. */
+ agent_type?: Letta.AgentType;
+ /** The LLM configuration used by the agent. */
+ llm_config?: Letta.LlmConfig;
+ /** The embedding configuration used by the agent. */
+ embedding_config?: Letta.EmbeddingConfig;
+ /** The initial set of messages to put in the agent's in-context memory. */
+ initial_message_sequence?: Letta.MessageInput[];
+}
diff --git a/src/api/resources/agents/client/requests/CreateArchivalMemory.ts b/src/api/resources/agents/client/requests/CreateArchivalMemory.ts
new file mode 100644
index 0000000..975a2bd
--- /dev/null
+++ b/src/api/resources/agents/client/requests/CreateArchivalMemory.ts
@@ -0,0 +1,14 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * @example
+ * {
+ * text: "text"
+ * }
+ */
+export interface CreateArchivalMemory {
+ /** Text to write to archival memory. */
+ text: string;
+}
diff --git a/src/api/resources/agents/client/requests/LettaRequest.ts b/src/api/resources/agents/client/requests/LettaRequest.ts
new file mode 100644
index 0000000..5f770e9
--- /dev/null
+++ b/src/api/resources/agents/client/requests/LettaRequest.ts
@@ -0,0 +1,23 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../../../../index";
+
+/**
+ * @example
+ * {
+ * messages: [{
+ * role: "user",
+ * text: "text"
+ * }]
+ * }
+ */
+export interface LettaRequest {
+ /** The messages to be sent to the agent. */
+ messages: Letta.LettaRequestMessages;
+ /** The name of the designated message tool. */
+ assistant_message_tool_name?: string;
+ /** The name of the message argument in the designated message tool. */
+ assistant_message_tool_kwarg?: string;
+}
diff --git a/src/api/resources/agents/client/requests/LettaStreamingRequest.ts b/src/api/resources/agents/client/requests/LettaStreamingRequest.ts
new file mode 100644
index 0000000..825983c
--- /dev/null
+++ b/src/api/resources/agents/client/requests/LettaStreamingRequest.ts
@@ -0,0 +1,25 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../../../../index";
+
+/**
+ * @example
+ * {
+ * messages: [{
+ * role: "user",
+ * text: "text"
+ * }]
+ * }
+ */
+export interface LettaStreamingRequest {
+ /** The messages to be sent to the agent. */
+ messages: Letta.LettaStreamingRequestMessages;
+ /** The name of the designated message tool. */
+ assistant_message_tool_name?: string;
+ /** The name of the message argument in the designated message tool. */
+ assistant_message_tool_kwarg?: string;
+ /** Flag to determine if individual tokens should be streamed. Set to True for token streaming (requires stream_steps = True). */
+ stream_tokens?: boolean;
+}
diff --git a/src/api/resources/agents/client/requests/UpdateAgentState.ts b/src/api/resources/agents/client/requests/UpdateAgentState.ts
new file mode 100644
index 0000000..f31488f
--- /dev/null
+++ b/src/api/resources/agents/client/requests/UpdateAgentState.ts
@@ -0,0 +1,38 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../../../../index";
+
+/**
+ * @example
+ * {
+ * id: "id"
+ * }
+ */
+export interface UpdateAgentState {
+ /** The description of the agent. */
+ description?: string;
+ /** The metadata of the agent. */
+ metadata_?: Record;
+ /** The user id of the agent. */
+ user_id?: string;
+ /** The id of the agent. */
+ id: string;
+ /** The name of the agent. */
+ name?: string;
+ /** The tools used by the agent. */
+ tools?: string[];
+ /** The tags associated with the agent. */
+ tags?: string[];
+ /** The system prompt used by the agent. */
+ system?: string;
+ /** The LLM configuration used by the agent. */
+ llm_config?: Letta.LlmConfig;
+ /** The embedding configuration used by the agent. */
+ embedding_config?: Letta.EmbeddingConfig;
+ /** The ids of the messages in the agent's in-context memory. */
+ message_ids?: string[];
+ /** The in-context memory of the agent. */
+ memory?: Letta.Memory;
+}
diff --git a/src/api/resources/agents/client/requests/UpdateMessage.ts b/src/api/resources/agents/client/requests/UpdateMessage.ts
new file mode 100644
index 0000000..7697fc0
--- /dev/null
+++ b/src/api/resources/agents/client/requests/UpdateMessage.ts
@@ -0,0 +1,26 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../../../../index";
+
+/**
+ * @example
+ * {
+ * id: "id"
+ * }
+ */
+export interface UpdateMessage {
+ /** The id of the message. */
+ id: string;
+ /** The role of the participant. */
+ role?: Letta.MessageRole;
+ /** The text of the message. */
+ text?: string;
+ /** The name of the participant. */
+ name?: string;
+ /** The list of tool calls requested. */
+ tool_calls?: Letta.LettaSchemasOpenaiChatCompletionsToolCallInput[];
+ /** The id of the tool call. */
+ tool_call_id?: string;
+}
diff --git a/src/api/resources/agents/client/requests/index.ts b/src/api/resources/agents/client/requests/index.ts
new file mode 100644
index 0000000..d576a0f
--- /dev/null
+++ b/src/api/resources/agents/client/requests/index.ts
@@ -0,0 +1,13 @@
+export { type AgentsListRequest } from "./AgentsListRequest";
+export { type CreateAgent } from "./CreateAgent";
+export { type UpdateAgentState } from "./UpdateAgentState";
+export { type BlockLabelUpdate } from "./BlockLabelUpdate";
+export { type BlockLimitUpdate } from "./BlockLimitUpdate";
+export { type AgentsListArchivalMemoryRequest } from "./AgentsListArchivalMemoryRequest";
+export { type CreateArchivalMemory } from "./CreateArchivalMemory";
+export { type AgentsListMessagesRequest } from "./AgentsListMessagesRequest";
+export { type LettaRequest } from "./LettaRequest";
+export { type UpdateMessage } from "./UpdateMessage";
+export { type LettaStreamingRequest } from "./LettaStreamingRequest";
+export { type AgentsVersionTemplateRequest } from "./AgentsVersionTemplateRequest";
+export { type AgentsMigrateRequest } from "./AgentsMigrateRequest";
diff --git a/src/api/resources/agents/index.ts b/src/api/resources/agents/index.ts
new file mode 100644
index 0000000..c9240f8
--- /dev/null
+++ b/src/api/resources/agents/index.ts
@@ -0,0 +1,2 @@
+export * from "./types";
+export * from "./client";
diff --git a/src/api/resources/agents/types/AgentsListMessagesResponse.ts b/src/api/resources/agents/types/AgentsListMessagesResponse.ts
new file mode 100644
index 0000000..f3870ce
--- /dev/null
+++ b/src/api/resources/agents/types/AgentsListMessagesResponse.ts
@@ -0,0 +1,9 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../../../index";
+
+export type AgentsListMessagesResponse =
+ | Letta.LettaSchemasMessageMessageOutput[]
+ | Letta.AgentsListMessagesResponseItem[];
diff --git a/src/api/resources/agents/types/AgentsListMessagesResponseItem.ts b/src/api/resources/agents/types/AgentsListMessagesResponseItem.ts
new file mode 100644
index 0000000..5d959c9
--- /dev/null
+++ b/src/api/resources/agents/types/AgentsListMessagesResponseItem.ts
@@ -0,0 +1,39 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../../../index";
+
+export type AgentsListMessagesResponseItem =
+ | Letta.AgentsListMessagesResponseItem.SystemMessage
+ | Letta.AgentsListMessagesResponseItem.UserMessage
+ | Letta.AgentsListMessagesResponseItem.InternalMonologue
+ | Letta.AgentsListMessagesResponseItem.FunctionCall
+ | Letta.AgentsListMessagesResponseItem.FunctionReturn
+ | Letta.AgentsListMessagesResponseItem.AssistantMessage;
+
+export declare namespace AgentsListMessagesResponseItem {
+ interface SystemMessage extends Letta.SystemMessageOutput {
+ message_type: "system_message";
+ }
+
+ interface UserMessage extends Letta.UserMessageOutput {
+ message_type: "user_message";
+ }
+
+ interface InternalMonologue extends Letta.InternalMonologue {
+ message_type: "internal_monologue";
+ }
+
+ interface FunctionCall extends Letta.FunctionCallMessage {
+ message_type: "function_call";
+ }
+
+ interface FunctionReturn extends Letta.FunctionReturn {
+ message_type: "function_return";
+ }
+
+ interface AssistantMessage extends Letta.AssistantMessageOutput {
+ message_type: "assistant_message";
+ }
+}
diff --git a/src/api/resources/agents/types/AgentsMigrateResponse.ts b/src/api/resources/agents/types/AgentsMigrateResponse.ts
new file mode 100644
index 0000000..6545064
--- /dev/null
+++ b/src/api/resources/agents/types/AgentsMigrateResponse.ts
@@ -0,0 +1,7 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface AgentsMigrateResponse {
+ success: boolean;
+}
diff --git a/src/api/resources/agents/types/AgentsVersionTemplateResponse.ts b/src/api/resources/agents/types/AgentsVersionTemplateResponse.ts
new file mode 100644
index 0000000..2b36f6b
--- /dev/null
+++ b/src/api/resources/agents/types/AgentsVersionTemplateResponse.ts
@@ -0,0 +1,8 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface AgentsVersionTemplateResponse {
+ version: string;
+ agentId?: string;
+}
diff --git a/src/api/resources/agents/types/LettaRequestMessages.ts b/src/api/resources/agents/types/LettaRequestMessages.ts
new file mode 100644
index 0000000..85800b9
--- /dev/null
+++ b/src/api/resources/agents/types/LettaRequestMessages.ts
@@ -0,0 +1,10 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../../../index";
+
+/**
+ * The messages to be sent to the agent.
+ */
+export type LettaRequestMessages = Letta.MessageCreate[] | Letta.MessageInput[];
diff --git a/src/api/resources/agents/types/LettaStreamingRequestMessages.ts b/src/api/resources/agents/types/LettaStreamingRequestMessages.ts
new file mode 100644
index 0000000..cb0008a
--- /dev/null
+++ b/src/api/resources/agents/types/LettaStreamingRequestMessages.ts
@@ -0,0 +1,10 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../../../index";
+
+/**
+ * The messages to be sent to the agent.
+ */
+export type LettaStreamingRequestMessages = Letta.MessageCreate[] | Letta.MessageInput[];
diff --git a/src/api/resources/agents/types/index.ts b/src/api/resources/agents/types/index.ts
new file mode 100644
index 0000000..3565503
--- /dev/null
+++ b/src/api/resources/agents/types/index.ts
@@ -0,0 +1,6 @@
+export * from "./AgentsListMessagesResponseItem";
+export * from "./AgentsListMessagesResponse";
+export * from "./LettaRequestMessages";
+export * from "./LettaStreamingRequestMessages";
+export * from "./AgentsVersionTemplateResponse";
+export * from "./AgentsMigrateResponse";
diff --git a/src/api/resources/blocks/client/Client.ts b/src/api/resources/blocks/client/Client.ts
new file mode 100644
index 0000000..e165d0d
--- /dev/null
+++ b/src/api/resources/blocks/client/Client.ts
@@ -0,0 +1,418 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as environments from "../../../../environments";
+import * as core from "../../../../core";
+import * as Letta from "../../../index";
+import urlJoin from "url-join";
+import * as errors from "../../../../errors/index";
+
+export declare namespace Blocks {
+ interface Options {
+ environment?: core.Supplier;
+ token: core.Supplier;
+ fetcher?: core.FetchFunction;
+ }
+
+ interface RequestOptions {
+ /** The maximum time to wait for a response in seconds. */
+ timeoutInSeconds?: number;
+ /** The number of times to retry the request. Defaults to 2. */
+ maxRetries?: number;
+ /** A hook to abort the request. */
+ abortSignal?: AbortSignal;
+ /** Additional headers to include in the request. */
+ headers?: Record;
+ }
+}
+
+export class Blocks {
+ constructor(protected readonly _options: Blocks.Options) {}
+
+ /**
+ * @param {Letta.BlocksListMemoryRequest} request
+ * @param {Blocks.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.blocks.listMemory()
+ */
+ public listMemory(
+ request: Letta.BlocksListMemoryRequest = {},
+ requestOptions?: Blocks.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const { label, templates_only: templatesOnly, name } = request;
+ const _queryParams: Record = {};
+ if (label != null) {
+ _queryParams["label"] = label;
+ }
+ if (templatesOnly != null) {
+ _queryParams["templates_only"] = templatesOnly.toString();
+ }
+ if (name != null) {
+ _queryParams["name"] = name;
+ }
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ "v1/blocks/"
+ ),
+ method: "GET",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ queryParameters: _queryParams,
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.Block[],
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/blocks/.");
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * @param {Letta.BlockCreate} request
+ * @param {Blocks.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.blocks.createMemory({
+ * value: "value",
+ * label: "label"
+ * })
+ */
+ public createMemory(
+ request: Letta.BlockCreate,
+ requestOptions?: Blocks.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ "v1/blocks/"
+ ),
+ method: "POST",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ body: request,
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.Block,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/blocks/.");
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * @param {string} blockId
+ * @param {Blocks.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.blocks.getMemory("block_id")
+ */
+ public getMemory(blockId: string, requestOptions?: Blocks.RequestOptions): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/blocks/${encodeURIComponent(blockId)}`
+ ),
+ method: "GET",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.Block,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/blocks/{block_id}.");
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * @param {string} blockId
+ * @param {Blocks.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.blocks.deleteMemory("block_id")
+ */
+ public deleteMemory(blockId: string, requestOptions?: Blocks.RequestOptions): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/blocks/${encodeURIComponent(blockId)}`
+ ),
+ method: "DELETE",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.Block,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling DELETE /v1/blocks/{block_id}."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * @param {string} blockId
+ * @param {Letta.BlockUpdate} request
+ * @param {Blocks.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.blocks.updateMemory("block_id")
+ */
+ public updateMemory(
+ blockId: string,
+ request: Letta.BlockUpdate = {},
+ requestOptions?: Blocks.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/blocks/${encodeURIComponent(blockId)}`
+ ),
+ method: "PATCH",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ body: request,
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.Block,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling PATCH /v1/blocks/{block_id}."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ protected async _getAuthorizationHeader(): Promise {
+ return `Bearer ${await core.Supplier.get(this._options.token)}`;
+ }
+}
diff --git a/src/api/resources/blocks/client/index.ts b/src/api/resources/blocks/client/index.ts
new file mode 100644
index 0000000..415726b
--- /dev/null
+++ b/src/api/resources/blocks/client/index.ts
@@ -0,0 +1 @@
+export * from "./requests";
diff --git a/src/api/resources/blocks/client/requests/BlockUpdate.ts b/src/api/resources/blocks/client/requests/BlockUpdate.ts
new file mode 100644
index 0000000..904c6e5
--- /dev/null
+++ b/src/api/resources/blocks/client/requests/BlockUpdate.ts
@@ -0,0 +1,24 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * @example
+ * {}
+ */
+export interface BlockUpdate {
+ /** Value of the block. */
+ value?: string;
+ /** Character limit of the block. */
+ limit?: number;
+ /** Name of the block if it is a template. */
+ name?: string;
+ /** Whether the block is a template (e.g. saved human/persona options). */
+ is_template?: boolean;
+ /** Label of the block (e.g. 'human', 'persona') in the context window. */
+ label?: string;
+ /** Description of the block. */
+ description?: string;
+ /** Metadata of the block. */
+ metadata_?: Record;
+}
diff --git a/src/api/resources/blocks/client/requests/BlocksListMemoryRequest.ts b/src/api/resources/blocks/client/requests/BlocksListMemoryRequest.ts
new file mode 100644
index 0000000..67406d4
--- /dev/null
+++ b/src/api/resources/blocks/client/requests/BlocksListMemoryRequest.ts
@@ -0,0 +1,22 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * @example
+ * {}
+ */
+export interface BlocksListMemoryRequest {
+ /**
+ * Labels to include (e.g. human, persona)
+ */
+ label?: string;
+ /**
+ * Whether to include only templates
+ */
+ templates_only?: boolean;
+ /**
+ * Name of the block
+ */
+ name?: string;
+}
diff --git a/src/api/resources/blocks/client/requests/index.ts b/src/api/resources/blocks/client/requests/index.ts
new file mode 100644
index 0000000..593c33f
--- /dev/null
+++ b/src/api/resources/blocks/client/requests/index.ts
@@ -0,0 +1,2 @@
+export { type BlocksListMemoryRequest } from "./BlocksListMemoryRequest";
+export { type BlockUpdate } from "./BlockUpdate";
diff --git a/src/api/resources/blocks/index.ts b/src/api/resources/blocks/index.ts
new file mode 100644
index 0000000..5ec7692
--- /dev/null
+++ b/src/api/resources/blocks/index.ts
@@ -0,0 +1 @@
+export * from "./client";
diff --git a/src/api/resources/health/client/Client.ts b/src/api/resources/health/client/Client.ts
new file mode 100644
index 0000000..2e4d382
--- /dev/null
+++ b/src/api/resources/health/client/Client.ts
@@ -0,0 +1,98 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as environments from "../../../../environments";
+import * as core from "../../../../core";
+import * as Letta from "../../../index";
+import urlJoin from "url-join";
+import * as errors from "../../../../errors/index";
+
+export declare namespace Health {
+ interface Options {
+ environment?: core.Supplier;
+ token: core.Supplier;
+ fetcher?: core.FetchFunction;
+ }
+
+ interface RequestOptions {
+ /** The maximum time to wait for a response in seconds. */
+ timeoutInSeconds?: number;
+ /** The number of times to retry the request. Defaults to 2. */
+ maxRetries?: number;
+ /** A hook to abort the request. */
+ abortSignal?: AbortSignal;
+ /** Additional headers to include in the request. */
+ headers?: Record;
+ }
+}
+
+export class Health {
+ constructor(protected readonly _options: Health.Options) {}
+
+ /**
+ * @param {Health.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @example
+ * await client.health.check()
+ */
+ public check(requestOptions?: Health.RequestOptions): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ "v1/health/"
+ ),
+ method: "GET",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.Health,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/health/.");
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ protected async _getAuthorizationHeader(): Promise {
+ return `Bearer ${await core.Supplier.get(this._options.token)}`;
+ }
+}
diff --git a/src/api/resources/health/client/index.ts b/src/api/resources/health/client/index.ts
new file mode 100644
index 0000000..cb0ff5c
--- /dev/null
+++ b/src/api/resources/health/client/index.ts
@@ -0,0 +1 @@
+export {};
diff --git a/src/api/resources/health/index.ts b/src/api/resources/health/index.ts
new file mode 100644
index 0000000..5ec7692
--- /dev/null
+++ b/src/api/resources/health/index.ts
@@ -0,0 +1 @@
+export * from "./client";
diff --git a/src/api/resources/index.ts b/src/api/resources/index.ts
new file mode 100644
index 0000000..5587ad8
--- /dev/null
+++ b/src/api/resources/index.ts
@@ -0,0 +1,13 @@
+export * as agents from "./agents";
+export * from "./agents/types";
+export * as tools from "./tools";
+export * as sources from "./sources";
+export * as models from "./models";
+export * as blocks from "./blocks";
+export * as jobs from "./jobs";
+export * as health from "./health";
+export * from "./tools/client/requests";
+export * from "./sources/client/requests";
+export * from "./agents/client/requests";
+export * from "./blocks/client/requests";
+export * from "./jobs/client/requests";
diff --git a/src/api/resources/jobs/client/Client.ts b/src/api/resources/jobs/client/Client.ts
new file mode 100644
index 0000000..3c07727
--- /dev/null
+++ b/src/api/resources/jobs/client/Client.ts
@@ -0,0 +1,332 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as environments from "../../../../environments";
+import * as core from "../../../../core";
+import * as Letta from "../../../index";
+import urlJoin from "url-join";
+import * as errors from "../../../../errors/index";
+
+export declare namespace Jobs {
+ interface Options {
+ environment?: core.Supplier;
+ token: core.Supplier;
+ fetcher?: core.FetchFunction;
+ }
+
+ interface RequestOptions {
+ /** The maximum time to wait for a response in seconds. */
+ timeoutInSeconds?: number;
+ /** The number of times to retry the request. Defaults to 2. */
+ maxRetries?: number;
+ /** A hook to abort the request. */
+ abortSignal?: AbortSignal;
+ /** Additional headers to include in the request. */
+ headers?: Record;
+ }
+}
+
+export class Jobs {
+ constructor(protected readonly _options: Jobs.Options) {}
+
+ /**
+ * List all jobs.
+ *
+ * @param {Letta.JobsListRequest} request
+ * @param {Jobs.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.jobs.list()
+ */
+ public list(
+ request: Letta.JobsListRequest = {},
+ requestOptions?: Jobs.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const { source_id: sourceId } = request;
+ const _queryParams: Record = {};
+ if (sourceId != null) {
+ _queryParams["source_id"] = sourceId;
+ }
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ "v1/jobs/"
+ ),
+ method: "GET",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ queryParameters: _queryParams,
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.Job[],
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/jobs/.");
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * List all active jobs.
+ *
+ * @param {Jobs.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.jobs.listActive()
+ */
+ public listActive(requestOptions?: Jobs.RequestOptions): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ "v1/jobs/active"
+ ),
+ method: "GET",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.Job[],
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/jobs/active.");
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Get the status of a job.
+ *
+ * @param {string} jobId
+ * @param {Jobs.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.jobs.get("job_id")
+ */
+ public get(jobId: string, requestOptions?: Jobs.RequestOptions): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/jobs/${encodeURIComponent(jobId)}`
+ ),
+ method: "GET",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.Job,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/jobs/{job_id}.");
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Delete a job by its job_id.
+ *
+ * @param {string} jobId
+ * @param {Jobs.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.jobs.delete("job_id")
+ */
+ public delete(jobId: string, requestOptions?: Jobs.RequestOptions): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/jobs/${encodeURIComponent(jobId)}`
+ ),
+ method: "DELETE",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.Job,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling DELETE /v1/jobs/{job_id}.");
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ protected async _getAuthorizationHeader(): Promise {
+ return `Bearer ${await core.Supplier.get(this._options.token)}`;
+ }
+}
diff --git a/src/api/resources/jobs/client/index.ts b/src/api/resources/jobs/client/index.ts
new file mode 100644
index 0000000..415726b
--- /dev/null
+++ b/src/api/resources/jobs/client/index.ts
@@ -0,0 +1 @@
+export * from "./requests";
diff --git a/src/api/resources/jobs/client/requests/JobsListRequest.ts b/src/api/resources/jobs/client/requests/JobsListRequest.ts
new file mode 100644
index 0000000..ab8b0b1
--- /dev/null
+++ b/src/api/resources/jobs/client/requests/JobsListRequest.ts
@@ -0,0 +1,14 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * @example
+ * {}
+ */
+export interface JobsListRequest {
+ /**
+ * Only list jobs associated with the source.
+ */
+ source_id?: string;
+}
diff --git a/src/api/resources/jobs/client/requests/index.ts b/src/api/resources/jobs/client/requests/index.ts
new file mode 100644
index 0000000..8b0c29a
--- /dev/null
+++ b/src/api/resources/jobs/client/requests/index.ts
@@ -0,0 +1 @@
+export { type JobsListRequest } from "./JobsListRequest";
diff --git a/src/api/resources/jobs/index.ts b/src/api/resources/jobs/index.ts
new file mode 100644
index 0000000..5ec7692
--- /dev/null
+++ b/src/api/resources/jobs/index.ts
@@ -0,0 +1 @@
+export * from "./client";
diff --git a/src/api/resources/models/client/Client.ts b/src/api/resources/models/client/Client.ts
new file mode 100644
index 0000000..4c440eb
--- /dev/null
+++ b/src/api/resources/models/client/Client.ts
@@ -0,0 +1,160 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as environments from "../../../../environments";
+import * as core from "../../../../core";
+import * as Letta from "../../../index";
+import urlJoin from "url-join";
+import * as errors from "../../../../errors/index";
+
+export declare namespace Models {
+ interface Options {
+ environment?: core.Supplier;
+ token: core.Supplier;
+ fetcher?: core.FetchFunction;
+ }
+
+ interface RequestOptions {
+ /** The maximum time to wait for a response in seconds. */
+ timeoutInSeconds?: number;
+ /** The number of times to retry the request. Defaults to 2. */
+ maxRetries?: number;
+ /** A hook to abort the request. */
+ abortSignal?: AbortSignal;
+ /** Additional headers to include in the request. */
+ headers?: Record;
+ }
+}
+
+export class Models {
+ constructor(protected readonly _options: Models.Options) {}
+
+ /**
+ * @param {Models.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @example
+ * await client.models.list()
+ */
+ public list(requestOptions?: Models.RequestOptions): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ "v1/models/"
+ ),
+ method: "GET",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.LlmConfig[],
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/models/.");
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * @param {Models.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @example
+ * await client.models.listEmbeddingModels()
+ */
+ public listEmbeddingModels(requestOptions?: Models.RequestOptions): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ "v1/models/embedding"
+ ),
+ method: "GET",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.EmbeddingConfig[],
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/models/embedding.");
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ protected async _getAuthorizationHeader(): Promise {
+ return `Bearer ${await core.Supplier.get(this._options.token)}`;
+ }
+}
diff --git a/src/api/resources/models/client/index.ts b/src/api/resources/models/client/index.ts
new file mode 100644
index 0000000..cb0ff5c
--- /dev/null
+++ b/src/api/resources/models/client/index.ts
@@ -0,0 +1 @@
+export {};
diff --git a/src/api/resources/models/index.ts b/src/api/resources/models/index.ts
new file mode 100644
index 0000000..5ec7692
--- /dev/null
+++ b/src/api/resources/models/index.ts
@@ -0,0 +1 @@
+export * from "./client";
diff --git a/src/api/resources/sources/client/Client.ts b/src/api/resources/sources/client/Client.ts
new file mode 100644
index 0000000..787a3ee
--- /dev/null
+++ b/src/api/resources/sources/client/Client.ts
@@ -0,0 +1,981 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as environments from "../../../../environments";
+import * as core from "../../../../core";
+import * as Letta from "../../../index";
+import urlJoin from "url-join";
+import * as errors from "../../../../errors/index";
+import * as fs from "fs";
+import { Blob } from "buffer";
+
+export declare namespace Sources {
+ interface Options {
+ environment?: core.Supplier;
+ token: core.Supplier;
+ fetcher?: core.FetchFunction;
+ }
+
+ interface RequestOptions {
+ /** The maximum time to wait for a response in seconds. */
+ timeoutInSeconds?: number;
+ /** The number of times to retry the request. Defaults to 2. */
+ maxRetries?: number;
+ /** A hook to abort the request. */
+ abortSignal?: AbortSignal;
+ /** Additional headers to include in the request. */
+ headers?: Record;
+ }
+}
+
+export class Sources {
+ constructor(protected readonly _options: Sources.Options) {}
+
+ /**
+ * Get all sources
+ *
+ * @param {string} sourceId
+ * @param {Sources.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.sources.get("source_id")
+ */
+ public get(sourceId: string, requestOptions?: Sources.RequestOptions): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/sources/${encodeURIComponent(sourceId)}`
+ ),
+ method: "GET",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.Source,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling GET /v1/sources/{source_id}."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Delete a data source.
+ *
+ * @param {string} sourceId
+ * @param {Sources.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.sources.delete("source_id")
+ */
+ public delete(sourceId: string, requestOptions?: Sources.RequestOptions): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/sources/${encodeURIComponent(sourceId)}`
+ ),
+ method: "DELETE",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling DELETE /v1/sources/{source_id}."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Update the name or documentation of an existing data source.
+ *
+ * @param {string} sourceId
+ * @param {Letta.SourceUpdate} request
+ * @param {Sources.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.sources.update("source_id")
+ */
+ public update(
+ sourceId: string,
+ request: Letta.SourceUpdate = {},
+ requestOptions?: Sources.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/sources/${encodeURIComponent(sourceId)}`
+ ),
+ method: "PATCH",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ body: request,
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.Source,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling PATCH /v1/sources/{source_id}."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Get a source by name
+ *
+ * @param {string} sourceName
+ * @param {Sources.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.sources.getIdByName("source_name")
+ */
+ public getIdByName(sourceName: string, requestOptions?: Sources.RequestOptions): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/sources/name/${encodeURIComponent(sourceName)}`
+ ),
+ method: "GET",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as string,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling GET /v1/sources/name/{source_name}."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * List all data sources created by a user.
+ *
+ * @param {Sources.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.sources.list()
+ */
+ public list(requestOptions?: Sources.RequestOptions): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ "v1/sources/"
+ ),
+ method: "GET",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.Source[],
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/sources/.");
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Create a new data source.
+ *
+ * @param {Letta.SourceCreate} request
+ * @param {Sources.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.sources.create({
+ * name: "name"
+ * })
+ */
+ public create(request: Letta.SourceCreate, requestOptions?: Sources.RequestOptions): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ "v1/sources/"
+ ),
+ method: "POST",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ body: request,
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.Source,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/sources/.");
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Attach a data source to an existing agent.
+ *
+ * @param {string} sourceId
+ * @param {Letta.SourcesAttachRequest} request
+ * @param {Sources.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.sources.attach("source_id", {
+ * agent_id: "agent_id"
+ * })
+ */
+ public attach(
+ sourceId: string,
+ request: Letta.SourcesAttachRequest,
+ requestOptions?: Sources.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const { agent_id: agentId } = request;
+ const _queryParams: Record = {};
+ _queryParams["agent_id"] = agentId;
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/sources/${encodeURIComponent(sourceId)}/attach`
+ ),
+ method: "POST",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ queryParameters: _queryParams,
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.Source,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling POST /v1/sources/{source_id}/attach."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Detach a data source from an existing agent.
+ *
+ * @param {string} sourceId
+ * @param {Letta.SourcesDetachRequest} request
+ * @param {Sources.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.sources.detach("source_id", {
+ * agent_id: "agent_id"
+ * })
+ */
+ public detach(
+ sourceId: string,
+ request: Letta.SourcesDetachRequest,
+ requestOptions?: Sources.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const { agent_id: agentId } = request;
+ const _queryParams: Record = {};
+ _queryParams["agent_id"] = agentId;
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/sources/${encodeURIComponent(sourceId)}/detach`
+ ),
+ method: "POST",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ queryParameters: _queryParams,
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.Source,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling POST /v1/sources/{source_id}/detach."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Upload a file to a data source.
+ *
+ * @param {File | fs.ReadStream | Blob} file
+ * @param {string} sourceId
+ * @param {Sources.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.sources.uploadFile(fs.createReadStream("/path/to/your/file"), "source_id")
+ */
+ public uploadFile(
+ file: File | fs.ReadStream | Blob,
+ sourceId: string,
+ requestOptions?: Sources.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _request = await core.newFormData();
+ await _request.appendFile("file", file);
+ const _maybeEncodedRequest = await _request.getRequest();
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/sources/${encodeURIComponent(sourceId)}/upload`
+ ),
+ method: "POST",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ..._maybeEncodedRequest.headers,
+ ...requestOptions?.headers,
+ },
+ requestType: "file",
+ duplex: _maybeEncodedRequest.duplex,
+ body: _maybeEncodedRequest.body,
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.Job,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling POST /v1/sources/{source_id}/upload."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * List all passages associated with a data source.
+ *
+ * @param {string} sourceId
+ * @param {Sources.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.sources.listPassages("source_id")
+ */
+ public listPassages(sourceId: string, requestOptions?: Sources.RequestOptions): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/sources/${encodeURIComponent(sourceId)}/passages`
+ ),
+ method: "GET",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.Passage[],
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling GET /v1/sources/{source_id}/passages."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * List paginated files associated with a data source.
+ *
+ * @param {string} sourceId
+ * @param {Letta.SourcesListFilesRequest} request
+ * @param {Sources.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.sources.listFiles("source_id")
+ */
+ public listFiles(
+ sourceId: string,
+ request: Letta.SourcesListFilesRequest = {},
+ requestOptions?: Sources.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const { limit, cursor } = request;
+ const _queryParams: Record = {};
+ if (limit != null) {
+ _queryParams["limit"] = limit.toString();
+ }
+ if (cursor != null) {
+ _queryParams["cursor"] = cursor;
+ }
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/sources/${encodeURIComponent(sourceId)}/files`
+ ),
+ method: "GET",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ queryParameters: _queryParams,
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.FileMetadata[],
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling GET /v1/sources/{source_id}/files."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Delete a data source.
+ *
+ * @param {string} sourceId
+ * @param {string} fileId
+ * @param {Sources.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.sources.deleteFile("source_id", "file_id")
+ */
+ public deleteFile(
+ sourceId: string,
+ fileId: string,
+ requestOptions?: Sources.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/sources/${encodeURIComponent(sourceId)}/${encodeURIComponent(fileId)}`
+ ),
+ method: "DELETE",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: undefined,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling DELETE /v1/sources/{source_id}/{file_id}."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ protected async _getAuthorizationHeader(): Promise {
+ return `Bearer ${await core.Supplier.get(this._options.token)}`;
+ }
+}
diff --git a/src/api/resources/sources/client/index.ts b/src/api/resources/sources/client/index.ts
new file mode 100644
index 0000000..415726b
--- /dev/null
+++ b/src/api/resources/sources/client/index.ts
@@ -0,0 +1 @@
+export * from "./requests";
diff --git a/src/api/resources/sources/client/requests/BodyUploadFileToSource.ts b/src/api/resources/sources/client/requests/BodyUploadFileToSource.ts
new file mode 100644
index 0000000..224a62c
--- /dev/null
+++ b/src/api/resources/sources/client/requests/BodyUploadFileToSource.ts
@@ -0,0 +1,9 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * @example
+ * {}
+ */
+export interface BodyUploadFileToSource {}
diff --git a/src/api/resources/sources/client/requests/SourceCreate.ts b/src/api/resources/sources/client/requests/SourceCreate.ts
new file mode 100644
index 0000000..17a41e7
--- /dev/null
+++ b/src/api/resources/sources/client/requests/SourceCreate.ts
@@ -0,0 +1,22 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../../../../index";
+
+/**
+ * @example
+ * {
+ * name: "name"
+ * }
+ */
+export interface SourceCreate {
+ /** The name of the source. */
+ name: string;
+ /** The embedding configuration used by the source. */
+ embedding_config?: Letta.EmbeddingConfig;
+ /** The description of the source. */
+ description?: string;
+ /** Metadata associated with the source. */
+ metadata_?: Record;
+}
diff --git a/src/api/resources/sources/client/requests/SourceUpdate.ts b/src/api/resources/sources/client/requests/SourceUpdate.ts
new file mode 100644
index 0000000..ad066de
--- /dev/null
+++ b/src/api/resources/sources/client/requests/SourceUpdate.ts
@@ -0,0 +1,20 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../../../../index";
+
+/**
+ * @example
+ * {}
+ */
+export interface SourceUpdate {
+ /** The name of the source. */
+ name?: string;
+ /** The description of the source. */
+ description?: string;
+ /** Metadata associated with the source. */
+ metadata_?: Record;
+ /** The embedding configuration used by the source. */
+ embedding_config?: Letta.EmbeddingConfig;
+}
diff --git a/src/api/resources/sources/client/requests/SourcesAttachRequest.ts b/src/api/resources/sources/client/requests/SourcesAttachRequest.ts
new file mode 100644
index 0000000..aa70857
--- /dev/null
+++ b/src/api/resources/sources/client/requests/SourcesAttachRequest.ts
@@ -0,0 +1,16 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * @example
+ * {
+ * agent_id: "agent_id"
+ * }
+ */
+export interface SourcesAttachRequest {
+ /**
+ * The unique identifier of the agent to attach the source to.
+ */
+ agent_id: string;
+}
diff --git a/src/api/resources/sources/client/requests/SourcesDetachRequest.ts b/src/api/resources/sources/client/requests/SourcesDetachRequest.ts
new file mode 100644
index 0000000..3e06494
--- /dev/null
+++ b/src/api/resources/sources/client/requests/SourcesDetachRequest.ts
@@ -0,0 +1,16 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * @example
+ * {
+ * agent_id: "agent_id"
+ * }
+ */
+export interface SourcesDetachRequest {
+ /**
+ * The unique identifier of the agent to detach the source from.
+ */
+ agent_id: string;
+}
diff --git a/src/api/resources/sources/client/requests/SourcesListFilesRequest.ts b/src/api/resources/sources/client/requests/SourcesListFilesRequest.ts
new file mode 100644
index 0000000..611c83c
--- /dev/null
+++ b/src/api/resources/sources/client/requests/SourcesListFilesRequest.ts
@@ -0,0 +1,18 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * @example
+ * {}
+ */
+export interface SourcesListFilesRequest {
+ /**
+ * Number of files to return
+ */
+ limit?: number;
+ /**
+ * Pagination cursor to fetch the next set of results
+ */
+ cursor?: string;
+}
diff --git a/src/api/resources/sources/client/requests/index.ts b/src/api/resources/sources/client/requests/index.ts
new file mode 100644
index 0000000..8ca7173
--- /dev/null
+++ b/src/api/resources/sources/client/requests/index.ts
@@ -0,0 +1,6 @@
+export { type SourceUpdate } from "./SourceUpdate";
+export { type SourceCreate } from "./SourceCreate";
+export { type SourcesAttachRequest } from "./SourcesAttachRequest";
+export { type SourcesDetachRequest } from "./SourcesDetachRequest";
+export { type BodyUploadFileToSource } from "./BodyUploadFileToSource";
+export { type SourcesListFilesRequest } from "./SourcesListFilesRequest";
diff --git a/src/api/resources/sources/index.ts b/src/api/resources/sources/index.ts
new file mode 100644
index 0000000..5ec7692
--- /dev/null
+++ b/src/api/resources/sources/index.ts
@@ -0,0 +1 @@
+export * from "./client";
diff --git a/src/api/resources/tools/client/Client.ts b/src/api/resources/tools/client/Client.ts
new file mode 100644
index 0000000..e823a74
--- /dev/null
+++ b/src/api/resources/tools/client/Client.ts
@@ -0,0 +1,645 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as environments from "../../../../environments";
+import * as core from "../../../../core";
+import * as Letta from "../../../index";
+import urlJoin from "url-join";
+import * as errors from "../../../../errors/index";
+
+export declare namespace Tools {
+ interface Options {
+ environment?: core.Supplier;
+ token: core.Supplier;
+ fetcher?: core.FetchFunction;
+ }
+
+ interface RequestOptions {
+ /** The maximum time to wait for a response in seconds. */
+ timeoutInSeconds?: number;
+ /** The number of times to retry the request. Defaults to 2. */
+ maxRetries?: number;
+ /** A hook to abort the request. */
+ abortSignal?: AbortSignal;
+ /** Additional headers to include in the request. */
+ headers?: Record;
+ }
+}
+
+export class Tools {
+ constructor(protected readonly _options: Tools.Options) {}
+
+ /**
+ * Get a tool by ID
+ *
+ * @param {string} toolId
+ * @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.tools.get("tool_id")
+ */
+ public get(toolId: string, requestOptions?: Tools.RequestOptions): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/tools/${encodeURIComponent(toolId)}`
+ ),
+ method: "GET",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.LettaSchemasToolTool,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/tools/{tool_id}.");
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Delete a tool by name
+ *
+ * @param {string} toolId
+ * @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.tools.delete("tool_id")
+ */
+ public delete(toolId: string, requestOptions?: Tools.RequestOptions): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/tools/${encodeURIComponent(toolId)}`
+ ),
+ method: "DELETE",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling DELETE /v1/tools/{tool_id}.");
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Update an existing tool
+ *
+ * @param {string} toolId
+ * @param {Letta.ToolUpdate} request
+ * @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.tools.update("tool_id")
+ */
+ public update(
+ toolId: string,
+ request: Letta.ToolUpdate = {},
+ requestOptions?: Tools.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/tools/${encodeURIComponent(toolId)}`
+ ),
+ method: "PATCH",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ body: request,
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.LettaSchemasToolTool,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/tools/{tool_id}.");
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Get a tool ID by name
+ *
+ * @param {string} toolName
+ * @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.tools.getIdByName("tool_name")
+ */
+ public getIdByName(toolName: string, requestOptions?: Tools.RequestOptions): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ `v1/tools/name/${encodeURIComponent(toolName)}`
+ ),
+ method: "GET",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as string,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling GET /v1/tools/name/{tool_name}."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Get a list of all tools available to agents belonging to the org of the user
+ *
+ * @param {Letta.ToolsListRequest} request
+ * @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.tools.list()
+ */
+ public list(
+ request: Letta.ToolsListRequest = {},
+ requestOptions?: Tools.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const { cursor, limit } = request;
+ const _queryParams: Record = {};
+ if (cursor != null) {
+ _queryParams["cursor"] = cursor;
+ }
+ if (limit != null) {
+ _queryParams["limit"] = limit.toString();
+ }
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ "v1/tools/"
+ ),
+ method: "GET",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ queryParameters: _queryParams,
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.LettaSchemasToolTool[],
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/tools/.");
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Create a new tool
+ *
+ * @param {Letta.ToolCreate} request
+ * @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.tools.create({
+ * source_code: "source_code"
+ * })
+ */
+ public create(
+ request: Letta.ToolCreate,
+ requestOptions?: Tools.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ "v1/tools/"
+ ),
+ method: "POST",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ body: request,
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.LettaSchemasToolTool,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/tools/.");
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Create or update a tool
+ *
+ * @param {Letta.ToolCreate} request
+ * @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.tools.upsert({
+ * source_code: "source_code"
+ * })
+ */
+ public upsert(
+ request: Letta.ToolCreate,
+ requestOptions?: Tools.RequestOptions
+ ): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ "v1/tools/"
+ ),
+ method: "PUT",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ body: request,
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.LettaSchemasToolTool,
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling PUT /v1/tools/.");
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ /**
+ * Add base tools
+ *
+ * @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Letta.UnprocessableEntityError}
+ *
+ * @example
+ * await client.tools.addBases()
+ */
+ public addBases(requestOptions?: Tools.RequestOptions): core.APIPromise {
+ return core.APIPromise.from(
+ (async () => {
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: urlJoin(
+ (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.Default,
+ "v1/tools/add-base-tools"
+ ),
+ method: "POST",
+ headers: {
+ Authorization: await this._getAuthorizationHeader(),
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "letta",
+ "X-Fern-SDK-Version": "0.5.3",
+ "User-Agent": "letta/0.5.3",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ ...requestOptions?.headers,
+ },
+ contentType: "application/json",
+ requestType: "json",
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ ok: _response.ok,
+ body: _response.body as Letta.LettaSchemasToolTool[],
+ headers: _response.headers,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Letta.UnprocessableEntityError(_response.error.body as Letta.HttpValidationError);
+ default:
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ });
+ }
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.LettaError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ });
+ case "timeout":
+ throw new errors.LettaTimeoutError(
+ "Timeout exceeded when calling POST /v1/tools/add-base-tools."
+ );
+ case "unknown":
+ throw new errors.LettaError({
+ message: _response.error.errorMessage,
+ });
+ }
+ })()
+ );
+ }
+
+ protected async _getAuthorizationHeader(): Promise {
+ return `Bearer ${await core.Supplier.get(this._options.token)}`;
+ }
+}
diff --git a/src/api/resources/tools/client/index.ts b/src/api/resources/tools/client/index.ts
new file mode 100644
index 0000000..415726b
--- /dev/null
+++ b/src/api/resources/tools/client/index.ts
@@ -0,0 +1 @@
+export * from "./requests";
diff --git a/src/api/resources/tools/client/requests/ToolUpdate.ts b/src/api/resources/tools/client/requests/ToolUpdate.ts
new file mode 100644
index 0000000..4ff098f
--- /dev/null
+++ b/src/api/resources/tools/client/requests/ToolUpdate.ts
@@ -0,0 +1,24 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * @example
+ * {}
+ */
+export interface ToolUpdate {
+ /** The description of the tool. */
+ description?: string;
+ /** The name of the function. */
+ name?: string;
+ /** Metadata tags. */
+ tags?: string[];
+ /** The source code of the function. */
+ module?: string;
+ /** The source code of the function. */
+ source_code?: string;
+ /** The type of the source code. */
+ source_type?: string;
+ /** The JSON schema of the function (auto-generated from source_code if not provided) */
+ json_schema?: Record;
+}
diff --git a/src/api/resources/tools/client/requests/ToolsListRequest.ts b/src/api/resources/tools/client/requests/ToolsListRequest.ts
new file mode 100644
index 0000000..e1b85ab
--- /dev/null
+++ b/src/api/resources/tools/client/requests/ToolsListRequest.ts
@@ -0,0 +1,12 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * @example
+ * {}
+ */
+export interface ToolsListRequest {
+ cursor?: string;
+ limit?: number;
+}
diff --git a/src/api/resources/tools/client/requests/index.ts b/src/api/resources/tools/client/requests/index.ts
new file mode 100644
index 0000000..b3ecfea
--- /dev/null
+++ b/src/api/resources/tools/client/requests/index.ts
@@ -0,0 +1,2 @@
+export { type ToolUpdate } from "./ToolUpdate";
+export { type ToolsListRequest } from "./ToolsListRequest";
diff --git a/src/api/resources/tools/index.ts b/src/api/resources/tools/index.ts
new file mode 100644
index 0000000..5ec7692
--- /dev/null
+++ b/src/api/resources/tools/index.ts
@@ -0,0 +1 @@
+export * from "./client";
diff --git a/src/api/types/AgentState.ts b/src/api/types/AgentState.ts
new file mode 100644
index 0000000..c9773b0
--- /dev/null
+++ b/src/api/types/AgentState.ts
@@ -0,0 +1,51 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+/**
+ * Representation of an agent's state. This is the state of the agent at a given time, and is persisted in the DB backend. The state has all the information needed to recreate a persisted agent.
+ *
+ * Parameters:
+ * id (str): The unique identifier of the agent.
+ * name (str): The name of the agent (must be unique to the user).
+ * created_at (datetime): The datetime the agent was created.
+ * message_ids (List[str]): The ids of the messages in the agent's in-context memory.
+ * memory (Memory): The in-context memory of the agent.
+ * tools (List[str]): The tools used by the agent. This includes any memory editing functions specified in `memory`.
+ * system (str): The system prompt used by the agent.
+ * llm_config (LLMConfig): The LLM configuration used by the agent.
+ * embedding_config (EmbeddingConfig): The embedding configuration used by the agent.
+ */
+export interface AgentState {
+ /** The description of the agent. */
+ description?: string;
+ /** The metadata of the agent. */
+ metadata_?: Record;
+ /** The user id of the agent. */
+ user_id?: string;
+ /** The human-friendly ID of the Agent */
+ id?: string;
+ /** The name of the agent. */
+ name: string;
+ /** The datetime the agent was created. */
+ created_at?: string;
+ /** The ids of the messages in the agent's in-context memory. */
+ message_ids?: string[];
+ memory?: Letta.Memory;
+ /** The tools used by the agent. */
+ tools: string[];
+ /** The list of tool rules. */
+ tool_rules?: Letta.BaseToolRule[];
+ /** The tags associated with the agent. */
+ tags?: string[];
+ /** The system prompt used by the agent. */
+ system: string;
+ /** The type of agent. */
+ agent_type: Letta.AgentType;
+ /** The LLM configuration used by the agent. */
+ llm_config: Letta.LlmConfig;
+ /** The embedding configuration used by the agent. */
+ embedding_config: Letta.EmbeddingConfig;
+}
diff --git a/src/api/types/AgentType.ts b/src/api/types/AgentType.ts
new file mode 100644
index 0000000..472de84
--- /dev/null
+++ b/src/api/types/AgentType.ts
@@ -0,0 +1,14 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * Enum to represent the type of agent.
+ */
+export type AgentType = "memgpt_agent" | "split_thread_agent" | "o1_agent";
+
+export const AgentType = {
+ MemgptAgent: "memgpt_agent",
+ SplitThreadAgent: "split_thread_agent",
+ O1Agent: "o1_agent",
+} as const;
diff --git a/src/api/types/ApiKey.ts b/src/api/types/ApiKey.ts
new file mode 100644
index 0000000..0e237dc
--- /dev/null
+++ b/src/api/types/ApiKey.ts
@@ -0,0 +1,14 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface ApiKey {
+ /** The human-friendly ID of the Sk */
+ id?: string;
+ /** The unique identifier of the user associated with the token. */
+ user_id: string;
+ /** The key value. */
+ key: string;
+ /** Name of the token. */
+ name: string;
+}
diff --git a/src/api/types/ApiKeyCreate.ts b/src/api/types/ApiKeyCreate.ts
new file mode 100644
index 0000000..a1863e6
--- /dev/null
+++ b/src/api/types/ApiKeyCreate.ts
@@ -0,0 +1,10 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface ApiKeyCreate {
+ /** The unique identifier of the user associated with the token. */
+ user_id: string;
+ /** Name of the token. */
+ name?: string;
+}
diff --git a/src/api/types/ArchivalMemorySummary.ts b/src/api/types/ArchivalMemorySummary.ts
new file mode 100644
index 0000000..6917fb5
--- /dev/null
+++ b/src/api/types/ArchivalMemorySummary.ts
@@ -0,0 +1,8 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface ArchivalMemorySummary {
+ /** Number of rows in archival memory */
+ size: number;
+}
diff --git a/src/api/types/AssistantFile.ts b/src/api/types/AssistantFile.ts
new file mode 100644
index 0000000..f4240f6
--- /dev/null
+++ b/src/api/types/AssistantFile.ts
@@ -0,0 +1,13 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface AssistantFile {
+ /** The unique identifier of the file. */
+ id: string;
+ object?: string;
+ /** The unix timestamp of when the file was created. */
+ created_at: number;
+ /** The unique identifier of the assistant. */
+ assistant_id: string;
+}
diff --git a/src/api/types/AssistantMessageInput.ts b/src/api/types/AssistantMessageInput.ts
new file mode 100644
index 0000000..3c42c7a
--- /dev/null
+++ b/src/api/types/AssistantMessageInput.ts
@@ -0,0 +1,12 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+export interface AssistantMessageInput {
+ content?: string;
+ role?: string;
+ name?: string;
+ tool_calls?: Letta.LettaSchemasOpenaiChatCompletionRequestToolCall[];
+}
diff --git a/src/api/types/AssistantMessageOutput.ts b/src/api/types/AssistantMessageOutput.ts
new file mode 100644
index 0000000..bde58e7
--- /dev/null
+++ b/src/api/types/AssistantMessageOutput.ts
@@ -0,0 +1,9 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface AssistantMessageOutput {
+ id: string;
+ date: string;
+ assistant_message: string;
+}
diff --git a/src/api/types/AuthRequest.ts b/src/api/types/AuthRequest.ts
new file mode 100644
index 0000000..70354cf
--- /dev/null
+++ b/src/api/types/AuthRequest.ts
@@ -0,0 +1,8 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface AuthRequest {
+ /** Admin password provided when starting the Letta server */
+ password?: string;
+}
diff --git a/src/api/types/AuthResponse.ts b/src/api/types/AuthResponse.ts
new file mode 100644
index 0000000..b9784f8
--- /dev/null
+++ b/src/api/types/AuthResponse.ts
@@ -0,0 +1,10 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface AuthResponse {
+ /** UUID of the user */
+ uuid: string;
+ /** Whether the user is an admin */
+ is_admin?: boolean;
+}
diff --git a/src/api/types/BaseToolRule.ts b/src/api/types/BaseToolRule.ts
new file mode 100644
index 0000000..1308776
--- /dev/null
+++ b/src/api/types/BaseToolRule.ts
@@ -0,0 +1,8 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface BaseToolRule {
+ /** The name of the tool. Must exist in the database for the user's organization. */
+ tool_name: string;
+}
diff --git a/src/api/types/Block.ts b/src/api/types/Block.ts
new file mode 100644
index 0000000..0c5be1f
--- /dev/null
+++ b/src/api/types/Block.ts
@@ -0,0 +1,42 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * A Block represents a reserved section of the LLM's context window which is editable. `Block` objects contained in the `Memory` object, which is able to edit the Block values.
+ *
+ * Parameters:
+ * label (str): The label of the block (e.g. 'human', 'persona'). This defines a category for the block.
+ * value (str): The value of the block. This is the string that is represented in the context window.
+ * limit (int): The character limit of the block.
+ * is_template (bool): Whether the block is a template (e.g. saved human/persona options). Non-template blocks are not stored in the database and are ephemeral, while templated blocks are stored in the database.
+ * label (str): The label of the block (e.g. 'human', 'persona'). This defines a category for the block.
+ * template_name (str): The name of the block template (if it is a template).
+ * description (str): Description of the block.
+ * metadata_ (Dict): Metadata of the block.
+ * user_id (str): The unique identifier of the user associated with the block.
+ */
+export interface Block {
+ /** Value of the block. */
+ value: string;
+ /** Character limit of the block. */
+ limit?: number;
+ /** Name of the block if it is a template. */
+ name?: string;
+ /** Whether the block is a template (e.g. saved human/persona options). */
+ is_template?: boolean;
+ /** Label of the block (e.g. 'human', 'persona') in the context window. */
+ label?: string;
+ /** Description of the block. */
+ description?: string;
+ /** Metadata of the block. */
+ metadata_?: Record;
+ /** The human-friendly ID of the Block */
+ id?: string;
+ /** The unique identifier of the organization associated with the block. */
+ organization_id?: string;
+ /** The id of the user that made this Block. */
+ created_by_id?: string;
+ /** The id of the user that last updated this Block. */
+ last_updated_by_id?: string;
+}
diff --git a/src/api/types/BlockCreate.ts b/src/api/types/BlockCreate.ts
new file mode 100644
index 0000000..db9ff81
--- /dev/null
+++ b/src/api/types/BlockCreate.ts
@@ -0,0 +1,22 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * Create a block
+ */
+export interface BlockCreate {
+ /** Value of the block. */
+ value: string;
+ /** Character limit of the block. */
+ limit?: number;
+ /** Name of the block if it is a template. */
+ name?: string;
+ is_template?: boolean;
+ /** Label of the block. */
+ label: string;
+ /** Description of the block. */
+ description?: string;
+ /** Metadata of the block. */
+ metadata_?: Record;
+}
diff --git a/src/api/types/ChatCompletionRequest.ts b/src/api/types/ChatCompletionRequest.ts
new file mode 100644
index 0000000..67d98aa
--- /dev/null
+++ b/src/api/types/ChatCompletionRequest.ts
@@ -0,0 +1,31 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+/**
+ * https://platform.openai.com/docs/api-reference/chat/create
+ */
+export interface ChatCompletionRequest {
+ model: string;
+ messages: Letta.ChatCompletionRequestMessagesItem[];
+ frequency_penalty?: number;
+ logit_bias?: Record;
+ logprobs?: boolean;
+ top_logprobs?: number;
+ max_tokens?: number;
+ n?: number;
+ presence_penalty?: number;
+ response_format?: Letta.ResponseFormat;
+ seed?: number;
+ stop?: Letta.ChatCompletionRequestStop;
+ stream?: boolean;
+ temperature?: number;
+ top_p?: number;
+ user?: string;
+ tools?: Letta.ToolInput[];
+ tool_choice?: Letta.ChatCompletionRequestToolChoice;
+ functions?: Letta.FunctionSchema[];
+ function_call?: Letta.ChatCompletionRequestFunctionCall;
+}
diff --git a/src/api/types/ChatCompletionRequestFunctionCall.ts b/src/api/types/ChatCompletionRequestFunctionCall.ts
new file mode 100644
index 0000000..3bc076d
--- /dev/null
+++ b/src/api/types/ChatCompletionRequestFunctionCall.ts
@@ -0,0 +1,7 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+export type ChatCompletionRequestFunctionCall = "none" | "auto" | Letta.FunctionCallInput;
diff --git a/src/api/types/ChatCompletionRequestMessagesItem.ts b/src/api/types/ChatCompletionRequestMessagesItem.ts
new file mode 100644
index 0000000..00dd58c
--- /dev/null
+++ b/src/api/types/ChatCompletionRequestMessagesItem.ts
@@ -0,0 +1,11 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+export type ChatCompletionRequestMessagesItem =
+ | Letta.SystemMessageInput
+ | Letta.UserMessageInput
+ | Letta.AssistantMessageInput
+ | Letta.ToolMessage;
diff --git a/src/api/types/ChatCompletionRequestStop.ts b/src/api/types/ChatCompletionRequestStop.ts
new file mode 100644
index 0000000..06027a4
--- /dev/null
+++ b/src/api/types/ChatCompletionRequestStop.ts
@@ -0,0 +1,5 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export type ChatCompletionRequestStop = string | string[];
diff --git a/src/api/types/ChatCompletionRequestToolChoice.ts b/src/api/types/ChatCompletionRequestToolChoice.ts
new file mode 100644
index 0000000..55f4ded
--- /dev/null
+++ b/src/api/types/ChatCompletionRequestToolChoice.ts
@@ -0,0 +1,7 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+export type ChatCompletionRequestToolChoice = "none" | "auto" | "required" | Letta.ToolFunctionChoice;
diff --git a/src/api/types/ChatCompletionResponse.ts b/src/api/types/ChatCompletionResponse.ts
new file mode 100644
index 0000000..6d98422
--- /dev/null
+++ b/src/api/types/ChatCompletionResponse.ts
@@ -0,0 +1,18 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+/**
+ * https://platform.openai.com/docs/api-reference/chat/object
+ */
+export interface ChatCompletionResponse {
+ id: string;
+ choices: Letta.Choice[];
+ created: string;
+ model?: string;
+ system_fingerprint?: string;
+ object?: "chat.completion";
+ usage: Letta.UsageStatistics;
+}
diff --git a/src/api/types/Choice.ts b/src/api/types/Choice.ts
new file mode 100644
index 0000000..e87019a
--- /dev/null
+++ b/src/api/types/Choice.ts
@@ -0,0 +1,13 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+export interface Choice {
+ finish_reason: string;
+ index: number;
+ message: Letta.LettaSchemasOpenaiChatCompletionResponseMessage;
+ logprobs?: Record;
+ seed?: number;
+}
diff --git a/src/api/types/ConflictErrorBody.ts b/src/api/types/ConflictErrorBody.ts
new file mode 100644
index 0000000..544f514
--- /dev/null
+++ b/src/api/types/ConflictErrorBody.ts
@@ -0,0 +1,7 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface ConflictErrorBody {
+ message: "You can only migrate agents to a new versioned agent template that belongs to the same project";
+}
diff --git a/src/api/types/ContextWindowOverview.ts b/src/api/types/ContextWindowOverview.ts
new file mode 100644
index 0000000..eaad7f7
--- /dev/null
+++ b/src/api/types/ContextWindowOverview.ts
@@ -0,0 +1,43 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+/**
+ * Overview of the context window, including the number of messages and tokens.
+ */
+export interface ContextWindowOverview {
+ /** The maximum amount of tokens the context window can hold. */
+ context_window_size_max: number;
+ /** The current number of tokens in the context window. */
+ context_window_size_current: number;
+ /** The number of messages in the context window. */
+ num_messages: number;
+ /** The number of messages in the archival memory. */
+ num_archival_memory: number;
+ /** The number of messages in the recall memory. */
+ num_recall_memory: number;
+ /** The number of tokens in the external memory summary (archival + recall metadata). */
+ num_tokens_external_memory_summary: number;
+ /** The number of tokens in the system prompt. */
+ num_tokens_system: number;
+ /** The content of the system prompt. */
+ system_prompt: string;
+ /** The number of tokens in the core memory. */
+ num_tokens_core_memory: number;
+ /** The content of the core memory. */
+ core_memory: string;
+ /** The number of tokens in the summary memory. */
+ num_tokens_summary_memory: number;
+ /** The content of the summary memory. */
+ summary_memory?: string;
+ /** The number of tokens in the functions definitions. */
+ num_tokens_functions_definitions: number;
+ /** The content of the functions definitions. */
+ functions_definitions?: Letta.LettaSchemasOpenaiChatCompletionRequestTool[];
+ /** The number of tokens in the messages list. */
+ num_tokens_messages: number;
+ /** The messages in the context window. */
+ messages: Letta.LettaSchemasMessageMessageOutput[];
+}
diff --git a/src/api/types/CreateAssistantFileRequest.ts b/src/api/types/CreateAssistantFileRequest.ts
new file mode 100644
index 0000000..15d037d
--- /dev/null
+++ b/src/api/types/CreateAssistantFileRequest.ts
@@ -0,0 +1,8 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface CreateAssistantFileRequest {
+ /** The unique identifier of the file. */
+ file_id: string;
+}
diff --git a/src/api/types/CreateAssistantRequest.ts b/src/api/types/CreateAssistantRequest.ts
new file mode 100644
index 0000000..7b99d99
--- /dev/null
+++ b/src/api/types/CreateAssistantRequest.ts
@@ -0,0 +1,22 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface CreateAssistantRequest {
+ /** The model to use for the assistant. */
+ model: string;
+ /** The name of the assistant. */
+ name: string;
+ /** The description of the assistant. */
+ description?: string;
+ /** The instructions for the assistant. */
+ instructions: string;
+ /** The tools used by the assistant. */
+ tools?: string[];
+ /** List of file IDs associated with the assistant. */
+ file_ids?: string[];
+ /** Metadata associated with the assistant. */
+ metadata?: Record;
+ /** The model to use for the assistant. */
+ embedding_model?: string;
+}
diff --git a/src/api/types/CreateMessageRequest.ts b/src/api/types/CreateMessageRequest.ts
new file mode 100644
index 0000000..1b573d5
--- /dev/null
+++ b/src/api/types/CreateMessageRequest.ts
@@ -0,0 +1,14 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface CreateMessageRequest {
+ /** Role of the message sender (either 'user' or 'system') */
+ role: string;
+ /** The message content to be processed by the agent. */
+ content: string;
+ /** List of file IDs associated with the message. */
+ file_ids?: string[];
+ /** Metadata associated with the message. */
+ metadata?: Record;
+}
diff --git a/src/api/types/CreateRunRequest.ts b/src/api/types/CreateRunRequest.ts
new file mode 100644
index 0000000..9c86531
--- /dev/null
+++ b/src/api/types/CreateRunRequest.ts
@@ -0,0 +1,20 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+export interface CreateRunRequest {
+ /** The unique identifier of the assistant. */
+ assistant_id: string;
+ /** The model used by the run. */
+ model?: string;
+ /** The instructions for the run. */
+ instructions: string;
+ /** Additional instructions for the run. */
+ additional_instructions?: string;
+ /** The tools used by the run (overrides assistant). */
+ tools?: Letta.LettaSchemasOpenaiOpenaiToolCall[];
+ /** Metadata associated with the run. */
+ metadata?: Record;
+}
diff --git a/src/api/types/CreateThreadRequest.ts b/src/api/types/CreateThreadRequest.ts
new file mode 100644
index 0000000..6eafe65
--- /dev/null
+++ b/src/api/types/CreateThreadRequest.ts
@@ -0,0 +1,12 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface CreateThreadRequest {
+ /** List of message IDs associated with the thread. */
+ messages?: string[];
+ /** Metadata associated with the thread. */
+ metadata?: Record;
+ /** The name of the assistant (i.e. Letta preset) */
+ assistant_name?: string;
+}
diff --git a/src/api/types/CreateThreadRunRequest.ts b/src/api/types/CreateThreadRunRequest.ts
new file mode 100644
index 0000000..6a65b9d
--- /dev/null
+++ b/src/api/types/CreateThreadRunRequest.ts
@@ -0,0 +1,20 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+export interface CreateThreadRunRequest {
+ /** The unique identifier of the assistant. */
+ assistant_id: string;
+ /** The thread to run. */
+ thread: Letta.OpenAiThread;
+ /** The model used by the run. */
+ model: string;
+ /** The instructions for the run. */
+ instructions: string;
+ /** The tools used by the run (overrides assistant). */
+ tools?: Letta.LettaSchemasOpenaiOpenaiToolCall[];
+ /** Metadata associated with the run. */
+ metadata?: Record;
+}
diff --git a/src/api/types/DeleteAssistantFileResponse.ts b/src/api/types/DeleteAssistantFileResponse.ts
new file mode 100644
index 0000000..b04d3aa
--- /dev/null
+++ b/src/api/types/DeleteAssistantFileResponse.ts
@@ -0,0 +1,11 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface DeleteAssistantFileResponse {
+ /** The unique identifier of the file. */
+ id: string;
+ object?: string;
+ /** Whether the file was deleted. */
+ deleted: boolean;
+}
diff --git a/src/api/types/DeleteAssistantResponse.ts b/src/api/types/DeleteAssistantResponse.ts
new file mode 100644
index 0000000..b13317b
--- /dev/null
+++ b/src/api/types/DeleteAssistantResponse.ts
@@ -0,0 +1,11 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface DeleteAssistantResponse {
+ /** The unique identifier of the agent. */
+ id: string;
+ object?: string;
+ /** Whether the agent was deleted. */
+ deleted: boolean;
+}
diff --git a/src/api/types/DeleteThreadResponse.ts b/src/api/types/DeleteThreadResponse.ts
new file mode 100644
index 0000000..6e98670
--- /dev/null
+++ b/src/api/types/DeleteThreadResponse.ts
@@ -0,0 +1,11 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface DeleteThreadResponse {
+ /** The unique identifier of the agent. */
+ id: string;
+ object?: string;
+ /** Whether the agent was deleted. */
+ deleted: boolean;
+}
diff --git a/src/api/types/E2BSandboxConfig.ts b/src/api/types/E2BSandboxConfig.ts
new file mode 100644
index 0000000..4970f07
--- /dev/null
+++ b/src/api/types/E2BSandboxConfig.ts
@@ -0,0 +1,12 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface E2BSandboxConfig {
+ /** Time limit for the sandbox (in seconds). */
+ timeout?: number;
+ /** The E2B template id (docker image). */
+ template?: string;
+ /** A list of pip packages to install on the E2B Sandbox */
+ pip_requirements?: string[];
+}
diff --git a/src/api/types/EmbeddingConfig.ts b/src/api/types/EmbeddingConfig.ts
new file mode 100644
index 0000000..3c334f2
--- /dev/null
+++ b/src/api/types/EmbeddingConfig.ts
@@ -0,0 +1,35 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * Embedding model configuration. This object specifies all the information necessary to access an embedding model to usage with Letta, except for secret keys.
+ *
+ * Attributes:
+ * embedding_endpoint_type (str): The endpoint type for the model.
+ * embedding_endpoint (str): The endpoint for the model.
+ * embedding_model (str): The model for the embedding.
+ * embedding_dim (int): The dimension of the embedding.
+ * embedding_chunk_size (int): The chunk size of the embedding.
+ * azure_endpoint (:obj:`str`, optional): The Azure endpoint for the model (Azure only).
+ * azure_version (str): The Azure version for the model (Azure only).
+ * azure_deployment (str): The Azure deployment for the model (Azure only).
+ */
+export interface EmbeddingConfig {
+ /** The endpoint type for the model. */
+ embedding_endpoint_type: string;
+ /** The endpoint for the model (`None` if local). */
+ embedding_endpoint?: string;
+ /** The model for the embedding. */
+ embedding_model: string;
+ /** The dimension of the embedding. */
+ embedding_dim: number;
+ /** The chunk size of the embedding. */
+ embedding_chunk_size?: number;
+ /** The Azure endpoint for the model. */
+ azure_endpoint?: string;
+ /** The Azure version for the model. */
+ azure_version?: string;
+ /** The Azure deployment for the model. */
+ azure_deployment?: string;
+}
diff --git a/src/api/types/FileMetadata.ts b/src/api/types/FileMetadata.ts
new file mode 100644
index 0000000..1c0b2e7
--- /dev/null
+++ b/src/api/types/FileMetadata.ts
@@ -0,0 +1,33 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * Representation of a single FileMetadata
+ */
+export interface FileMetadata {
+ /** The human-friendly ID of the File */
+ id?: string;
+ /** The unique identifier of the organization associated with the document. */
+ organization_id?: string;
+ /** The unique identifier of the source associated with the document. */
+ source_id: string;
+ /** The name of the file. */
+ file_name?: string;
+ /** The path to the file. */
+ file_path?: string;
+ /** The type of the file (MIME type). */
+ file_type?: string;
+ /** The size of the file in bytes. */
+ file_size?: number;
+ /** The creation date of the file. */
+ file_creation_date?: string;
+ /** The last modified date of the file. */
+ file_last_modified_date?: string;
+ /** The creation date of the file. */
+ created_at?: string;
+ /** The update date of the file. */
+ updated_at?: string;
+ /** Whether this file is deleted or not. */
+ is_deleted?: boolean;
+}
diff --git a/src/api/types/Function.ts b/src/api/types/Function.ts
new file mode 100644
index 0000000..6fcb8e9
--- /dev/null
+++ b/src/api/types/Function.ts
@@ -0,0 +1,10 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface Function {
+ /** The name of the function. */
+ name: string;
+ /** The arguments of the function. */
+ arguments: string;
+}
diff --git a/src/api/types/FunctionCallDelta.ts b/src/api/types/FunctionCallDelta.ts
new file mode 100644
index 0000000..8080865
--- /dev/null
+++ b/src/api/types/FunctionCallDelta.ts
@@ -0,0 +1,9 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface FunctionCallDelta {
+ name?: string;
+ arguments?: string;
+ function_call_id?: string;
+}
diff --git a/src/api/types/FunctionCallInput.ts b/src/api/types/FunctionCallInput.ts
new file mode 100644
index 0000000..61121ac
--- /dev/null
+++ b/src/api/types/FunctionCallInput.ts
@@ -0,0 +1,7 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface FunctionCallInput {
+ name: string;
+}
diff --git a/src/api/types/FunctionCallMessage.ts b/src/api/types/FunctionCallMessage.ts
new file mode 100644
index 0000000..2535527
--- /dev/null
+++ b/src/api/types/FunctionCallMessage.ts
@@ -0,0 +1,19 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+/**
+ * A message representing a request to call a function (generated by the LLM to trigger function execution).
+ *
+ * Attributes:
+ * function_call (Union[FunctionCall, FunctionCallDelta]): The function call
+ * id (str): The ID of the message
+ * date (datetime): The date the message was created in ISO format
+ */
+export interface FunctionCallMessage {
+ id: string;
+ date: string;
+ function_call: Letta.FunctionCallMessageFunctionCall;
+}
diff --git a/src/api/types/FunctionCallMessageFunctionCall.ts b/src/api/types/FunctionCallMessageFunctionCall.ts
new file mode 100644
index 0000000..28b61d8
--- /dev/null
+++ b/src/api/types/FunctionCallMessageFunctionCall.ts
@@ -0,0 +1,7 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+export type FunctionCallMessageFunctionCall = Letta.LettaSchemasLettaMessageFunctionCall | Letta.FunctionCallDelta;
diff --git a/src/api/types/FunctionReturn.ts b/src/api/types/FunctionReturn.ts
new file mode 100644
index 0000000..b094269
--- /dev/null
+++ b/src/api/types/FunctionReturn.ts
@@ -0,0 +1,23 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+/**
+ * A message representing the return value of a function call (generated by Letta executing the requested function).
+ *
+ * Attributes:
+ * function_return (str): The return value of the function
+ * status (Literal["success", "error"]): The status of the function call
+ * id (str): The ID of the message
+ * date (datetime): The date the message was created in ISO format
+ * function_call_id (str): A unique identifier for the function call that generated this message
+ */
+export interface FunctionReturn {
+ id: string;
+ date: string;
+ function_return: string;
+ status: Letta.FunctionReturnStatus;
+ function_call_id: string;
+}
diff --git a/src/api/types/FunctionReturnStatus.ts b/src/api/types/FunctionReturnStatus.ts
new file mode 100644
index 0000000..6676775
--- /dev/null
+++ b/src/api/types/FunctionReturnStatus.ts
@@ -0,0 +1,10 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export type FunctionReturnStatus = "success" | "error";
+
+export const FunctionReturnStatus = {
+ Success: "success",
+ Error: "error",
+} as const;
diff --git a/src/api/types/FunctionSchema.ts b/src/api/types/FunctionSchema.ts
new file mode 100644
index 0000000..59973fe
--- /dev/null
+++ b/src/api/types/FunctionSchema.ts
@@ -0,0 +1,9 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface FunctionSchema {
+ name: string;
+ description?: string;
+ parameters?: Record;
+}
diff --git a/src/api/types/Health.ts b/src/api/types/Health.ts
new file mode 100644
index 0000000..e22ee54
--- /dev/null
+++ b/src/api/types/Health.ts
@@ -0,0 +1,11 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * Health check response body
+ */
+export interface Health {
+ version: string;
+ status: string;
+}
diff --git a/src/api/types/HttpValidationError.ts b/src/api/types/HttpValidationError.ts
new file mode 100644
index 0000000..fe7ddb3
--- /dev/null
+++ b/src/api/types/HttpValidationError.ts
@@ -0,0 +1,9 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+export interface HttpValidationError {
+ detail?: Letta.ValidationError[];
+}
diff --git a/src/api/types/ImageFile.ts b/src/api/types/ImageFile.ts
new file mode 100644
index 0000000..70fe087
--- /dev/null
+++ b/src/api/types/ImageFile.ts
@@ -0,0 +1,8 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface ImageFile {
+ type?: string;
+ file_id: string;
+}
diff --git a/src/api/types/InternalMonologue.ts b/src/api/types/InternalMonologue.ts
new file mode 100644
index 0000000..685132f
--- /dev/null
+++ b/src/api/types/InternalMonologue.ts
@@ -0,0 +1,17 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * Representation of an agent's internal monologue.
+ *
+ * Attributes:
+ * internal_monologue (str): The internal monologue of the agent
+ * id (str): The ID of the message
+ * date (datetime): The date the message was created in ISO format
+ */
+export interface InternalMonologue {
+ id: string;
+ date: string;
+ internal_monologue: string;
+}
diff --git a/src/api/types/InternalServerErrorBody.ts b/src/api/types/InternalServerErrorBody.ts
new file mode 100644
index 0000000..0c3b1c0
--- /dev/null
+++ b/src/api/types/InternalServerErrorBody.ts
@@ -0,0 +1,7 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface InternalServerErrorBody {
+ message: "Migration failed";
+}
diff --git a/src/api/types/Job.ts b/src/api/types/Job.ts
new file mode 100644
index 0000000..9d7628c
--- /dev/null
+++ b/src/api/types/Job.ts
@@ -0,0 +1,30 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+/**
+ * Representation of offline jobs, used for tracking status of data loading tasks (involving parsing and embedding files).
+ *
+ * Parameters:
+ * id (str): The unique identifier of the job.
+ * status (JobStatus): The status of the job.
+ * created_at (datetime): The unix timestamp of when the job was created.
+ * completed_at (datetime): The unix timestamp of when the job was completed.
+ * user_id (str): The unique identifier of the user associated with the.
+ */
+export interface Job {
+ /** The metadata of the job. */
+ metadata_?: Record;
+ /** The human-friendly ID of the Job */
+ id?: string;
+ /** The status of the job. */
+ status?: Letta.JobStatus;
+ /** The unix timestamp of when the job was created. */
+ created_at?: string;
+ /** The unix timestamp of when the job was completed. */
+ completed_at?: string;
+ /** The unique identifier of the user associated with the job. */
+ user_id: string;
+}
diff --git a/src/api/types/JobStatus.ts b/src/api/types/JobStatus.ts
new file mode 100644
index 0000000..4a4bdb1
--- /dev/null
+++ b/src/api/types/JobStatus.ts
@@ -0,0 +1,16 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * Status of the job.
+ */
+export type JobStatus = "created" | "running" | "completed" | "failed" | "pending";
+
+export const JobStatus = {
+ Created: "created",
+ Running: "running",
+ Completed: "completed",
+ Failed: "failed",
+ Pending: "pending",
+} as const;
diff --git a/src/api/types/LettaResponse.ts b/src/api/types/LettaResponse.ts
new file mode 100644
index 0000000..7e4fde9
--- /dev/null
+++ b/src/api/types/LettaResponse.ts
@@ -0,0 +1,68 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+export interface LettaResponse {
+ AssistantMessage?: Letta.LettaResponseAssistantMessage;
+ FunctionCall?: Letta.LettaResponseFunctionCall;
+ FunctionCallDelta?: Letta.LettaResponseFunctionCallDelta;
+ /**
+ * A message representing a request to call a function (generated by the LLM to trigger function execution).
+ *
+ * Attributes:
+ * function_call (Union[FunctionCall, FunctionCallDelta]): The function call
+ * id (str): The ID of the message
+ * date (datetime): The date the message was created in ISO format
+ */
+ FunctionCallMessage?: Letta.LettaResponseFunctionCallMessage;
+ /**
+ * A message representing the return value of a function call (generated by Letta executing the requested function).
+ *
+ * Attributes:
+ * function_return (str): The return value of the function
+ * status (Literal["success", "error"]): The status of the function call
+ * id (str): The ID of the message
+ * date (datetime): The date the message was created in ISO format
+ * function_call_id (str): A unique identifier for the function call that generated this message
+ */
+ FunctionReturn?: Letta.LettaResponseFunctionReturn;
+ /**
+ * Representation of an agent's internal monologue.
+ *
+ * Attributes:
+ * internal_monologue (str): The internal monologue of the agent
+ * id (str): The ID of the message
+ * date (datetime): The date the message was created in ISO format
+ */
+ InternalMonologue?: Letta.LettaResponseInternalMonologue;
+ /**
+ * Usage statistics for the agent interaction.
+ *
+ * Attributes:
+ * completion_tokens (int): The number of tokens generated by the agent.
+ * prompt_tokens (int): The number of tokens in the prompt.
+ * total_tokens (int): The total number of tokens processed by the agent.
+ * step_count (int): The number of steps taken by the agent.
+ */
+ LettaUsageStatistics?: Letta.LettaResponseLettaUsageStatistics;
+ /**
+ * A message generated by the system. Never streamed back on a response, only used for cursor pagination.
+ *
+ * Attributes:
+ * message (str): The message sent by the system
+ * id (str): The ID of the message
+ * date (datetime): The date the message was created in ISO format
+ */
+ SystemMessage?: Letta.LettaResponseSystemMessage;
+ /**
+ * A message sent by the user. Never streamed back on a response, only used for cursor pagination.
+ *
+ * Attributes:
+ * message (str): The message sent by the user
+ * id (str): The ID of the message
+ * date (datetime): The date the message was created in ISO format
+ */
+ UserMessage?: Letta.LettaResponseUserMessage;
+}
diff --git a/src/api/types/LettaResponseAssistantMessage.ts b/src/api/types/LettaResponseAssistantMessage.ts
new file mode 100644
index 0000000..8056353
--- /dev/null
+++ b/src/api/types/LettaResponseAssistantMessage.ts
@@ -0,0 +1,10 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface LettaResponseAssistantMessage {
+ id: string;
+ date: string;
+ message_type?: "assistant_message";
+ assistant_message: string;
+}
diff --git a/src/api/types/LettaResponseFunctionCall.ts b/src/api/types/LettaResponseFunctionCall.ts
new file mode 100644
index 0000000..89b8837
--- /dev/null
+++ b/src/api/types/LettaResponseFunctionCall.ts
@@ -0,0 +1,9 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface LettaResponseFunctionCall {
+ name: string;
+ arguments: string;
+ function_call_id: string;
+}
diff --git a/src/api/types/LettaResponseFunctionCallDelta.ts b/src/api/types/LettaResponseFunctionCallDelta.ts
new file mode 100644
index 0000000..dfffbb6
--- /dev/null
+++ b/src/api/types/LettaResponseFunctionCallDelta.ts
@@ -0,0 +1,9 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface LettaResponseFunctionCallDelta {
+ name?: string;
+ arguments?: string;
+ function_call_id?: string;
+}
diff --git a/src/api/types/LettaResponseFunctionCallMessage.ts b/src/api/types/LettaResponseFunctionCallMessage.ts
new file mode 100644
index 0000000..96bd030
--- /dev/null
+++ b/src/api/types/LettaResponseFunctionCallMessage.ts
@@ -0,0 +1,20 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+/**
+ * A message representing a request to call a function (generated by the LLM to trigger function execution).
+ *
+ * Attributes:
+ * function_call (Union[FunctionCall, FunctionCallDelta]): The function call
+ * id (str): The ID of the message
+ * date (datetime): The date the message was created in ISO format
+ */
+export interface LettaResponseFunctionCallMessage {
+ id: string;
+ date: string;
+ message_type?: "function_call";
+ function_call: Letta.LettaResponseFunctionCallMessageFunctionCall;
+}
diff --git a/src/api/types/LettaResponseFunctionCallMessageFunctionCall.ts b/src/api/types/LettaResponseFunctionCallMessageFunctionCall.ts
new file mode 100644
index 0000000..cd20b9b
--- /dev/null
+++ b/src/api/types/LettaResponseFunctionCallMessageFunctionCall.ts
@@ -0,0 +1,9 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+export type LettaResponseFunctionCallMessageFunctionCall =
+ | Letta.LettaResponseFunctionCallMessageFunctionCallZero
+ | Letta.LettaResponseFunctionCallMessageFunctionCallOne;
diff --git a/src/api/types/LettaResponseFunctionCallMessageFunctionCallOne.ts b/src/api/types/LettaResponseFunctionCallMessageFunctionCallOne.ts
new file mode 100644
index 0000000..e00c5ad
--- /dev/null
+++ b/src/api/types/LettaResponseFunctionCallMessageFunctionCallOne.ts
@@ -0,0 +1,9 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface LettaResponseFunctionCallMessageFunctionCallOne {
+ name?: string;
+ arguments?: string;
+ function_call_id?: string;
+}
diff --git a/src/api/types/LettaResponseFunctionCallMessageFunctionCallZero.ts b/src/api/types/LettaResponseFunctionCallMessageFunctionCallZero.ts
new file mode 100644
index 0000000..8e5e23b
--- /dev/null
+++ b/src/api/types/LettaResponseFunctionCallMessageFunctionCallZero.ts
@@ -0,0 +1,9 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface LettaResponseFunctionCallMessageFunctionCallZero {
+ name: string;
+ arguments: string;
+ function_call_id: string;
+}
diff --git a/src/api/types/LettaResponseFunctionReturn.ts b/src/api/types/LettaResponseFunctionReturn.ts
new file mode 100644
index 0000000..a7edf84
--- /dev/null
+++ b/src/api/types/LettaResponseFunctionReturn.ts
@@ -0,0 +1,24 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+/**
+ * A message representing the return value of a function call (generated by Letta executing the requested function).
+ *
+ * Attributes:
+ * function_return (str): The return value of the function
+ * status (Literal["success", "error"]): The status of the function call
+ * id (str): The ID of the message
+ * date (datetime): The date the message was created in ISO format
+ * function_call_id (str): A unique identifier for the function call that generated this message
+ */
+export interface LettaResponseFunctionReturn {
+ id: string;
+ date: string;
+ message_type?: "function_return";
+ function_return: string;
+ status: Letta.LettaResponseFunctionReturnStatus;
+ function_call_id: string;
+}
diff --git a/src/api/types/LettaResponseFunctionReturnStatus.ts b/src/api/types/LettaResponseFunctionReturnStatus.ts
new file mode 100644
index 0000000..d854b27
--- /dev/null
+++ b/src/api/types/LettaResponseFunctionReturnStatus.ts
@@ -0,0 +1,10 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export type LettaResponseFunctionReturnStatus = "success" | "error";
+
+export const LettaResponseFunctionReturnStatus = {
+ Success: "success",
+ Error: "error",
+} as const;
diff --git a/src/api/types/LettaResponseInternalMonologue.ts b/src/api/types/LettaResponseInternalMonologue.ts
new file mode 100644
index 0000000..42d8e6d
--- /dev/null
+++ b/src/api/types/LettaResponseInternalMonologue.ts
@@ -0,0 +1,18 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * Representation of an agent's internal monologue.
+ *
+ * Attributes:
+ * internal_monologue (str): The internal monologue of the agent
+ * id (str): The ID of the message
+ * date (datetime): The date the message was created in ISO format
+ */
+export interface LettaResponseInternalMonologue {
+ id: string;
+ date: string;
+ message_type?: "internal_monologue";
+ internal_monologue: string;
+}
diff --git a/src/api/types/LettaResponseLettaUsageStatistics.ts b/src/api/types/LettaResponseLettaUsageStatistics.ts
new file mode 100644
index 0000000..8fe19c0
--- /dev/null
+++ b/src/api/types/LettaResponseLettaUsageStatistics.ts
@@ -0,0 +1,23 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * Usage statistics for the agent interaction.
+ *
+ * Attributes:
+ * completion_tokens (int): The number of tokens generated by the agent.
+ * prompt_tokens (int): The number of tokens in the prompt.
+ * total_tokens (int): The total number of tokens processed by the agent.
+ * step_count (int): The number of steps taken by the agent.
+ */
+export interface LettaResponseLettaUsageStatistics {
+ /** The number of tokens generated by the agent. */
+ completion_tokens?: number;
+ /** The number of tokens in the prompt. */
+ prompt_tokens?: number;
+ /** The total number of tokens processed by the agent. */
+ total_tokens?: number;
+ /** The number of steps taken by the agent. */
+ step_count?: number;
+}
diff --git a/src/api/types/LettaResponseSystemMessage.ts b/src/api/types/LettaResponseSystemMessage.ts
new file mode 100644
index 0000000..8a3ca4f
--- /dev/null
+++ b/src/api/types/LettaResponseSystemMessage.ts
@@ -0,0 +1,18 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * A message generated by the system. Never streamed back on a response, only used for cursor pagination.
+ *
+ * Attributes:
+ * message (str): The message sent by the system
+ * id (str): The ID of the message
+ * date (datetime): The date the message was created in ISO format
+ */
+export interface LettaResponseSystemMessage {
+ id: string;
+ date: string;
+ message_type?: "system_message";
+ message: string;
+}
diff --git a/src/api/types/LettaResponseUserMessage.ts b/src/api/types/LettaResponseUserMessage.ts
new file mode 100644
index 0000000..282c836
--- /dev/null
+++ b/src/api/types/LettaResponseUserMessage.ts
@@ -0,0 +1,18 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * A message sent by the user. Never streamed back on a response, only used for cursor pagination.
+ *
+ * Attributes:
+ * message (str): The message sent by the user
+ * id (str): The ID of the message
+ * date (datetime): The date the message was created in ISO format
+ */
+export interface LettaResponseUserMessage {
+ id: string;
+ date: string;
+ message_type?: "user_message";
+ message: string;
+}
diff --git a/src/api/types/LettaSchemasLettaMessageFunctionCall.ts b/src/api/types/LettaSchemasLettaMessageFunctionCall.ts
new file mode 100644
index 0000000..2b0ba3a
--- /dev/null
+++ b/src/api/types/LettaSchemasLettaMessageFunctionCall.ts
@@ -0,0 +1,9 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface LettaSchemasLettaMessageFunctionCall {
+ name: string;
+ arguments: string;
+ function_call_id: string;
+}
diff --git a/src/api/types/LettaSchemasMessageMessageOutput.ts b/src/api/types/LettaSchemasMessageMessageOutput.ts
new file mode 100644
index 0000000..5d1c654
--- /dev/null
+++ b/src/api/types/LettaSchemasMessageMessageOutput.ts
@@ -0,0 +1,43 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+/**
+ * Letta's internal representation of a message. Includes methods to convert to/from LLM provider formats.
+ *
+ * Attributes:
+ * id (str): The unique identifier of the message.
+ * role (MessageRole): The role of the participant.
+ * text (str): The text of the message.
+ * user_id (str): The unique identifier of the user.
+ * agent_id (str): The unique identifier of the agent.
+ * model (str): The model used to make the function call.
+ * name (str): The name of the participant.
+ * created_at (datetime): The time the message was created.
+ * tool_calls (List[ToolCall]): The list of tool calls requested.
+ * tool_call_id (str): The id of the tool call.
+ */
+export interface LettaSchemasMessageMessageOutput {
+ /** The human-friendly ID of the Message */
+ id?: string;
+ /** The role of the participant. */
+ role: Letta.MessageRole;
+ /** The text of the message. */
+ text?: string;
+ /** The unique identifier of the user. */
+ user_id?: string;
+ /** The unique identifier of the agent. */
+ agent_id?: string;
+ /** The model used to make the function call. */
+ model?: string;
+ /** The name of the participant. */
+ name?: string;
+ /** The time the message was created. */
+ created_at?: string;
+ /** The list of tool calls requested. */
+ tool_calls?: Letta.LettaSchemasOpenaiChatCompletionsToolCallOutput[];
+ /** The id of the tool call. */
+ tool_call_id?: string;
+}
diff --git a/src/api/types/LettaSchemasOpenaiChatCompletionRequestTool.ts b/src/api/types/LettaSchemasOpenaiChatCompletionRequestTool.ts
new file mode 100644
index 0000000..b409655
--- /dev/null
+++ b/src/api/types/LettaSchemasOpenaiChatCompletionRequestTool.ts
@@ -0,0 +1,10 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+export interface LettaSchemasOpenaiChatCompletionRequestTool {
+ type?: "function";
+ function: Letta.FunctionSchema;
+}
diff --git a/src/api/types/LettaSchemasOpenaiChatCompletionRequestToolCall.ts b/src/api/types/LettaSchemasOpenaiChatCompletionRequestToolCall.ts
new file mode 100644
index 0000000..703cbb0
--- /dev/null
+++ b/src/api/types/LettaSchemasOpenaiChatCompletionRequestToolCall.ts
@@ -0,0 +1,11 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+export interface LettaSchemasOpenaiChatCompletionRequestToolCall {
+ id: string;
+ type?: "function";
+ function: Letta.LettaSchemasOpenaiChatCompletionRequestToolCallFunction;
+}
diff --git a/src/api/types/LettaSchemasOpenaiChatCompletionRequestToolCallFunction.ts b/src/api/types/LettaSchemasOpenaiChatCompletionRequestToolCallFunction.ts
new file mode 100644
index 0000000..f1b4b44
--- /dev/null
+++ b/src/api/types/LettaSchemasOpenaiChatCompletionRequestToolCallFunction.ts
@@ -0,0 +1,8 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface LettaSchemasOpenaiChatCompletionRequestToolCallFunction {
+ name: string;
+ arguments: string;
+}
diff --git a/src/api/types/LettaSchemasOpenaiChatCompletionResponseFunctionCall.ts b/src/api/types/LettaSchemasOpenaiChatCompletionResponseFunctionCall.ts
new file mode 100644
index 0000000..3465a28
--- /dev/null
+++ b/src/api/types/LettaSchemasOpenaiChatCompletionResponseFunctionCall.ts
@@ -0,0 +1,8 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface LettaSchemasOpenaiChatCompletionResponseFunctionCall {
+ arguments: string;
+ name: string;
+}
diff --git a/src/api/types/LettaSchemasOpenaiChatCompletionResponseMessage.ts b/src/api/types/LettaSchemasOpenaiChatCompletionResponseMessage.ts
new file mode 100644
index 0000000..62a0ba8
--- /dev/null
+++ b/src/api/types/LettaSchemasOpenaiChatCompletionResponseMessage.ts
@@ -0,0 +1,12 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+export interface LettaSchemasOpenaiChatCompletionResponseMessage {
+ content?: string;
+ tool_calls?: Letta.LettaSchemasOpenaiChatCompletionResponseToolCall[];
+ role: string;
+ function_call?: Letta.LettaSchemasOpenaiChatCompletionResponseFunctionCall;
+}
diff --git a/src/api/types/LettaSchemasOpenaiChatCompletionResponseToolCall.ts b/src/api/types/LettaSchemasOpenaiChatCompletionResponseToolCall.ts
new file mode 100644
index 0000000..acd582f
--- /dev/null
+++ b/src/api/types/LettaSchemasOpenaiChatCompletionResponseToolCall.ts
@@ -0,0 +1,11 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+export interface LettaSchemasOpenaiChatCompletionResponseToolCall {
+ id: string;
+ type?: "function";
+ function: Letta.LettaSchemasOpenaiChatCompletionResponseFunctionCall;
+}
diff --git a/src/api/types/LettaSchemasOpenaiChatCompletionsToolCallFunction.ts b/src/api/types/LettaSchemasOpenaiChatCompletionsToolCallFunction.ts
new file mode 100644
index 0000000..8420469
--- /dev/null
+++ b/src/api/types/LettaSchemasOpenaiChatCompletionsToolCallFunction.ts
@@ -0,0 +1,10 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface LettaSchemasOpenaiChatCompletionsToolCallFunction {
+ /** The name of the function to call */
+ name: string;
+ /** The arguments to pass to the function (JSON dump) */
+ arguments: string;
+}
diff --git a/src/api/types/LettaSchemasOpenaiChatCompletionsToolCallInput.ts b/src/api/types/LettaSchemasOpenaiChatCompletionsToolCallInput.ts
new file mode 100644
index 0000000..b7e61ea
--- /dev/null
+++ b/src/api/types/LettaSchemasOpenaiChatCompletionsToolCallInput.ts
@@ -0,0 +1,13 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+export interface LettaSchemasOpenaiChatCompletionsToolCallInput {
+ /** The ID of the tool call */
+ id: string;
+ type?: string;
+ /** The arguments and name for the function */
+ function: Letta.LettaSchemasOpenaiChatCompletionsToolCallFunction;
+}
diff --git a/src/api/types/LettaSchemasOpenaiChatCompletionsToolCallOutput.ts b/src/api/types/LettaSchemasOpenaiChatCompletionsToolCallOutput.ts
new file mode 100644
index 0000000..879a366
--- /dev/null
+++ b/src/api/types/LettaSchemasOpenaiChatCompletionsToolCallOutput.ts
@@ -0,0 +1,13 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+export interface LettaSchemasOpenaiChatCompletionsToolCallOutput {
+ /** The ID of the tool call */
+ id: string;
+ type?: string;
+ /** The arguments and name for the function */
+ function: Letta.ToolCallFunctionOutput;
+}
diff --git a/src/api/types/LettaSchemasOpenaiOpenaiToolCall.ts b/src/api/types/LettaSchemasOpenaiOpenaiToolCall.ts
new file mode 100644
index 0000000..09be85d
--- /dev/null
+++ b/src/api/types/LettaSchemasOpenaiOpenaiToolCall.ts
@@ -0,0 +1,13 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+export interface LettaSchemasOpenaiOpenaiToolCall {
+ /** The unique identifier of the tool call. */
+ id: string;
+ type?: string;
+ /** The function call. */
+ function: Letta.Function;
+}
diff --git a/src/api/types/LettaSchemasToolTool.ts b/src/api/types/LettaSchemasToolTool.ts
new file mode 100644
index 0000000..5543695
--- /dev/null
+++ b/src/api/types/LettaSchemasToolTool.ts
@@ -0,0 +1,38 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * Representation of a tool, which is a function that can be called by the agent.
+ *
+ * Parameters:
+ * id (str): The unique identifier of the tool.
+ * name (str): The name of the function.
+ * tags (List[str]): Metadata tags.
+ * source_code (str): The source code of the function.
+ * json_schema (Dict): The JSON schema of the function.
+ */
+export interface LettaSchemasToolTool {
+ /** The human-friendly ID of the Tool */
+ id?: string;
+ /** The description of the tool. */
+ description?: string;
+ /** The type of the source code. */
+ source_type?: string;
+ /** The module of the function. */
+ module?: string;
+ /** The unique identifier of the organization associated with the tool. */
+ organization_id?: string;
+ /** The name of the function. */
+ name?: string;
+ /** Metadata tags. */
+ tags?: string[];
+ /** The source code of the function. */
+ source_code: string;
+ /** The JSON schema of the function. */
+ json_schema?: Record;
+ /** The id of the user that made this Tool. */
+ created_by_id?: string;
+ /** The id of the user that made this Tool. */
+ last_updated_by_id?: string;
+}
diff --git a/src/api/types/LettaUsageStatistics.ts b/src/api/types/LettaUsageStatistics.ts
new file mode 100644
index 0000000..ed4bad8
--- /dev/null
+++ b/src/api/types/LettaUsageStatistics.ts
@@ -0,0 +1,23 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * Usage statistics for the agent interaction.
+ *
+ * Attributes:
+ * completion_tokens (int): The number of tokens generated by the agent.
+ * prompt_tokens (int): The number of tokens in the prompt.
+ * total_tokens (int): The total number of tokens processed by the agent.
+ * step_count (int): The number of steps taken by the agent.
+ */
+export interface LettaUsageStatistics {
+ /** The number of tokens generated by the agent. */
+ completion_tokens?: number;
+ /** The number of tokens in the prompt. */
+ prompt_tokens?: number;
+ /** The total number of tokens processed by the agent. */
+ total_tokens?: number;
+ /** The number of steps taken by the agent. */
+ step_count?: number;
+}
diff --git a/src/api/types/ListMessagesResponse.ts b/src/api/types/ListMessagesResponse.ts
new file mode 100644
index 0000000..cba8786
--- /dev/null
+++ b/src/api/types/ListMessagesResponse.ts
@@ -0,0 +1,10 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+export interface ListMessagesResponse {
+ /** List of message objects. */
+ messages: Letta.OpenAiMessage[];
+}
diff --git a/src/api/types/LlmConfig.ts b/src/api/types/LlmConfig.ts
new file mode 100644
index 0000000..95ae36e
--- /dev/null
+++ b/src/api/types/LlmConfig.ts
@@ -0,0 +1,31 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+/**
+ * Configuration for a Language Model (LLM) model. This object specifies all the information necessary to access an LLM model to usage with Letta, except for secret keys.
+ *
+ * Attributes:
+ * model (str): The name of the LLM model.
+ * model_endpoint_type (str): The endpoint type for the model.
+ * model_endpoint (str): The endpoint for the model.
+ * model_wrapper (str): The wrapper for the model. This is used to wrap additional text around the input/output of the model. This is useful for text-to-text completions, such as the Completions API in OpenAI.
+ * context_window (int): The context window size for the model.
+ * put_inner_thoughts_in_kwargs (bool): Puts `inner_thoughts` as a kwarg in the function call if this is set to True. This helps with function calling performance and also the generation of inner thoughts.
+ */
+export interface LlmConfig {
+ /** LLM model name. */
+ model: string;
+ /** The endpoint type for the model. */
+ model_endpoint_type: Letta.LlmConfigModelEndpointType;
+ /** The endpoint for the model. */
+ model_endpoint?: string;
+ /** The wrapper for the model. */
+ model_wrapper?: string;
+ /** The context window size for the model. */
+ context_window: number;
+ /** Puts 'inner_thoughts' as a kwarg in the function call if this is set to True. This helps with function calling performance and also the generation of inner thoughts. */
+ put_inner_thoughts_in_kwargs?: boolean;
+}
diff --git a/src/api/types/LlmConfigModelEndpointType.ts b/src/api/types/LlmConfigModelEndpointType.ts
new file mode 100644
index 0000000..e6b4ee6
--- /dev/null
+++ b/src/api/types/LlmConfigModelEndpointType.ts
@@ -0,0 +1,45 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * The endpoint type for the model.
+ */
+export type LlmConfigModelEndpointType =
+ | "openai"
+ | "anthropic"
+ | "cohere"
+ | "google_ai"
+ | "azure"
+ | "groq"
+ | "ollama"
+ | "webui"
+ | "webui-legacy"
+ | "lmstudio"
+ | "lmstudio-legacy"
+ | "llamacpp"
+ | "koboldcpp"
+ | "vllm"
+ | "hugging-face"
+ | "mistral"
+ | "together";
+
+export const LlmConfigModelEndpointType = {
+ Openai: "openai",
+ Anthropic: "anthropic",
+ Cohere: "cohere",
+ GoogleAi: "google_ai",
+ Azure: "azure",
+ Groq: "groq",
+ Ollama: "ollama",
+ Webui: "webui",
+ WebuiLegacy: "webui-legacy",
+ Lmstudio: "lmstudio",
+ LmstudioLegacy: "lmstudio-legacy",
+ Llamacpp: "llamacpp",
+ Koboldcpp: "koboldcpp",
+ Vllm: "vllm",
+ HuggingFace: "hugging-face",
+ Mistral: "mistral",
+ Together: "together",
+} as const;
diff --git a/src/api/types/LocalSandboxConfig.ts b/src/api/types/LocalSandboxConfig.ts
new file mode 100644
index 0000000..0cfa0da
--- /dev/null
+++ b/src/api/types/LocalSandboxConfig.ts
@@ -0,0 +1,8 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface LocalSandboxConfig {
+ /** Directory for the sandbox environment. */
+ sandbox_dir: string;
+}
diff --git a/src/api/types/LogProbToken.ts b/src/api/types/LogProbToken.ts
new file mode 100644
index 0000000..456d1b6
--- /dev/null
+++ b/src/api/types/LogProbToken.ts
@@ -0,0 +1,9 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface LogProbToken {
+ token: string;
+ logprob: number;
+ bytes?: number[];
+}
diff --git a/src/api/types/Memory.ts b/src/api/types/Memory.ts
new file mode 100644
index 0000000..a6a2385
--- /dev/null
+++ b/src/api/types/Memory.ts
@@ -0,0 +1,18 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+/**
+ * Represents the in-context memory of the agent. This includes both the `Block` objects (labelled by sections), as well as tools to edit the blocks.
+ *
+ * Attributes:
+ * memory (Dict[str, Block]): Mapping from memory block section to memory block.
+ */
+export interface Memory {
+ /** Mapping from memory block section to memory block. */
+ memory?: Record;
+ /** Jinja2 template for compiling memory blocks into a prompt string */
+ prompt_template?: string;
+}
diff --git a/src/api/types/MessageContentLogProb.ts b/src/api/types/MessageContentLogProb.ts
new file mode 100644
index 0000000..1b22e4b
--- /dev/null
+++ b/src/api/types/MessageContentLogProb.ts
@@ -0,0 +1,12 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+export interface MessageContentLogProb {
+ token: string;
+ logprob: number;
+ bytes?: number[];
+ top_logprobs?: Letta.LogProbToken[];
+}
diff --git a/src/api/types/MessageCreate.ts b/src/api/types/MessageCreate.ts
new file mode 100644
index 0000000..f94268e
--- /dev/null
+++ b/src/api/types/MessageCreate.ts
@@ -0,0 +1,17 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+/**
+ * Request to create a message
+ */
+export interface MessageCreate {
+ /** The role of the participant. */
+ role: Letta.MessageCreateRole;
+ /** The text of the message. */
+ text: string;
+ /** The name of the participant. */
+ name?: string;
+}
diff --git a/src/api/types/MessageCreateRole.ts b/src/api/types/MessageCreateRole.ts
new file mode 100644
index 0000000..09f2a0d
--- /dev/null
+++ b/src/api/types/MessageCreateRole.ts
@@ -0,0 +1,13 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * The role of the participant.
+ */
+export type MessageCreateRole = "user" | "system";
+
+export const MessageCreateRole = {
+ User: "user",
+ System: "system",
+} as const;
diff --git a/src/api/types/MessageFile.ts b/src/api/types/MessageFile.ts
new file mode 100644
index 0000000..adbba24
--- /dev/null
+++ b/src/api/types/MessageFile.ts
@@ -0,0 +1,13 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface MessageFile {
+ /** The unique identifier of the file. */
+ id: string;
+ object?: string;
+ /** The unix timestamp of when the file was created. */
+ created_at: number;
+ /** The unique identifier of the message. */
+ message_id: string;
+}
diff --git a/src/api/types/MessageInput.ts b/src/api/types/MessageInput.ts
new file mode 100644
index 0000000..ab884e4
--- /dev/null
+++ b/src/api/types/MessageInput.ts
@@ -0,0 +1,43 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+/**
+ * Letta's internal representation of a message. Includes methods to convert to/from LLM provider formats.
+ *
+ * Attributes:
+ * id (str): The unique identifier of the message.
+ * role (MessageRole): The role of the participant.
+ * text (str): The text of the message.
+ * user_id (str): The unique identifier of the user.
+ * agent_id (str): The unique identifier of the agent.
+ * model (str): The model used to make the function call.
+ * name (str): The name of the participant.
+ * created_at (datetime): The time the message was created.
+ * tool_calls (List[ToolCall]): The list of tool calls requested.
+ * tool_call_id (str): The id of the tool call.
+ */
+export interface MessageInput {
+ /** The human-friendly ID of the Message */
+ id?: string;
+ /** The role of the participant. */
+ role: Letta.MessageRole;
+ /** The text of the message. */
+ text?: string;
+ /** The unique identifier of the user. */
+ user_id?: string;
+ /** The unique identifier of the agent. */
+ agent_id?: string;
+ /** The model used to make the function call. */
+ model?: string;
+ /** The name of the participant. */
+ name?: string;
+ /** The time the message was created. */
+ created_at?: string;
+ /** The list of tool calls requested. */
+ tool_calls?: Letta.LettaSchemasOpenaiChatCompletionsToolCallInput[];
+ /** The id of the tool call. */
+ tool_call_id?: string;
+}
diff --git a/src/api/types/MessageRole.ts b/src/api/types/MessageRole.ts
new file mode 100644
index 0000000..e096ed4
--- /dev/null
+++ b/src/api/types/MessageRole.ts
@@ -0,0 +1,13 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export type MessageRole = "assistant" | "user" | "tool" | "function" | "system";
+
+export const MessageRole = {
+ Assistant: "assistant",
+ User: "user",
+ Tool: "tool",
+ Function: "function",
+ System: "system",
+} as const;
diff --git a/src/api/types/ModifyMessageRequest.ts b/src/api/types/ModifyMessageRequest.ts
new file mode 100644
index 0000000..970873b
--- /dev/null
+++ b/src/api/types/ModifyMessageRequest.ts
@@ -0,0 +1,8 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface ModifyMessageRequest {
+ /** Metadata associated with the message. */
+ metadata?: Record;
+}
diff --git a/src/api/types/ModifyRunRequest.ts b/src/api/types/ModifyRunRequest.ts
new file mode 100644
index 0000000..8618434
--- /dev/null
+++ b/src/api/types/ModifyRunRequest.ts
@@ -0,0 +1,8 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface ModifyRunRequest {
+ /** Metadata associated with the run. */
+ metadata?: Record;
+}
diff --git a/src/api/types/ModifyThreadRequest.ts b/src/api/types/ModifyThreadRequest.ts
new file mode 100644
index 0000000..9e7fc78
--- /dev/null
+++ b/src/api/types/ModifyThreadRequest.ts
@@ -0,0 +1,8 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface ModifyThreadRequest {
+ /** Metadata associated with the thread. */
+ metadata?: Record;
+}
diff --git a/src/api/types/NotFoundErrorBody.ts b/src/api/types/NotFoundErrorBody.ts
new file mode 100644
index 0000000..3bf8bbd
--- /dev/null
+++ b/src/api/types/NotFoundErrorBody.ts
@@ -0,0 +1,9 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+export interface NotFoundErrorBody {
+ message: Letta.NotFoundErrorBodyMessage;
+}
diff --git a/src/api/types/NotFoundErrorBodyMessage.ts b/src/api/types/NotFoundErrorBodyMessage.ts
new file mode 100644
index 0000000..f89e9e0
--- /dev/null
+++ b/src/api/types/NotFoundErrorBodyMessage.ts
@@ -0,0 +1,13 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export type NotFoundErrorBodyMessage =
+ | "Agent provided is a template or not found, you can only migrate deployed agents"
+ | "Template version provided does not exist";
+
+export const NotFoundErrorBodyMessage = {
+ AgentProvidedIsATemplateOrNotFoundYouCanOnlyMigrateDeployedAgents:
+ "Agent provided is a template or not found, you can only migrate deployed agents",
+ TemplateVersionProvidedDoesNotExist: "Template version provided does not exist",
+} as const;
diff --git a/src/api/types/OpenAiAssistant.ts b/src/api/types/OpenAiAssistant.ts
new file mode 100644
index 0000000..14b55ed
--- /dev/null
+++ b/src/api/types/OpenAiAssistant.ts
@@ -0,0 +1,28 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * Represents an OpenAI assistant (equivalent to Letta preset)
+ */
+export interface OpenAiAssistant {
+ /** The unique identifier of the assistant. */
+ id: string;
+ /** The name of the assistant. */
+ name: string;
+ object?: string;
+ /** The description of the assistant. */
+ description?: string;
+ /** The unix timestamp of when the assistant was created. */
+ created_at: number;
+ /** The model used by the assistant. */
+ model: string;
+ /** The instructions for the assistant. */
+ instructions: string;
+ /** The tools used by the assistant. */
+ tools?: string[];
+ /** List of file IDs associated with the assistant. */
+ file_ids?: string[];
+ /** Metadata associated with the assistant. */
+ metadata?: Record;
+}
diff --git a/src/api/types/OpenAiError.ts b/src/api/types/OpenAiError.ts
new file mode 100644
index 0000000..b03b2af
--- /dev/null
+++ b/src/api/types/OpenAiError.ts
@@ -0,0 +1,10 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface OpenAiError {
+ /** The error code. */
+ code: string;
+ /** The error message. */
+ message: string;
+}
diff --git a/src/api/types/OpenAiMessage.ts b/src/api/types/OpenAiMessage.ts
new file mode 100644
index 0000000..02c0f10
--- /dev/null
+++ b/src/api/types/OpenAiMessage.ts
@@ -0,0 +1,27 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+export interface OpenAiMessage {
+ /** The unique identifier of the message. */
+ id: string;
+ object?: string;
+ /** The unix timestamp of when the message was created. */
+ created_at: number;
+ /** The unique identifier of the thread. */
+ thread_id: string;
+ /** Role of the message sender (either 'user' or 'system') */
+ role: string;
+ /** The message content to be processed by the agent. */
+ content?: Letta.OpenAiMessageContentItem[];
+ /** The unique identifier of the assistant. */
+ assistant_id: string;
+ /** The unique identifier of the run. */
+ run_id?: string;
+ /** List of file IDs associated with the message. */
+ file_ids?: string[];
+ /** Metadata associated with the message. */
+ metadata?: Record;
+}
diff --git a/src/api/types/OpenAiMessageContentItem.ts b/src/api/types/OpenAiMessageContentItem.ts
new file mode 100644
index 0000000..bcdfec9
--- /dev/null
+++ b/src/api/types/OpenAiMessageContentItem.ts
@@ -0,0 +1,7 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+export type OpenAiMessageContentItem = Letta.Text | Letta.ImageFile;
diff --git a/src/api/types/OpenAiMessageCreationStep.ts b/src/api/types/OpenAiMessageCreationStep.ts
new file mode 100644
index 0000000..c542964
--- /dev/null
+++ b/src/api/types/OpenAiMessageCreationStep.ts
@@ -0,0 +1,9 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface OpenAiMessageCreationStep {
+ type?: string;
+ /** The unique identifier of the message. */
+ message_id: string;
+}
diff --git a/src/api/types/OpenAiRun.ts b/src/api/types/OpenAiRun.ts
new file mode 100644
index 0000000..2839c8c
--- /dev/null
+++ b/src/api/types/OpenAiRun.ts
@@ -0,0 +1,45 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+export interface OpenAiRun {
+ /** The unique identifier of the run. */
+ id: string;
+ object?: string;
+ /** The unix timestamp of when the run was created. */
+ created_at: number;
+ /** The unique identifier of the thread. */
+ thread_id: string;
+ /** The unique identifier of the assistant. */
+ assistant_id: string;
+ /** The status of the run. */
+ status: string;
+ /** The required action of the run. */
+ required_action?: Letta.RequiredAction;
+ /** The last error of the run. */
+ last_error?: Letta.OpenAiError;
+ /** The unix timestamp of when the run expires. */
+ expires_at: number;
+ /** The unix timestamp of when the run started. */
+ started_at?: number;
+ /** The unix timestamp of when the run was cancelled. */
+ cancelled_at?: number;
+ /** The unix timestamp of when the run failed. */
+ failed_at?: number;
+ /** The unix timestamp of when the run completed. */
+ completed_at?: number;
+ /** The model used by the run. */
+ model: string;
+ /** The instructions for the run. */
+ instructions: string;
+ /** The tools used by the run. */
+ tools?: Letta.LettaSchemasOpenaiOpenaiToolCall[];
+ /** List of file IDs associated with the run. */
+ file_ids?: string[];
+ /** Metadata associated with the run. */
+ metadata?: Record;
+ /** The usage of the run. */
+ usage?: Letta.OpenAiUsage;
+}
diff --git a/src/api/types/OpenAiRunStep.ts b/src/api/types/OpenAiRunStep.ts
new file mode 100644
index 0000000..747c951
--- /dev/null
+++ b/src/api/types/OpenAiRunStep.ts
@@ -0,0 +1,35 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+export interface OpenAiRunStep {
+ /** The unique identifier of the run step. */
+ id: string;
+ object?: string;
+ /** The unix timestamp of when the run step was created. */
+ created_at: number;
+ /** The unique identifier of the assistant. */
+ assistant_id: string;
+ /** The unique identifier of the thread. */
+ thread_id: string;
+ /** The unique identifier of the run. */
+ run_id: string;
+ /** The type of the run step. */
+ type: string;
+ /** The status of the run step. */
+ status: string;
+ /** The step defaults. */
+ step_defaults: Letta.OpenAiRunStepStepDefaults;
+ /** The last error of the run step. */
+ last_error?: Letta.OpenAiError;
+ /** The unix timestamp of when the run step expired. */
+ expired_at?: number;
+ /** The unix timestamp of when the run failed. */
+ failed_at?: number;
+ /** The unix timestamp of when the run completed. */
+ completed_at?: number;
+ /** The usage of the run. */
+ usage?: Letta.OpenAiUsage;
+}
diff --git a/src/api/types/OpenAiRunStepStepDefaults.ts b/src/api/types/OpenAiRunStepStepDefaults.ts
new file mode 100644
index 0000000..7d002d6
--- /dev/null
+++ b/src/api/types/OpenAiRunStepStepDefaults.ts
@@ -0,0 +1,10 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+/**
+ * The step defaults.
+ */
+export type OpenAiRunStepStepDefaults = Letta.OpenAiToolCallsStep | Letta.OpenAiMessageCreationStep;
diff --git a/src/api/types/OpenAiThread.ts b/src/api/types/OpenAiThread.ts
new file mode 100644
index 0000000..e2170cb
--- /dev/null
+++ b/src/api/types/OpenAiThread.ts
@@ -0,0 +1,16 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * Represents an OpenAI thread (equivalent to Letta agent)
+ */
+export interface OpenAiThread {
+ /** The unique identifier of the thread. */
+ id: string;
+ object?: string;
+ /** The unix timestamp of when the thread was created. */
+ created_at: number;
+ /** Metadata associated with the thread. */
+ metadata?: Record;
+}
diff --git a/src/api/types/OpenAiToolCallsStep.ts b/src/api/types/OpenAiToolCallsStep.ts
new file mode 100644
index 0000000..e93fa13
--- /dev/null
+++ b/src/api/types/OpenAiToolCallsStep.ts
@@ -0,0 +1,11 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+export interface OpenAiToolCallsStep {
+ type?: string;
+ /** The tool calls. */
+ tool_calls: Letta.LettaSchemasOpenaiOpenaiToolCall[];
+}
diff --git a/src/api/types/OpenAiUsage.ts b/src/api/types/OpenAiUsage.ts
new file mode 100644
index 0000000..2dcdf1f
--- /dev/null
+++ b/src/api/types/OpenAiUsage.ts
@@ -0,0 +1,12 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface OpenAiUsage {
+ /** The number of tokens used for the run. */
+ completion_tokens: number;
+ /** The number of tokens used for the prompt. */
+ prompt_tokens: number;
+ /** The total number of tokens used for the run. */
+ total_tokens: number;
+}
diff --git a/src/api/types/Organization.ts b/src/api/types/Organization.ts
new file mode 100644
index 0000000..4e57bd3
--- /dev/null
+++ b/src/api/types/Organization.ts
@@ -0,0 +1,12 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface Organization {
+ /** The human-friendly ID of the Org */
+ id?: string;
+ /** The name of the organization. */
+ name?: string;
+ /** The creation date of the organization. */
+ created_at?: string;
+}
diff --git a/src/api/types/OrganizationCreate.ts b/src/api/types/OrganizationCreate.ts
new file mode 100644
index 0000000..dab0a2e
--- /dev/null
+++ b/src/api/types/OrganizationCreate.ts
@@ -0,0 +1,8 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface OrganizationCreate {
+ /** The name of the organization. */
+ name?: string;
+}
diff --git a/src/api/types/Passage.ts b/src/api/types/Passage.ts
new file mode 100644
index 0000000..b434d23
--- /dev/null
+++ b/src/api/types/Passage.ts
@@ -0,0 +1,41 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+/**
+ * Representation of a passage, which is stored in archival memory.
+ *
+ * Parameters:
+ * text (str): The text of the passage.
+ * embedding (List[float]): The embedding of the passage.
+ * embedding_config (EmbeddingConfig): The embedding configuration used by the passage.
+ * created_at (datetime): The creation date of the passage.
+ * user_id (str): The unique identifier of the user associated with the passage.
+ * agent_id (str): The unique identifier of the agent associated with the passage.
+ * source_id (str): The data source of the passage.
+ * file_id (str): The unique identifier of the file associated with the passage.
+ */
+export interface Passage {
+ /** The unique identifier of the user associated with the passage. */
+ user_id?: string;
+ /** The unique identifier of the agent associated with the passage. */
+ agent_id?: string;
+ /** The data source of the passage. */
+ source_id?: string;
+ /** The unique identifier of the file associated with the passage. */
+ file_id?: string;
+ /** The metadata of the passage. */
+ metadata_?: Record;
+ /** The human-friendly ID of the Passage */
+ id?: string;
+ /** The text of the passage. */
+ text: string;
+ /** The embedding of the passage. */
+ embedding?: number[];
+ /** The embedding configuration used by the passage. */
+ embedding_config?: Letta.EmbeddingConfig;
+ /** The creation date of the passage. */
+ created_at?: string;
+}
diff --git a/src/api/types/RecallMemorySummary.ts b/src/api/types/RecallMemorySummary.ts
new file mode 100644
index 0000000..1aee06d
--- /dev/null
+++ b/src/api/types/RecallMemorySummary.ts
@@ -0,0 +1,8 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface RecallMemorySummary {
+ /** Number of rows in recall memory */
+ size: number;
+}
diff --git a/src/api/types/RequiredAction.ts b/src/api/types/RequiredAction.ts
new file mode 100644
index 0000000..757b8e6
--- /dev/null
+++ b/src/api/types/RequiredAction.ts
@@ -0,0 +1,10 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+export interface RequiredAction {
+ type?: string;
+ submit_tool_outputs: Letta.LettaSchemasOpenaiOpenaiToolCall[];
+}
diff --git a/src/api/types/ResponseFormat.ts b/src/api/types/ResponseFormat.ts
new file mode 100644
index 0000000..e3df51b
--- /dev/null
+++ b/src/api/types/ResponseFormat.ts
@@ -0,0 +1,7 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface ResponseFormat {
+ type?: string;
+}
diff --git a/src/api/types/SandboxConfig.ts b/src/api/types/SandboxConfig.ts
new file mode 100644
index 0000000..03a4f82
--- /dev/null
+++ b/src/api/types/SandboxConfig.ts
@@ -0,0 +1,24 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+export interface SandboxConfig {
+ /** The id of the user that made this object. */
+ created_by_id?: string;
+ /** The id of the user that made this object. */
+ last_updated_by_id?: string;
+ /** The timestamp when the object was created. */
+ created_at?: string;
+ /** The timestamp when the object was last updated. */
+ updated_at?: string;
+ /** The human-friendly ID of the Sandbox */
+ id?: string;
+ /** The type of sandbox. */
+ type?: Letta.SandboxType;
+ /** The unique identifier of the organization associated with the sandbox. */
+ organization_id?: string;
+ /** The JSON sandbox settings data. */
+ config?: Record;
+}
diff --git a/src/api/types/SandboxConfigCreate.ts b/src/api/types/SandboxConfigCreate.ts
new file mode 100644
index 0000000..2e46624
--- /dev/null
+++ b/src/api/types/SandboxConfigCreate.ts
@@ -0,0 +1,10 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+export interface SandboxConfigCreate {
+ /** The configuration for the sandbox. */
+ config: Letta.SandboxConfigCreateConfig;
+}
diff --git a/src/api/types/SandboxConfigCreateConfig.ts b/src/api/types/SandboxConfigCreateConfig.ts
new file mode 100644
index 0000000..7ce9220
--- /dev/null
+++ b/src/api/types/SandboxConfigCreateConfig.ts
@@ -0,0 +1,10 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+/**
+ * The configuration for the sandbox.
+ */
+export type SandboxConfigCreateConfig = Letta.LocalSandboxConfig | Letta.E2BSandboxConfig;
diff --git a/src/api/types/SandboxConfigUpdate.ts b/src/api/types/SandboxConfigUpdate.ts
new file mode 100644
index 0000000..ffb121d
--- /dev/null
+++ b/src/api/types/SandboxConfigUpdate.ts
@@ -0,0 +1,13 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+/**
+ * Pydantic model for updating SandboxConfig fields.
+ */
+export interface SandboxConfigUpdate {
+ /** The JSON configuration data for the sandbox. */
+ config?: Letta.SandboxConfigUpdateConfig;
+}
diff --git a/src/api/types/SandboxConfigUpdateConfig.ts b/src/api/types/SandboxConfigUpdateConfig.ts
new file mode 100644
index 0000000..03fcf95
--- /dev/null
+++ b/src/api/types/SandboxConfigUpdateConfig.ts
@@ -0,0 +1,10 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+/**
+ * The JSON configuration data for the sandbox.
+ */
+export type SandboxConfigUpdateConfig = Letta.LocalSandboxConfig | Letta.E2BSandboxConfig;
diff --git a/src/api/types/SandboxEnvironmentVariable.ts b/src/api/types/SandboxEnvironmentVariable.ts
new file mode 100644
index 0000000..5c64f43
--- /dev/null
+++ b/src/api/types/SandboxEnvironmentVariable.ts
@@ -0,0 +1,26 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface SandboxEnvironmentVariable {
+ /** The id of the user that made this object. */
+ created_by_id?: string;
+ /** The id of the user that made this object. */
+ last_updated_by_id?: string;
+ /** The timestamp when the object was created. */
+ created_at?: string;
+ /** The timestamp when the object was last updated. */
+ updated_at?: string;
+ /** The human-friendly ID of the Sandbox-env */
+ id?: string;
+ /** The name of the environment variable. */
+ key: string;
+ /** The value of the environment variable. */
+ value: string;
+ /** An optional description of the environment variable. */
+ description?: string;
+ /** The ID of the sandbox config this environment variable belongs to. */
+ sandbox_config_id: string;
+ /** The ID of the organization this environment variable belongs to. */
+ organization_id?: string;
+}
diff --git a/src/api/types/SandboxEnvironmentVariableCreate.ts b/src/api/types/SandboxEnvironmentVariableCreate.ts
new file mode 100644
index 0000000..7df1d84
--- /dev/null
+++ b/src/api/types/SandboxEnvironmentVariableCreate.ts
@@ -0,0 +1,12 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface SandboxEnvironmentVariableCreate {
+ /** The name of the environment variable. */
+ key: string;
+ /** The value of the environment variable. */
+ value: string;
+ /** An optional description of the environment variable. */
+ description?: string;
+}
diff --git a/src/api/types/SandboxEnvironmentVariableUpdate.ts b/src/api/types/SandboxEnvironmentVariableUpdate.ts
new file mode 100644
index 0000000..db94741
--- /dev/null
+++ b/src/api/types/SandboxEnvironmentVariableUpdate.ts
@@ -0,0 +1,15 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * Pydantic model for updating SandboxEnvironmentVariable fields.
+ */
+export interface SandboxEnvironmentVariableUpdate {
+ /** The name of the environment variable. */
+ key?: string;
+ /** The value of the environment variable. */
+ value?: string;
+ /** An optional description of the environment variable. */
+ description?: string;
+}
diff --git a/src/api/types/SandboxType.ts b/src/api/types/SandboxType.ts
new file mode 100644
index 0000000..721ed03
--- /dev/null
+++ b/src/api/types/SandboxType.ts
@@ -0,0 +1,10 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export type SandboxType = "e2b" | "local";
+
+export const SandboxType = {
+ E2B: "e2b",
+ Local: "local",
+} as const;
diff --git a/src/api/types/Source.ts b/src/api/types/Source.ts
new file mode 100644
index 0000000..8fe0456
--- /dev/null
+++ b/src/api/types/Source.ts
@@ -0,0 +1,39 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+/**
+ * Representation of a source, which is a collection of files and passages.
+ *
+ * Parameters:
+ * id (str): The ID of the source
+ * name (str): The name of the source.
+ * embedding_config (EmbeddingConfig): The embedding configuration used by the source.
+ * user_id (str): The ID of the user that created the source.
+ * metadata_ (dict): Metadata associated with the source.
+ * description (str): The description of the source.
+ */
+export interface Source {
+ /** The human-friendly ID of the Source */
+ id?: string;
+ /** The name of the source. */
+ name: string;
+ /** The description of the source. */
+ description?: string;
+ /** The embedding configuration used by the source. */
+ embedding_config: Letta.EmbeddingConfig;
+ /** The ID of the organization that created the source. */
+ organization_id?: string;
+ /** Metadata associated with the source. */
+ metadata_?: Record;
+ /** The id of the user that made this Tool. */
+ created_by_id?: string;
+ /** The id of the user that made this Tool. */
+ last_updated_by_id?: string;
+ /** The timestamp when the source was created. */
+ created_at?: string;
+ /** The timestamp when the source was last updated. */
+ updated_at?: string;
+}
diff --git a/src/api/types/SubmitToolOutputsToRunRequest.ts b/src/api/types/SubmitToolOutputsToRunRequest.ts
new file mode 100644
index 0000000..de19970
--- /dev/null
+++ b/src/api/types/SubmitToolOutputsToRunRequest.ts
@@ -0,0 +1,10 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+export interface SubmitToolOutputsToRunRequest {
+ /** The tool outputs to submit. */
+ tools_outputs: Letta.ToolCallOutput[];
+}
diff --git a/src/api/types/SystemMessageInput.ts b/src/api/types/SystemMessageInput.ts
new file mode 100644
index 0000000..4c3bdfd
--- /dev/null
+++ b/src/api/types/SystemMessageInput.ts
@@ -0,0 +1,9 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface SystemMessageInput {
+ content: string;
+ role?: string;
+ name?: string;
+}
diff --git a/src/api/types/SystemMessageOutput.ts b/src/api/types/SystemMessageOutput.ts
new file mode 100644
index 0000000..a65298f
--- /dev/null
+++ b/src/api/types/SystemMessageOutput.ts
@@ -0,0 +1,17 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * A message generated by the system. Never streamed back on a response, only used for cursor pagination.
+ *
+ * Attributes:
+ * message (str): The message sent by the system
+ * id (str): The ID of the message
+ * date (datetime): The date the message was created in ISO format
+ */
+export interface SystemMessageOutput {
+ id: string;
+ date: string;
+ message: string;
+}
diff --git a/src/api/types/Text.ts b/src/api/types/Text.ts
new file mode 100644
index 0000000..dfbef09
--- /dev/null
+++ b/src/api/types/Text.ts
@@ -0,0 +1,9 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface Text {
+ object?: string;
+ /** The text content to be processed by the agent. */
+ text: string;
+}
diff --git a/src/api/types/ToolCallFunctionOutput.ts b/src/api/types/ToolCallFunctionOutput.ts
new file mode 100644
index 0000000..5a22093
--- /dev/null
+++ b/src/api/types/ToolCallFunctionOutput.ts
@@ -0,0 +1,10 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface ToolCallFunctionOutput {
+ /** The name of the function to call */
+ name: string;
+ /** The arguments to pass to the function (JSON dump) */
+ arguments: string;
+}
diff --git a/src/api/types/ToolCallOutput.ts b/src/api/types/ToolCallOutput.ts
new file mode 100644
index 0000000..8dee3f5
--- /dev/null
+++ b/src/api/types/ToolCallOutput.ts
@@ -0,0 +1,10 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface ToolCallOutput {
+ /** The unique identifier of the tool call. */
+ tool_call_id: string;
+ /** The output of the tool call. */
+ output: string;
+}
diff --git a/src/api/types/ToolCreate.ts b/src/api/types/ToolCreate.ts
new file mode 100644
index 0000000..7058346
--- /dev/null
+++ b/src/api/types/ToolCreate.ts
@@ -0,0 +1,20 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface ToolCreate {
+ /** The name of the function (auto-generated from source_code if not provided). */
+ name?: string;
+ /** The description of the tool. */
+ description?: string;
+ /** Metadata tags. */
+ tags?: string[];
+ /** The source code of the function. */
+ module?: string;
+ /** The source code of the function. */
+ source_code: string;
+ /** The source type of the function. */
+ source_type?: string;
+ /** The JSON schema of the function (auto-generated from source_code if not provided) */
+ json_schema?: Record;
+}
diff --git a/src/api/types/ToolFunctionChoice.ts b/src/api/types/ToolFunctionChoice.ts
new file mode 100644
index 0000000..19ecad7
--- /dev/null
+++ b/src/api/types/ToolFunctionChoice.ts
@@ -0,0 +1,10 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+export interface ToolFunctionChoice {
+ type?: "function";
+ function: Letta.FunctionCallInput;
+}
diff --git a/src/api/types/ToolInput.ts b/src/api/types/ToolInput.ts
new file mode 100644
index 0000000..24713b9
--- /dev/null
+++ b/src/api/types/ToolInput.ts
@@ -0,0 +1,10 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+export interface ToolInput {
+ type?: "function";
+ function: Letta.FunctionSchema;
+}
diff --git a/src/api/types/ToolMessage.ts b/src/api/types/ToolMessage.ts
new file mode 100644
index 0000000..508e4fe
--- /dev/null
+++ b/src/api/types/ToolMessage.ts
@@ -0,0 +1,9 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface ToolMessage {
+ content: string;
+ role?: string;
+ tool_call_id: string;
+}
diff --git a/src/api/types/UsageStatistics.ts b/src/api/types/UsageStatistics.ts
new file mode 100644
index 0000000..85e0569
--- /dev/null
+++ b/src/api/types/UsageStatistics.ts
@@ -0,0 +1,9 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface UsageStatistics {
+ completion_tokens?: number;
+ prompt_tokens?: number;
+ total_tokens?: number;
+}
diff --git a/src/api/types/User.ts b/src/api/types/User.ts
new file mode 100644
index 0000000..3599440
--- /dev/null
+++ b/src/api/types/User.ts
@@ -0,0 +1,26 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * Representation of a user.
+ *
+ * Parameters:
+ * id (str): The unique identifier of the user.
+ * name (str): The name of the user.
+ * created_at (datetime): The creation date of the user.
+ */
+export interface User {
+ /** The human-friendly ID of the User */
+ id?: string;
+ /** The organization id of the user */
+ organization_id?: string;
+ /** The name of the user. */
+ name: string;
+ /** The creation date of the user. */
+ created_at?: string;
+ /** The update date of the user. */
+ updated_at?: string;
+ /** Whether this user is deleted or not. */
+ is_deleted?: boolean;
+}
diff --git a/src/api/types/UserCreate.ts b/src/api/types/UserCreate.ts
new file mode 100644
index 0000000..1de3156
--- /dev/null
+++ b/src/api/types/UserCreate.ts
@@ -0,0 +1,10 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface UserCreate {
+ /** The name of the user. */
+ name: string;
+ /** The organization id of the user. */
+ organization_id: string;
+}
diff --git a/src/api/types/UserMessageInput.ts b/src/api/types/UserMessageInput.ts
new file mode 100644
index 0000000..9ccee1b
--- /dev/null
+++ b/src/api/types/UserMessageInput.ts
@@ -0,0 +1,11 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+export interface UserMessageInput {
+ content: Letta.UserMessageInputContent;
+ role?: string;
+ name?: string;
+}
diff --git a/src/api/types/UserMessageInputContent.ts b/src/api/types/UserMessageInputContent.ts
new file mode 100644
index 0000000..1814cf9
--- /dev/null
+++ b/src/api/types/UserMessageInputContent.ts
@@ -0,0 +1,5 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export type UserMessageInputContent = string | string[];
diff --git a/src/api/types/UserMessageOutput.ts b/src/api/types/UserMessageOutput.ts
new file mode 100644
index 0000000..7a1f12c
--- /dev/null
+++ b/src/api/types/UserMessageOutput.ts
@@ -0,0 +1,17 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * A message sent by the user. Never streamed back on a response, only used for cursor pagination.
+ *
+ * Attributes:
+ * message (str): The message sent by the user
+ * id (str): The ID of the message
+ * date (datetime): The date the message was created in ISO format
+ */
+export interface UserMessageOutput {
+ id: string;
+ date: string;
+ message: string;
+}
diff --git a/src/api/types/UserUpdate.ts b/src/api/types/UserUpdate.ts
new file mode 100644
index 0000000..b13fc1c
--- /dev/null
+++ b/src/api/types/UserUpdate.ts
@@ -0,0 +1,12 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export interface UserUpdate {
+ /** The id of the user to update. */
+ id: string;
+ /** The new name of the user. */
+ name?: string;
+ /** The new organization id of the user. */
+ organization_id?: string;
+}
diff --git a/src/api/types/ValidationError.ts b/src/api/types/ValidationError.ts
new file mode 100644
index 0000000..f2d9e5a
--- /dev/null
+++ b/src/api/types/ValidationError.ts
@@ -0,0 +1,11 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Letta from "../index";
+
+export interface ValidationError {
+ loc: Letta.ValidationErrorLocItem[];
+ msg: string;
+ type: string;
+}
diff --git a/src/api/types/ValidationErrorLocItem.ts b/src/api/types/ValidationErrorLocItem.ts
new file mode 100644
index 0000000..c97f7db
--- /dev/null
+++ b/src/api/types/ValidationErrorLocItem.ts
@@ -0,0 +1,5 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export type ValidationErrorLocItem = string | number;
diff --git a/src/api/types/index.ts b/src/api/types/index.ts
new file mode 100644
index 0000000..cd19407
--- /dev/null
+++ b/src/api/types/index.ts
@@ -0,0 +1,140 @@
+export * from "./NotFoundErrorBody";
+export * from "./InternalServerErrorBody";
+export * from "./NotFoundErrorBodyMessage";
+export * from "./ConflictErrorBody";
+export * from "./ApiKey";
+export * from "./ApiKeyCreate";
+export * from "./AgentState";
+export * from "./AgentType";
+export * from "./ArchivalMemorySummary";
+export * from "./AssistantFile";
+export * from "./AssistantMessageInput";
+export * from "./AssistantMessageOutput";
+export * from "./AuthRequest";
+export * from "./AuthResponse";
+export * from "./BaseToolRule";
+export * from "./Block";
+export * from "./BlockCreate";
+export * from "./ChatCompletionRequestMessagesItem";
+export * from "./ChatCompletionRequestStop";
+export * from "./ChatCompletionRequestToolChoice";
+export * from "./ChatCompletionRequestFunctionCall";
+export * from "./ChatCompletionRequest";
+export * from "./ChatCompletionResponse";
+export * from "./Choice";
+export * from "./ContextWindowOverview";
+export * from "./CreateAssistantFileRequest";
+export * from "./CreateAssistantRequest";
+export * from "./CreateMessageRequest";
+export * from "./CreateRunRequest";
+export * from "./CreateThreadRequest";
+export * from "./CreateThreadRunRequest";
+export * from "./DeleteAssistantFileResponse";
+export * from "./DeleteAssistantResponse";
+export * from "./DeleteThreadResponse";
+export * from "./E2BSandboxConfig";
+export * from "./EmbeddingConfig";
+export * from "./FileMetadata";
+export * from "./Function";
+export * from "./FunctionCallInput";
+export * from "./FunctionCallDelta";
+export * from "./FunctionCallMessageFunctionCall";
+export * from "./FunctionCallMessage";
+export * from "./FunctionReturnStatus";
+export * from "./FunctionReturn";
+export * from "./FunctionSchema";
+export * from "./HttpValidationError";
+export * from "./Health";
+export * from "./ImageFile";
+export * from "./InternalMonologue";
+export * from "./Job";
+export * from "./JobStatus";
+export * from "./LlmConfigModelEndpointType";
+export * from "./LlmConfig";
+export * from "./LettaResponseAssistantMessage";
+export * from "./LettaResponseFunctionCall";
+export * from "./LettaResponseFunctionCallDelta";
+export * from "./LettaResponseFunctionCallMessageFunctionCallZero";
+export * from "./LettaResponseFunctionCallMessageFunctionCallOne";
+export * from "./LettaResponseFunctionCallMessageFunctionCall";
+export * from "./LettaResponseFunctionCallMessage";
+export * from "./LettaResponseFunctionReturnStatus";
+export * from "./LettaResponseFunctionReturn";
+export * from "./LettaResponseInternalMonologue";
+export * from "./LettaResponseLettaUsageStatistics";
+export * from "./LettaResponseSystemMessage";
+export * from "./LettaResponseUserMessage";
+export * from "./LettaResponse";
+export * from "./LettaUsageStatistics";
+export * from "./ListMessagesResponse";
+export * from "./LocalSandboxConfig";
+export * from "./LogProbToken";
+export * from "./Memory";
+export * from "./MessageInput";
+export * from "./MessageContentLogProb";
+export * from "./MessageCreateRole";
+export * from "./MessageCreate";
+export * from "./MessageFile";
+export * from "./MessageRole";
+export * from "./ModifyMessageRequest";
+export * from "./ModifyRunRequest";
+export * from "./ModifyThreadRequest";
+export * from "./OpenAiAssistant";
+export * from "./OpenAiError";
+export * from "./OpenAiMessageContentItem";
+export * from "./OpenAiMessage";
+export * from "./OpenAiMessageCreationStep";
+export * from "./OpenAiRun";
+export * from "./OpenAiRunStepStepDefaults";
+export * from "./OpenAiRunStep";
+export * from "./OpenAiThread";
+export * from "./OpenAiToolCallsStep";
+export * from "./OpenAiUsage";
+export * from "./Organization";
+export * from "./OrganizationCreate";
+export * from "./Passage";
+export * from "./RecallMemorySummary";
+export * from "./RequiredAction";
+export * from "./ResponseFormat";
+export * from "./SandboxConfig";
+export * from "./SandboxConfigCreateConfig";
+export * from "./SandboxConfigCreate";
+export * from "./SandboxConfigUpdateConfig";
+export * from "./SandboxConfigUpdate";
+export * from "./SandboxEnvironmentVariable";
+export * from "./SandboxEnvironmentVariableCreate";
+export * from "./SandboxEnvironmentVariableUpdate";
+export * from "./SandboxType";
+export * from "./Source";
+export * from "./SubmitToolOutputsToRunRequest";
+export * from "./SystemMessageInput";
+export * from "./SystemMessageOutput";
+export * from "./Text";
+export * from "./ToolInput";
+export * from "./ToolCallFunctionOutput";
+export * from "./ToolCallOutput";
+export * from "./ToolCreate";
+export * from "./ToolFunctionChoice";
+export * from "./ToolMessage";
+export * from "./UsageStatistics";
+export * from "./User";
+export * from "./UserCreate";
+export * from "./UserMessageInputContent";
+export * from "./UserMessageInput";
+export * from "./UserMessageOutput";
+export * from "./UserUpdate";
+export * from "./ValidationErrorLocItem";
+export * from "./ValidationError";
+export * from "./LettaSchemasLettaMessageFunctionCall";
+export * from "./LettaSchemasMessageMessageOutput";
+export * from "./LettaSchemasOpenaiChatCompletionRequestTool";
+export * from "./LettaSchemasOpenaiChatCompletionRequestToolCall";
+export * from "./LettaSchemasOpenaiChatCompletionRequestToolCallFunction";
+export * from "./LettaSchemasOpenaiChatCompletionResponseFunctionCall";
+export * from "./LettaSchemasOpenaiChatCompletionResponseMessage";
+export * from "./LettaSchemasOpenaiChatCompletionResponseToolCall";
+export * from "./LettaSchemasOpenaiChatCompletionsToolCallInput";
+export * from "./LettaSchemasOpenaiChatCompletionsToolCallOutput";
+export * from "./LettaSchemasOpenaiChatCompletionsToolCallFunction";
+export * from "./LettaSchemasOpenaiOpenaiToolCall";
+export * from "./LettaSchemasToolTool";
diff --git a/src/core/api-promise/APIPromise.ts b/src/core/api-promise/APIPromise.ts
new file mode 100644
index 0000000..0dadda8
--- /dev/null
+++ b/src/core/api-promise/APIPromise.ts
@@ -0,0 +1,54 @@
+import { APIResponse } from "../fetcher/APIResponse";
+
+/**
+ * APIPromise wraps a Promise that resolves with an APIResponse.
+ * It provides convenient methods for handling both successful responses and errors.
+ *
+ * By default, when awaited, it will return just the response body data.
+ * Use the `asRaw()` method to get access to both the response data and headers.
+ *
+ * @example
+ * // Get just the response data
+ * const data = await apiPromise;
+ *
+ * // Get response with headers
+ * const { data, headers } = await apiPromise.asRaw();
+ *
+ * @template T The type of the successful response body
+ */
+export class APIPromise extends Promise {
+ constructor(
+ private readonly responsePromise: Promise>,
+ executor: (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void
+ ) {
+ super(executor);
+ }
+
+ public async asRaw(): Promise<{
+ data: T;
+ headers?: Record;
+ }> {
+ const response = await this.responsePromise;
+ if (!response.ok) {
+ throw response.error;
+ }
+ return {
+ data: response.body,
+ headers: response.headers,
+ };
+ }
+
+ public static from(responsePromise: Promise>): APIPromise {
+ return new APIPromise(responsePromise, (resolve, reject) => {
+ responsePromise
+ .then((response) => {
+ if (response.ok) {
+ resolve(response.body);
+ } else {
+ reject(response.error);
+ }
+ })
+ .catch(reject);
+ });
+ }
+}
diff --git a/src/core/api-promise/index.ts b/src/core/api-promise/index.ts
new file mode 100644
index 0000000..91b2cf0
--- /dev/null
+++ b/src/core/api-promise/index.ts
@@ -0,0 +1 @@
+export { APIPromise } from "./APIPromise";
diff --git a/src/core/auth/BasicAuth.ts b/src/core/auth/BasicAuth.ts
new file mode 100644
index 0000000..146df21
--- /dev/null
+++ b/src/core/auth/BasicAuth.ts
@@ -0,0 +1,31 @@
+import { Base64 } from "js-base64";
+
+export interface BasicAuth {
+ username: string;
+ password: string;
+}
+
+const BASIC_AUTH_HEADER_PREFIX = /^Basic /i;
+
+export const BasicAuth = {
+ toAuthorizationHeader: (basicAuth: BasicAuth | undefined): string | undefined => {
+ if (basicAuth == null) {
+ return undefined;
+ }
+ const token = Base64.encode(`${basicAuth.username}:${basicAuth.password}`);
+ return `Basic ${token}`;
+ },
+ fromAuthorizationHeader: (header: string): BasicAuth => {
+ const credentials = header.replace(BASIC_AUTH_HEADER_PREFIX, "");
+ const decoded = Base64.decode(credentials);
+ const [username, password] = decoded.split(":", 2);
+
+ if (username == null || password == null) {
+ throw new Error("Invalid basic auth");
+ }
+ return {
+ username,
+ password,
+ };
+ },
+};
diff --git a/src/core/auth/BearerToken.ts b/src/core/auth/BearerToken.ts
new file mode 100644
index 0000000..fe987fc
--- /dev/null
+++ b/src/core/auth/BearerToken.ts
@@ -0,0 +1,15 @@
+export type BearerToken = string;
+
+const BEARER_AUTH_HEADER_PREFIX = /^Bearer /i;
+
+export const BearerToken = {
+ toAuthorizationHeader: (token: BearerToken | undefined): string | undefined => {
+ if (token == null) {
+ return undefined;
+ }
+ return `Bearer ${token}`;
+ },
+ fromAuthorizationHeader: (header: string): BearerToken => {
+ return header.replace(BEARER_AUTH_HEADER_PREFIX, "").trim() as BearerToken;
+ },
+};
diff --git a/src/core/auth/index.ts b/src/core/auth/index.ts
new file mode 100644
index 0000000..ee293b3
--- /dev/null
+++ b/src/core/auth/index.ts
@@ -0,0 +1,2 @@
+export { BasicAuth } from "./BasicAuth";
+export { BearerToken } from "./BearerToken";
diff --git a/src/core/fetcher/APIResponse.ts b/src/core/fetcher/APIResponse.ts
new file mode 100644
index 0000000..3664d09
--- /dev/null
+++ b/src/core/fetcher/APIResponse.ts
@@ -0,0 +1,12 @@
+export type APIResponse = SuccessfulResponse | FailedResponse;
+
+export interface SuccessfulResponse {
+ ok: true;
+ body: T;
+ headers?: Record;
+}
+
+export interface FailedResponse {
+ ok: false;
+ error: T;
+}
diff --git a/src/core/fetcher/Fetcher.ts b/src/core/fetcher/Fetcher.ts
new file mode 100644
index 0000000..b8f2371
--- /dev/null
+++ b/src/core/fetcher/Fetcher.ts
@@ -0,0 +1,143 @@
+import { APIResponse } from "./APIResponse";
+import { createRequestUrl } from "./createRequestUrl";
+import { getFetchFn } from "./getFetchFn";
+import { getRequestBody } from "./getRequestBody";
+import { getResponseBody } from "./getResponseBody";
+import { makeRequest } from "./makeRequest";
+import { requestWithRetries } from "./requestWithRetries";
+
+export type FetchFunction = (args: Fetcher.Args) => Promise>;
+
+export declare namespace Fetcher {
+ export interface Args {
+ url: string;
+ method: string;
+ contentType?: string;
+ headers?: Record;
+ queryParameters?: Record;
+ body?: unknown;
+ timeoutMs?: number;
+ maxRetries?: number;
+ withCredentials?: boolean;
+ abortSignal?: AbortSignal;
+ requestType?: "json" | "file" | "bytes";
+ responseType?: "json" | "blob" | "sse" | "streaming" | "text" | "arrayBuffer";
+ duplex?: "half";
+ }
+
+ export type Error = FailedStatusCodeError | NonJsonError | TimeoutError | UnknownError;
+
+ export interface FailedStatusCodeError {
+ reason: "status-code";
+ statusCode: number;
+ body: unknown;
+ }
+
+ export interface NonJsonError {
+ reason: "non-json";
+ statusCode: number;
+ rawBody: string;
+ }
+
+ export interface TimeoutError {
+ reason: "timeout";
+ }
+
+ export interface UnknownError {
+ reason: "unknown";
+ errorMessage: string;
+ }
+}
+
+export async function fetcherImpl(args: Fetcher.Args): Promise> {
+ const headers: Record = {};
+ if (args.body !== undefined && args.contentType != null) {
+ headers["Content-Type"] = args.contentType;
+ }
+
+ if (args.headers != null) {
+ for (const [key, value] of Object.entries(args.headers)) {
+ if (value != null) {
+ headers[key] = value;
+ }
+ }
+ }
+
+ const url = createRequestUrl(args.url, args.queryParameters);
+ let requestBody: BodyInit | undefined = await getRequestBody({
+ body: args.body,
+ type: args.requestType === "json" ? "json" : "other",
+ });
+ const fetchFn = await getFetchFn();
+
+ try {
+ const response = await requestWithRetries(
+ async () =>
+ makeRequest(
+ fetchFn,
+ url,
+ args.method,
+ headers,
+ requestBody,
+ args.timeoutMs,
+ args.abortSignal,
+ args.withCredentials,
+ args.duplex
+ ),
+ args.maxRetries
+ );
+ let responseBody = await getResponseBody(response, args.responseType);
+
+ if (response.status >= 200 && response.status < 400) {
+ return {
+ ok: true,
+ body: responseBody as R,
+ headers: response.headers,
+ };
+ } else {
+ return {
+ ok: false,
+ error: {
+ reason: "status-code",
+ statusCode: response.status,
+ body: responseBody,
+ },
+ };
+ }
+ } catch (error) {
+ if (args.abortSignal != null && args.abortSignal.aborted) {
+ return {
+ ok: false,
+ error: {
+ reason: "unknown",
+ errorMessage: "The user aborted a request",
+ },
+ };
+ } else if (error instanceof Error && error.name === "AbortError") {
+ return {
+ ok: false,
+ error: {
+ reason: "timeout",
+ },
+ };
+ } else if (error instanceof Error) {
+ return {
+ ok: false,
+ error: {
+ reason: "unknown",
+ errorMessage: error.message,
+ },
+ };
+ }
+
+ return {
+ ok: false,
+ error: {
+ reason: "unknown",
+ errorMessage: JSON.stringify(error),
+ },
+ };
+ }
+}
+
+export const fetcher: FetchFunction = fetcherImpl;
diff --git a/src/core/fetcher/Supplier.ts b/src/core/fetcher/Supplier.ts
new file mode 100644
index 0000000..867c931
--- /dev/null
+++ b/src/core/fetcher/Supplier.ts
@@ -0,0 +1,11 @@
+export type Supplier = T | Promise | (() => T | Promise);
+
+export const Supplier = {
+ get: async (supplier: Supplier): Promise => {
+ if (typeof supplier === "function") {
+ return (supplier as () => T)();
+ } else {
+ return supplier;
+ }
+ },
+};
diff --git a/src/core/fetcher/createRequestUrl.ts b/src/core/fetcher/createRequestUrl.ts
new file mode 100644
index 0000000..9288a99
--- /dev/null
+++ b/src/core/fetcher/createRequestUrl.ts
@@ -0,0 +1,10 @@
+import qs from "qs";
+
+export function createRequestUrl(
+ baseUrl: string,
+ queryParameters?: Record
+): string {
+ return Object.keys(queryParameters ?? {}).length > 0
+ ? `${baseUrl}?${qs.stringify(queryParameters, { arrayFormat: "repeat" })}`
+ : baseUrl;
+}
diff --git a/src/core/fetcher/getFetchFn.ts b/src/core/fetcher/getFetchFn.ts
new file mode 100644
index 0000000..9fd9bfc
--- /dev/null
+++ b/src/core/fetcher/getFetchFn.ts
@@ -0,0 +1,25 @@
+import { RUNTIME } from "../runtime";
+
+/**
+ * Returns a fetch function based on the runtime
+ */
+export async function getFetchFn(): Promise {
+ // In Node.js 18+ environments, use native fetch
+ if (RUNTIME.type === "node" && RUNTIME.parsedVersion != null && RUNTIME.parsedVersion >= 18) {
+ return fetch;
+ }
+
+ // In Node.js 18 or lower environments, the SDK always uses`node-fetch`.
+ if (RUNTIME.type === "node") {
+ return (await import("node-fetch")).default as any;
+ }
+
+ // Otherwise the SDK uses global fetch if available,
+ // and falls back to node-fetch.
+ if (typeof fetch == "function") {
+ return fetch;
+ }
+
+ // Defaults to node `node-fetch` if global fetch isn't available
+ return (await import("node-fetch")).default as any;
+}
diff --git a/src/core/fetcher/getHeader.ts b/src/core/fetcher/getHeader.ts
new file mode 100644
index 0000000..50f922b
--- /dev/null
+++ b/src/core/fetcher/getHeader.ts
@@ -0,0 +1,8 @@
+export function getHeader(headers: Record, header: string): string | undefined {
+ for (const [headerKey, headerValue] of Object.entries(headers)) {
+ if (headerKey.toLowerCase() === header.toLowerCase()) {
+ return headerValue;
+ }
+ }
+ return undefined;
+}
diff --git a/src/core/fetcher/getRequestBody.ts b/src/core/fetcher/getRequestBody.ts
new file mode 100644
index 0000000..1138414
--- /dev/null
+++ b/src/core/fetcher/getRequestBody.ts
@@ -0,0 +1,14 @@
+export declare namespace GetRequestBody {
+ interface Args {
+ body: unknown;
+ type: "json" | "file" | "bytes" | "other";
+ }
+}
+
+export async function getRequestBody({ body, type }: GetRequestBody.Args): Promise {
+ if (type.includes("json")) {
+ return JSON.stringify(body);
+ } else {
+ return body as BodyInit;
+ }
+}
diff --git a/src/core/fetcher/getResponseBody.ts b/src/core/fetcher/getResponseBody.ts
new file mode 100644
index 0000000..d046e6e
--- /dev/null
+++ b/src/core/fetcher/getResponseBody.ts
@@ -0,0 +1,34 @@
+import { chooseStreamWrapper } from "./stream-wrappers/chooseStreamWrapper";
+
+export async function getResponseBody(response: Response, responseType?: string): Promise {
+ if (response.body != null && responseType === "blob") {
+ return await response.blob();
+ } else if (response.body != null && responseType === "arrayBuffer") {
+ return await response.arrayBuffer();
+ } else if (response.body != null && responseType === "sse") {
+ return response.body;
+ } else if (response.body != null && responseType === "streaming") {
+ return chooseStreamWrapper(response.body);
+ } else if (response.body != null && responseType === "text") {
+ return await response.text();
+ } else {
+ const text = await response.text();
+ if (text.length > 0) {
+ try {
+ let responseBody = JSON.parse(text);
+ return responseBody;
+ } catch (err) {
+ return {
+ ok: false,
+ error: {
+ reason: "non-json",
+ statusCode: response.status,
+ rawBody: text,
+ },
+ };
+ }
+ } else {
+ return undefined;
+ }
+ }
+}
diff --git a/src/core/fetcher/index.ts b/src/core/fetcher/index.ts
new file mode 100644
index 0000000..2d658ca
--- /dev/null
+++ b/src/core/fetcher/index.ts
@@ -0,0 +1,5 @@
+export type { APIResponse } from "./APIResponse";
+export { fetcher } from "./Fetcher";
+export type { Fetcher, FetchFunction } from "./Fetcher";
+export { getHeader } from "./getHeader";
+export { Supplier } from "./Supplier";
diff --git a/src/core/fetcher/makeRequest.ts b/src/core/fetcher/makeRequest.ts
new file mode 100644
index 0000000..8fb4bac
--- /dev/null
+++ b/src/core/fetcher/makeRequest.ts
@@ -0,0 +1,44 @@
+import { anySignal, getTimeoutSignal } from "./signals";
+
+export const makeRequest = async (
+ fetchFn: (url: string, init: RequestInit) => Promise,
+ url: string,
+ method: string,
+ headers: Record,
+ requestBody: BodyInit | undefined,
+ timeoutMs?: number,
+ abortSignal?: AbortSignal,
+ withCredentials?: boolean,
+ duplex?: "half"
+): Promise => {
+ const signals: AbortSignal[] = [];
+
+ // Add timeout signal
+ let timeoutAbortId: NodeJS.Timeout | undefined = undefined;
+ if (timeoutMs != null) {
+ const { signal, abortId } = getTimeoutSignal(timeoutMs);
+ timeoutAbortId = abortId;
+ signals.push(signal);
+ }
+
+ // Add arbitrary signal
+ if (abortSignal != null) {
+ signals.push(abortSignal);
+ }
+ let newSignals = anySignal(signals);
+ const response = await fetchFn(url, {
+ method: method,
+ headers,
+ body: requestBody,
+ signal: newSignals,
+ credentials: withCredentials ? "include" : undefined,
+ // @ts-ignore
+ duplex,
+ });
+
+ if (timeoutAbortId != null) {
+ clearTimeout(timeoutAbortId);
+ }
+
+ return response;
+};
diff --git a/src/core/fetcher/requestWithRetries.ts b/src/core/fetcher/requestWithRetries.ts
new file mode 100644
index 0000000..8d5af9d
--- /dev/null
+++ b/src/core/fetcher/requestWithRetries.ts
@@ -0,0 +1,33 @@
+const INITIAL_RETRY_DELAY = 1000; // in milliseconds
+const MAX_RETRY_DELAY = 60000; // in milliseconds
+const DEFAULT_MAX_RETRIES = 2;
+const JITTER_FACTOR = 0.2; // 20% random jitter
+
+function addJitter(delay: number): number {
+ // Generate a random value between -JITTER_FACTOR and +JITTER_FACTOR
+ const jitterMultiplier = 1 + (Math.random() * 2 - 1) * JITTER_FACTOR;
+ return delay * jitterMultiplier;
+}
+
+export async function requestWithRetries(
+ requestFn: () => Promise,
+ maxRetries: number = DEFAULT_MAX_RETRIES
+): Promise {
+ let response: Response = await requestFn();
+
+ for (let i = 0; i < maxRetries; ++i) {
+ if ([408, 409, 429].includes(response.status) || response.status >= 500) {
+ // Calculate base delay using exponential backoff (in milliseconds)
+ const baseDelay = Math.min(INITIAL_RETRY_DELAY * Math.pow(2, i), MAX_RETRY_DELAY);
+
+ // Add jitter to the delay
+ const delayWithJitter = addJitter(baseDelay);
+
+ await new Promise((resolve) => setTimeout(resolve, delayWithJitter));
+ response = await requestFn();
+ } else {
+ break;
+ }
+ }
+ return response!;
+}
diff --git a/src/core/fetcher/signals.ts b/src/core/fetcher/signals.ts
new file mode 100644
index 0000000..6c124ff
--- /dev/null
+++ b/src/core/fetcher/signals.ts
@@ -0,0 +1,38 @@
+const TIMEOUT = "timeout";
+
+export function getTimeoutSignal(timeoutMs: number): { signal: AbortSignal; abortId: NodeJS.Timeout } {
+ const controller = new AbortController();
+ const abortId = setTimeout(() => controller.abort(TIMEOUT), timeoutMs);
+ return { signal: controller.signal, abortId };
+}
+
+/**
+ * Returns an abort signal that is getting aborted when
+ * at least one of the specified abort signals is aborted.
+ *
+ * Requires at least node.js 18.
+ */
+export function anySignal(...args: AbortSignal[] | [AbortSignal[]]): AbortSignal {
+ // Allowing signals to be passed either as array
+ // of signals or as multiple arguments.
+ const signals = (args.length === 1 && Array.isArray(args[0]) ? args[0] : args);
+
+ const controller = new AbortController();
+
+ for (const signal of signals) {
+ if (signal.aborted) {
+ // Exiting early if one of the signals
+ // is already aborted.
+ controller.abort((signal as any)?.reason);
+ break;
+ }
+
+ // Listening for signals and removing the listeners
+ // when at least one symbol is aborted.
+ signal.addEventListener("abort", () => controller.abort((signal as any)?.reason), {
+ signal: controller.signal,
+ });
+ }
+
+ return controller.signal;
+}
diff --git a/src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.ts b/src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.ts
new file mode 100644
index 0000000..4d7b7d5
--- /dev/null
+++ b/src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.ts
@@ -0,0 +1,256 @@
+import type { Writable } from "readable-stream";
+import { EventCallback, StreamWrapper } from "./chooseStreamWrapper";
+
+export class Node18UniversalStreamWrapper
+ implements
+ StreamWrapper | Writable | WritableStream, ReadFormat>
+{
+ private readableStream: ReadableStream;
+ private reader: ReadableStreamDefaultReader;
+ private events: Record;
+ private paused: boolean;
+ private resumeCallback: ((value?: unknown) => void) | null;
+ private encoding: string | null;
+
+ constructor(readableStream: ReadableStream) {
+ this.readableStream = readableStream;
+ this.reader = this.readableStream.getReader();
+ this.events = {
+ data: [],
+ end: [],
+ error: [],
+ readable: [],
+ close: [],
+ pause: [],
+ resume: [],
+ };
+ this.paused = false;
+ this.resumeCallback = null;
+ this.encoding = null;
+ }
+
+ public on(event: string, callback: EventCallback): void {
+ this.events[event]?.push(callback);
+ }
+
+ public off(event: string, callback: EventCallback): void {
+ this.events[event] = this.events[event]?.filter((cb) => cb !== callback);
+ }
+
+ public pipe(
+ dest: Node18UniversalStreamWrapper | Writable | WritableStream
+ ): Node18UniversalStreamWrapper | Writable | WritableStream {
+ this.on("data", async (chunk) => {
+ if (dest instanceof Node18UniversalStreamWrapper) {
+ dest._write(chunk);
+ } else if (dest instanceof WritableStream) {
+ const writer = dest.getWriter();
+ writer.write(chunk).then(() => writer.releaseLock());
+ } else {
+ dest.write(chunk);
+ }
+ });
+
+ this.on("end", async () => {
+ if (dest instanceof Node18UniversalStreamWrapper) {
+ dest._end();
+ } else if (dest instanceof WritableStream) {
+ const writer = dest.getWriter();
+ writer.close();
+ } else {
+ dest.end();
+ }
+ });
+
+ this.on("error", async (error) => {
+ if (dest instanceof Node18UniversalStreamWrapper) {
+ dest._error(error);
+ } else if (dest instanceof WritableStream) {
+ const writer = dest.getWriter();
+ writer.abort(error);
+ } else {
+ dest.destroy(error);
+ }
+ });
+
+ this._startReading();
+
+ return dest;
+ }
+
+ public pipeTo(
+ dest: Node18UniversalStreamWrapper | Writable | WritableStream
+ ): Node18UniversalStreamWrapper | Writable | WritableStream {
+ return this.pipe(dest);
+ }
+
+ public unpipe(dest: Node18UniversalStreamWrapper | Writable | WritableStream): void {
+ this.off("data", async (chunk) => {
+ if (dest instanceof Node18UniversalStreamWrapper) {
+ dest._write(chunk);
+ } else if (dest instanceof WritableStream) {
+ const writer = dest.getWriter();
+ writer.write(chunk).then(() => writer.releaseLock());
+ } else {
+ dest.write(chunk);
+ }
+ });
+
+ this.off("end", async () => {
+ if (dest instanceof Node18UniversalStreamWrapper) {
+ dest._end();
+ } else if (dest instanceof WritableStream) {
+ const writer = dest.getWriter();
+ writer.close();
+ } else {
+ dest.end();
+ }
+ });
+
+ this.off("error", async (error) => {
+ if (dest instanceof Node18UniversalStreamWrapper) {
+ dest._error(error);
+ } else if (dest instanceof WritableStream) {
+ const writer = dest.getWriter();
+ writer.abort(error);
+ } else {
+ dest.destroy(error);
+ }
+ });
+ }
+
+ public destroy(error?: Error): void {
+ this.reader
+ .cancel(error)
+ .then(() => {
+ this._emit("close");
+ })
+ .catch((err) => {
+ this._emit("error", err);
+ });
+ }
+
+ public pause(): void {
+ this.paused = true;
+ this._emit("pause");
+ }
+
+ public resume(): void {
+ if (this.paused) {
+ this.paused = false;
+ this._emit("resume");
+ if (this.resumeCallback) {
+ this.resumeCallback();
+ this.resumeCallback = null;
+ }
+ }
+ }
+
+ public get isPaused(): boolean {
+ return this.paused;
+ }
+
+ public async read(): Promise {
+ if (this.paused) {
+ await new Promise((resolve) => {
+ this.resumeCallback = resolve;
+ });
+ }
+ const { done, value } = await this.reader.read();
+
+ if (done) {
+ return undefined;
+ }
+ return value;
+ }
+
+ public setEncoding(encoding: string): void {
+ this.encoding = encoding;
+ }
+
+ public async text(): Promise {
+ const chunks: ReadFormat[] = [];
+
+ while (true) {
+ const { done, value } = await this.reader.read();
+ if (done) {
+ break;
+ }
+ if (value) {
+ chunks.push(value);
+ }
+ }
+
+ const decoder = new TextDecoder(this.encoding || "utf-8");
+ return decoder.decode(await new Blob(chunks).arrayBuffer());
+ }
+
+ public async json(): Promise {
+ const text = await this.text();
+ return JSON.parse(text);
+ }
+
+ private _write(chunk: ReadFormat): void {
+ this._emit("data", chunk);
+ }
+
+ private _end(): void {
+ this._emit("end");
+ }
+
+ private _error(error: any): void {
+ this._emit("error", error);
+ }
+
+ private _emit(event: string, data?: any): void {
+ if (this.events[event]) {
+ for (const callback of this.events[event] || []) {
+ callback(data);
+ }
+ }
+ }
+
+ private async _startReading(): Promise {
+ try {
+ this._emit("readable");
+ while (true) {
+ if (this.paused) {
+ await new Promise((resolve) => {
+ this.resumeCallback = resolve;
+ });
+ }
+ const { done, value } = await this.reader.read();
+ if (done) {
+ this._emit("end");
+ this._emit("close");
+ break;
+ }
+ if (value) {
+ this._emit("data", value);
+ }
+ }
+ } catch (error) {
+ this._emit("error", error);
+ }
+ }
+
+ [Symbol.asyncIterator](): AsyncIterableIterator {
+ return {
+ next: async () => {
+ if (this.paused) {
+ await new Promise((resolve) => {
+ this.resumeCallback = resolve;
+ });
+ }
+ const { done, value } = await this.reader.read();
+ if (done) {
+ return { done: true, value: undefined };
+ }
+ return { done: false, value };
+ },
+ [Symbol.asyncIterator]() {
+ return this;
+ },
+ };
+ }
+}
diff --git a/src/core/fetcher/stream-wrappers/NodePre18StreamWrapper.ts b/src/core/fetcher/stream-wrappers/NodePre18StreamWrapper.ts
new file mode 100644
index 0000000..ba5f727
--- /dev/null
+++ b/src/core/fetcher/stream-wrappers/NodePre18StreamWrapper.ts
@@ -0,0 +1,106 @@
+import type { Readable, Writable } from "readable-stream";
+import { EventCallback, StreamWrapper } from "./chooseStreamWrapper";
+
+export class NodePre18StreamWrapper implements StreamWrapper {
+ private readableStream: Readable;
+ private encoding: string | undefined;
+
+ constructor(readableStream: Readable) {
+ this.readableStream = readableStream;
+ }
+
+ public on(event: string, callback: EventCallback): void {
+ this.readableStream.on(event, callback);
+ }
+
+ public off(event: string, callback: EventCallback): void {
+ this.readableStream.off(event, callback);
+ }
+
+ public pipe(dest: Writable): Writable {
+ this.readableStream.pipe(dest);
+ return dest;
+ }
+
+ public pipeTo(dest: Writable): Writable {
+ return this.pipe(dest);
+ }
+
+ public unpipe(dest?: Writable): void {
+ if (dest) {
+ this.readableStream.unpipe(dest);
+ } else {
+ this.readableStream.unpipe();
+ }
+ }
+
+ public destroy(error?: Error): void {
+ this.readableStream.destroy(error);
+ }
+
+ public pause(): void {
+ this.readableStream.pause();
+ }
+
+ public resume(): void {
+ this.readableStream.resume();
+ }
+
+ public get isPaused(): boolean {
+ return this.readableStream.isPaused();
+ }
+
+ public async read(): Promise {
+ return new Promise((resolve, reject) => {
+ const chunk = this.readableStream.read();
+ if (chunk) {
+ resolve(chunk);
+ } else {
+ this.readableStream.once("readable", () => {
+ const chunk = this.readableStream.read();
+ resolve(chunk);
+ });
+ this.readableStream.once("error", reject);
+ }
+ });
+ }
+
+ public setEncoding(encoding?: string): void {
+ this.readableStream.setEncoding(encoding as BufferEncoding);
+ this.encoding = encoding;
+ }
+
+ public async text(): Promise {
+ const chunks: Uint8Array[] = [];
+ const encoder = new TextEncoder();
+ this.readableStream.setEncoding((this.encoding || "utf-8") as BufferEncoding);
+
+ for await (const chunk of this.readableStream) {
+ chunks.push(encoder.encode(chunk));
+ }
+
+ const decoder = new TextDecoder(this.encoding || "utf-8");
+ return decoder.decode(Buffer.concat(chunks));
+ }
+
+ public async json(): Promise {
+ const text = await this.text();
+ return JSON.parse(text);
+ }
+
+ public [Symbol.asyncIterator](): AsyncIterableIterator {
+ const readableStream = this.readableStream;
+ const iterator = readableStream[Symbol.asyncIterator]();
+
+ // Create and return an async iterator that yields buffers
+ return {
+ async next(): Promise> {
+ const { value, done } = await iterator.next();
+ return { value: value as Buffer, done };
+ },
+ [Symbol.asyncIterator]() {
+ return this;
+ },
+ };
+ }
+}
diff --git a/src/core/fetcher/stream-wrappers/UndiciStreamWrapper.ts b/src/core/fetcher/stream-wrappers/UndiciStreamWrapper.ts
new file mode 100644
index 0000000..263af00
--- /dev/null
+++ b/src/core/fetcher/stream-wrappers/UndiciStreamWrapper.ts
@@ -0,0 +1,243 @@
+import { StreamWrapper } from "./chooseStreamWrapper";
+
+type EventCallback = (data?: any) => void;
+
+export class UndiciStreamWrapper
+ implements StreamWrapper | WritableStream, ReadFormat>
+{
+ private readableStream: ReadableStream;
+ private reader: ReadableStreamDefaultReader;
+ private events: Record;
+ private paused: boolean;
+ private resumeCallback: ((value?: unknown) => void) | null;
+ private encoding: string | null;
+
+ constructor(readableStream: ReadableStream) {
+ this.readableStream = readableStream;
+ this.reader = this.readableStream.getReader();
+ this.events = {
+ data: [],
+ end: [],
+ error: [],
+ readable: [],
+ close: [],
+ pause: [],
+ resume: [],
+ };
+ this.paused = false;
+ this.resumeCallback = null;
+ this.encoding = null;
+ }
+
+ public on(event: string, callback: EventCallback): void {
+ this.events[event]?.push(callback);
+ }
+
+ public off(event: string, callback: EventCallback): void {
+ this.events[event] = this.events[event]?.filter((cb) => cb !== callback);
+ }
+
+ public pipe(
+ dest: UndiciStreamWrapper | WritableStream
+ ): UndiciStreamWrapper | WritableStream {
+ this.on("data", (chunk) => {
+ if (dest instanceof UndiciStreamWrapper) {
+ dest._write(chunk);
+ } else {
+ const writer = dest.getWriter();
+ writer.write(chunk).then(() => writer.releaseLock());
+ }
+ });
+
+ this.on("end", () => {
+ if (dest instanceof UndiciStreamWrapper) {
+ dest._end();
+ } else {
+ const writer = dest.getWriter();
+ writer.close();
+ }
+ });
+
+ this.on("error", (error) => {
+ if (dest instanceof UndiciStreamWrapper) {
+ dest._error(error);
+ } else {
+ const writer = dest.getWriter();
+ writer.abort(error);
+ }
+ });
+
+ this._startReading();
+
+ return dest;
+ }
+
+ public pipeTo(
+ dest: UndiciStreamWrapper | WritableStream
+ ): UndiciStreamWrapper | WritableStream {
+ return this.pipe(dest);
+ }
+
+ public unpipe(dest: UndiciStreamWrapper | WritableStream): void {
+ this.off("data", (chunk) => {
+ if (dest instanceof UndiciStreamWrapper) {
+ dest._write(chunk);
+ } else {
+ const writer = dest.getWriter();
+ writer.write(chunk).then(() => writer.releaseLock());
+ }
+ });
+
+ this.off("end", () => {
+ if (dest instanceof UndiciStreamWrapper) {
+ dest._end();
+ } else {
+ const writer = dest.getWriter();
+ writer.close();
+ }
+ });
+
+ this.off("error", (error) => {
+ if (dest instanceof UndiciStreamWrapper) {
+ dest._error(error);
+ } else {
+ const writer = dest.getWriter();
+ writer.abort(error);
+ }
+ });
+ }
+
+ public destroy(error?: Error): void {
+ this.reader
+ .cancel(error)
+ .then(() => {
+ this._emit("close");
+ })
+ .catch((err) => {
+ this._emit("error", err);
+ });
+ }
+
+ public pause(): void {
+ this.paused = true;
+ this._emit("pause");
+ }
+
+ public resume(): void {
+ if (this.paused) {
+ this.paused = false;
+ this._emit("resume");
+ if (this.resumeCallback) {
+ this.resumeCallback();
+ this.resumeCallback = null;
+ }
+ }
+ }
+
+ public get isPaused(): boolean {
+ return this.paused;
+ }
+
+ public async read(): Promise {
+ if (this.paused) {
+ await new Promise((resolve) => {
+ this.resumeCallback = resolve;
+ });
+ }
+ const { done, value } = await this.reader.read();
+ if (done) {
+ return undefined;
+ }
+ return value;
+ }
+
+ public setEncoding(encoding: string): void {
+ this.encoding = encoding;
+ }
+
+ public async text(): Promise {
+ const chunks: BlobPart[] = [];
+
+ while (true) {
+ const { done, value } = await this.reader.read();
+ if (done) {
+ break;
+ }
+ if (value) {
+ chunks.push(value);
+ }
+ }
+
+ const decoder = new TextDecoder(this.encoding || "utf-8");
+ return decoder.decode(await new Blob(chunks).arrayBuffer());
+ }
+
+ public async json(): Promise {
+ const text = await this.text();
+ return JSON.parse(text);
+ }
+
+ private _write(chunk: ReadFormat): void {
+ this._emit("data", chunk);
+ }
+
+ private _end(): void {
+ this._emit("end");
+ }
+
+ private _error(error: any): void {
+ this._emit("error", error);
+ }
+
+ private _emit(event: string, data?: any): void {
+ if (this.events[event]) {
+ for (const callback of this.events[event] || []) {
+ callback(data);
+ }
+ }
+ }
+
+ private async _startReading(): Promise {
+ try {
+ this._emit("readable");
+ while (true) {
+ if (this.paused) {
+ await new Promise((resolve) => {
+ this.resumeCallback = resolve;
+ });
+ }
+ const { done, value } = await this.reader.read();
+ if (done) {
+ this._emit("end");
+ this._emit("close");
+ break;
+ }
+ if (value) {
+ this._emit("data", value);
+ }
+ }
+ } catch (error) {
+ this._emit("error", error);
+ }
+ }
+
+ [Symbol.asyncIterator](): AsyncIterableIterator {
+ return {
+ next: async () => {
+ if (this.paused) {
+ await new Promise((resolve) => {
+ this.resumeCallback = resolve;
+ });
+ }
+ const { done, value } = await this.reader.read();
+ if (done) {
+ return { done: true, value: undefined };
+ }
+ return { done: false, value };
+ },
+ [Symbol.asyncIterator]() {
+ return this;
+ },
+ };
+ }
+}
diff --git a/src/core/fetcher/stream-wrappers/chooseStreamWrapper.ts b/src/core/fetcher/stream-wrappers/chooseStreamWrapper.ts
new file mode 100644
index 0000000..2abd6b2
--- /dev/null
+++ b/src/core/fetcher/stream-wrappers/chooseStreamWrapper.ts
@@ -0,0 +1,33 @@
+import type { Readable } from "readable-stream";
+import { RUNTIME } from "../../runtime";
+
+export type EventCallback = (data?: any) => void;
+
+export interface StreamWrapper {
+ setEncoding(encoding?: string): void;
+ on(event: string, callback: EventCallback): void;
+ off(event: string, callback: EventCallback): void;
+ pipe(dest: WritableStream): WritableStream;
+ pipeTo(dest: WritableStream): WritableStream;
+ unpipe(dest?: WritableStream): void;
+ destroy(error?: Error): void;
+ pause(): void;
+ resume(): void;
+ get isPaused(): boolean;
+ read(): Promise;
+ text(): Promise;
+ json(): Promise;
+ [Symbol.asyncIterator](): AsyncIterableIterator;
+}
+
+export async function chooseStreamWrapper(responseBody: any): Promise>> {
+ if (RUNTIME.type === "node" && RUNTIME.parsedVersion != null && RUNTIME.parsedVersion >= 18) {
+ return new (await import("./Node18UniversalStreamWrapper")).Node18UniversalStreamWrapper(
+ responseBody as ReadableStream
+ );
+ } else if (RUNTIME.type !== "node" && typeof fetch === "function") {
+ return new (await import("./UndiciStreamWrapper")).UndiciStreamWrapper(responseBody as ReadableStream);
+ } else {
+ return new (await import("./NodePre18StreamWrapper")).NodePre18StreamWrapper(responseBody as Readable);
+ }
+}
diff --git a/src/core/form-data-utils/FormDataWrapper.ts b/src/core/form-data-utils/FormDataWrapper.ts
new file mode 100644
index 0000000..67b5ebd
--- /dev/null
+++ b/src/core/form-data-utils/FormDataWrapper.ts
@@ -0,0 +1,177 @@
+import { RUNTIME } from "../runtime";
+
+export type MaybePromise = Promise | T;
+
+interface FormDataRequest {
+ body: Body;
+ headers: Record;
+ duplex?: "half";
+}
+
+function isNamedValue(value: unknown): value is { name: string } {
+ return typeof value === "object" && value != null && "name" in value;
+}
+
+export interface CrossPlatformFormData {
+ setup(): Promise;
+
+ append(key: string, value: unknown): void;
+
+ appendFile(key: string, value: unknown, fileName?: string): Promise;
+
+ getRequest(): MaybePromise>;
+}
+
+export async function newFormData(): Promise {
+ let formdata: CrossPlatformFormData;
+ if (RUNTIME.type === "node" && RUNTIME.parsedVersion != null && RUNTIME.parsedVersion >= 18) {
+ formdata = new Node18FormData();
+ } else if (RUNTIME.type === "node") {
+ formdata = new Node16FormData();
+ } else {
+ formdata = new WebFormData();
+ }
+ await formdata.setup();
+ return formdata;
+}
+
+export type Node18FormDataFd =
+ | {
+ append(name: string, value: unknown, fileName?: string): void;
+ }
+ | undefined;
+
+/**
+ * Form Data Implementation for Node.js 18+
+ */
+export class Node18FormData implements CrossPlatformFormData {
+ private fd: Node18FormDataFd;
+
+ public async setup() {
+ this.fd = new (await import("formdata-node")).FormData();
+ }
+
+ public append(key: string, value: any): void {
+ this.fd?.append(key, value);
+ }
+
+ public async appendFile(key: string, value: unknown, fileName?: string): Promise {
+ if (fileName == null && isNamedValue(value)) {
+ fileName = value.name;
+ }
+
+ if (value instanceof Blob) {
+ this.fd?.append(key, value, fileName);
+ } else {
+ this.fd?.append(key, {
+ type: undefined,
+ name: fileName,
+ [Symbol.toStringTag]: "File",
+ stream() {
+ return value;
+ },
+ });
+ }
+ }
+
+ public async getRequest(): Promise> {
+ const encoder = new (await import("form-data-encoder")).FormDataEncoder(this.fd as any);
+ return {
+ body: (await import("readable-stream")).Readable.from(encoder),
+ headers: encoder.headers,
+ duplex: "half",
+ };
+ }
+}
+
+export type Node16FormDataFd =
+ | {
+ append(
+ name: string,
+ value: unknown,
+ options?:
+ | string
+ | {
+ header?: string | Headers;
+ knownLength?: number;
+ filename?: string;
+ filepath?: string;
+ contentType?: string;
+ }
+ ): void;
+
+ getHeaders(): Record;
+ }
+ | undefined;
+
+/**
+ * Form Data Implementation for Node.js 16-18
+ */
+export class Node16FormData implements CrossPlatformFormData {
+ private fd: Node16FormDataFd;
+
+ public async setup(): Promise {
+ this.fd = new (await import("form-data")).default();
+ }
+
+ public append(key: string, value: any): void {
+ this.fd?.append(key, value);
+ }
+
+ public async appendFile(key: string, value: unknown, fileName?: string): Promise {
+ if (fileName == null && isNamedValue(value)) {
+ fileName = value.name;
+ }
+
+ let bufferedValue;
+ if (value instanceof Blob) {
+ bufferedValue = Buffer.from(await (value as any).arrayBuffer());
+ } else {
+ bufferedValue = value;
+ }
+
+ if (fileName == null) {
+ this.fd?.append(key, bufferedValue);
+ } else {
+ this.fd?.append(key, bufferedValue, { filename: fileName });
+ }
+ }
+
+ public getRequest(): FormDataRequest {
+ return {
+ body: this.fd,
+ headers: this.fd ? this.fd.getHeaders() : {},
+ };
+ }
+}
+
+export type WebFormDataFd = { append(name: string, value: string | Blob, fileName?: string): void } | undefined;
+
+/**
+ * Form Data Implementation for Web
+ */
+export class WebFormData implements CrossPlatformFormData {
+ protected fd: WebFormDataFd;
+
+ public async setup(): Promise {
+ this.fd = new FormData();
+ }
+
+ public append(key: string, value: any): void {
+ this.fd?.append(key, value);
+ }
+
+ public async appendFile(key: string, value: any, fileName?: string): Promise {
+ if (fileName == null && isNamedValue(value)) {
+ fileName = value.name;
+ }
+ this.fd?.append(key, new Blob([value]), fileName);
+ }
+
+ public getRequest(): FormDataRequest {
+ return {
+ body: this.fd,
+ headers: {},
+ };
+ }
+}
diff --git a/src/core/form-data-utils/index.ts b/src/core/form-data-utils/index.ts
new file mode 100644
index 0000000..f210ac4
--- /dev/null
+++ b/src/core/form-data-utils/index.ts
@@ -0,0 +1 @@
+export * from "./FormDataWrapper";
diff --git a/src/core/index.ts b/src/core/index.ts
new file mode 100644
index 0000000..66440f8
--- /dev/null
+++ b/src/core/index.ts
@@ -0,0 +1,5 @@
+export * from "./fetcher";
+export * from "./auth";
+export * from "./runtime";
+export * from "./api-promise";
+export * from "./form-data-utils";
diff --git a/src/core/runtime/index.ts b/src/core/runtime/index.ts
new file mode 100644
index 0000000..5c76dbb
--- /dev/null
+++ b/src/core/runtime/index.ts
@@ -0,0 +1 @@
+export { RUNTIME } from "./runtime";
diff --git a/src/core/runtime/runtime.ts b/src/core/runtime/runtime.ts
new file mode 100644
index 0000000..4d0687e
--- /dev/null
+++ b/src/core/runtime/runtime.ts
@@ -0,0 +1,126 @@
+interface DenoGlobal {
+ version: {
+ deno: string;
+ };
+}
+
+interface BunGlobal {
+ version: string;
+}
+
+declare const Deno: DenoGlobal;
+declare const Bun: BunGlobal;
+
+/**
+ * A constant that indicates whether the environment the code is running is a Web Browser.
+ */
+const isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined";
+
+/**
+ * A constant that indicates whether the environment the code is running is a Web Worker.
+ */
+const isWebWorker =
+ typeof self === "object" &&
+ // @ts-ignore
+ typeof self?.importScripts === "function" &&
+ (self.constructor?.name === "DedicatedWorkerGlobalScope" ||
+ self.constructor?.name === "ServiceWorkerGlobalScope" ||
+ self.constructor?.name === "SharedWorkerGlobalScope");
+
+/**
+ * A constant that indicates whether the environment the code is running is Deno.
+ */
+const isDeno =
+ typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined";
+
+/**
+ * A constant that indicates whether the environment the code is running is Bun.sh.
+ */
+const isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined";
+
+/**
+ * A constant that indicates whether the environment the code is running is Node.JS.
+ */
+const isNode =
+ typeof process !== "undefined" &&
+ Boolean(process.version) &&
+ Boolean(process.versions?.node) &&
+ // Deno spoofs process.versions.node, see https://deno.land/std@0.177.0/node/process.ts?s=versions
+ !isDeno &&
+ !isBun;
+
+/**
+ * A constant that indicates whether the environment the code is running is in React-Native.
+ * https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js
+ */
+const isReactNative = typeof navigator !== "undefined" && navigator?.product === "ReactNative";
+
+/**
+ * A constant that indicates whether the environment the code is running is Cloudflare.
+ * https://developers.cloudflare.com/workers/runtime-apis/web-standards/#navigatoruseragent
+ */
+const isCloudflare = typeof globalThis !== "undefined" && globalThis?.navigator?.userAgent === "Cloudflare-Workers";
+
+/**
+ * A constant that indicates which environment and version the SDK is running in.
+ */
+export const RUNTIME: Runtime = evaluateRuntime();
+
+export interface Runtime {
+ type: "browser" | "web-worker" | "deno" | "bun" | "node" | "react-native" | "unknown" | "workerd";
+ version?: string;
+ parsedVersion?: number;
+}
+
+function evaluateRuntime(): Runtime {
+ if (isBrowser) {
+ return {
+ type: "browser",
+ version: window.navigator.userAgent,
+ };
+ }
+
+ if (isCloudflare) {
+ return {
+ type: "workerd",
+ };
+ }
+
+ if (isWebWorker) {
+ return {
+ type: "web-worker",
+ };
+ }
+
+ if (isDeno) {
+ return {
+ type: "deno",
+ version: Deno.version.deno,
+ };
+ }
+
+ if (isBun) {
+ return {
+ type: "bun",
+ version: Bun.version,
+ };
+ }
+
+ if (isNode) {
+ return {
+ type: "node",
+ version: process.versions.node,
+ parsedVersion: Number(process.versions.node.split(".")[0]),
+ };
+ }
+
+ if (isReactNative) {
+ return {
+ type: "react-native",
+ };
+ }
+
+ return {
+ type: "unknown",
+ };
+}
diff --git a/src/environments.ts b/src/environments.ts
new file mode 100644
index 0000000..5cb8daf
--- /dev/null
+++ b/src/environments.ts
@@ -0,0 +1,9 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export const LettaEnvironment = {
+ Default: "https://app.letta.com",
+} as const;
+
+export type LettaEnvironment = typeof LettaEnvironment.Default;
diff --git a/src/errors/LettaError.ts b/src/errors/LettaError.ts
new file mode 100644
index 0000000..fcbd44b
--- /dev/null
+++ b/src/errors/LettaError.ts
@@ -0,0 +1,45 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export class LettaError extends Error {
+ readonly statusCode?: number;
+ readonly body?: unknown;
+
+ constructor({ message, statusCode, body }: { message?: string; statusCode?: number; body?: unknown }) {
+ super(buildMessage({ message, statusCode, body }));
+ Object.setPrototypeOf(this, LettaError.prototype);
+ if (statusCode != null) {
+ this.statusCode = statusCode;
+ }
+
+ if (body !== undefined) {
+ this.body = body;
+ }
+ }
+}
+
+function buildMessage({
+ message,
+ statusCode,
+ body,
+}: {
+ message: string | undefined;
+ statusCode: number | undefined;
+ body: unknown | undefined;
+}): string {
+ let lines: string[] = [];
+ if (message != null) {
+ lines.push(message);
+ }
+
+ if (statusCode != null) {
+ lines.push(`Status code: ${statusCode.toString()}`);
+ }
+
+ if (body != null) {
+ lines.push(`Body: ${JSON.stringify(body, undefined, 2)}`);
+ }
+
+ return lines.join("\n");
+}
diff --git a/src/errors/LettaTimeoutError.ts b/src/errors/LettaTimeoutError.ts
new file mode 100644
index 0000000..c5261b2
--- /dev/null
+++ b/src/errors/LettaTimeoutError.ts
@@ -0,0 +1,10 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+export class LettaTimeoutError extends Error {
+ constructor(message: string) {
+ super(message);
+ Object.setPrototypeOf(this, LettaTimeoutError.prototype);
+ }
+}
diff --git a/src/errors/index.ts b/src/errors/index.ts
new file mode 100644
index 0000000..daceec9
--- /dev/null
+++ b/src/errors/index.ts
@@ -0,0 +1,2 @@
+export { LettaError } from "./LettaError";
+export { LettaTimeoutError } from "./LettaTimeoutError";
diff --git a/src/index.ts b/src/index.ts
new file mode 100644
index 0000000..5731679
--- /dev/null
+++ b/src/index.ts
@@ -0,0 +1,4 @@
+export * as Letta from "./api";
+export { LettaClient } from "./Client";
+export { LettaEnvironment } from "./environments";
+export { LettaError, LettaTimeoutError } from "./errors";
diff --git a/src/version.ts b/src/version.ts
new file mode 100644
index 0000000..ddc932e
--- /dev/null
+++ b/src/version.ts
@@ -0,0 +1 @@
+export const SDK_VERSION = "0.5.3";
diff --git a/tests/custom.test.ts b/tests/custom.test.ts
new file mode 100644
index 0000000..7f5e031
--- /dev/null
+++ b/tests/custom.test.ts
@@ -0,0 +1,13 @@
+/**
+ * This is a custom test file, if you wish to add more tests
+ * to your SDK.
+ * Be sure to mark this file in `.fernignore`.
+ *
+ * If you include example requests/responses in your fern definition,
+ * you will have tests automatically generated for you.
+ */
+describe("test", () => {
+ it("default", () => {
+ expect(true).toBe(true);
+ });
+});
diff --git a/tests/unit/auth/BasicAuth.test.ts b/tests/unit/auth/BasicAuth.test.ts
new file mode 100644
index 0000000..fc35704
--- /dev/null
+++ b/tests/unit/auth/BasicAuth.test.ts
@@ -0,0 +1,22 @@
+import { BasicAuth } from "../../../src/core/auth/BasicAuth";
+
+describe("BasicAuth", () => {
+ describe("toAuthorizationHeader", () => {
+ it("correctly converts to header", () => {
+ expect(
+ BasicAuth.toAuthorizationHeader({
+ username: "username",
+ password: "password",
+ })
+ ).toBe("Basic dXNlcm5hbWU6cGFzc3dvcmQ=");
+ });
+ });
+ describe("fromAuthorizationHeader", () => {
+ it("correctly parses header", () => {
+ expect(BasicAuth.fromAuthorizationHeader("Basic dXNlcm5hbWU6cGFzc3dvcmQ=")).toEqual({
+ username: "username",
+ password: "password",
+ });
+ });
+ });
+});
diff --git a/tests/unit/auth/BearerToken.test.ts b/tests/unit/auth/BearerToken.test.ts
new file mode 100644
index 0000000..7757b87
--- /dev/null
+++ b/tests/unit/auth/BearerToken.test.ts
@@ -0,0 +1,14 @@
+import { BearerToken } from "../../../src/core/auth/BearerToken";
+
+describe("BearerToken", () => {
+ describe("toAuthorizationHeader", () => {
+ it("correctly converts to header", () => {
+ expect(BearerToken.toAuthorizationHeader("my-token")).toBe("Bearer my-token");
+ });
+ });
+ describe("fromAuthorizationHeader", () => {
+ it("correctly parses header", () => {
+ expect(BearerToken.fromAuthorizationHeader("Bearer my-token")).toBe("my-token");
+ });
+ });
+});
diff --git a/tests/unit/fetcher/Fetcher.test.ts b/tests/unit/fetcher/Fetcher.test.ts
new file mode 100644
index 0000000..ff80421
--- /dev/null
+++ b/tests/unit/fetcher/Fetcher.test.ts
@@ -0,0 +1,73 @@
+import fs from "fs";
+import { Fetcher, fetcherImpl } from "../../../src/core/fetcher/Fetcher";
+import { join } from "path";
+
+describe("Test fetcherImpl", () => {
+ it("should handle successful request", async () => {
+ const mockArgs: Fetcher.Args = {
+ url: "https://httpbin.org/post",
+ method: "POST",
+ headers: { "X-Test": "x-test-header" },
+ body: { data: "test" },
+ contentType: "application/json",
+ requestType: "json",
+ };
+
+ global.fetch = jest.fn().mockResolvedValue({
+ ok: true,
+ status: 200,
+ text: () => Promise.resolve(JSON.stringify({ data: "test" })),
+ json: () => ({ data: "test" }),
+ });
+
+ const result = await fetcherImpl(mockArgs);
+ expect(result.ok).toBe(true);
+ if (result.ok) {
+ expect(result.body).toEqual({ data: "test" });
+ }
+
+ expect(global.fetch).toHaveBeenCalledWith(
+ "https://httpbin.org/post",
+ expect.objectContaining({
+ method: "POST",
+ headers: expect.objectContaining({ "X-Test": "x-test-header" }),
+ body: JSON.stringify({ data: "test" }),
+ })
+ );
+ });
+
+ it("should send octet stream", async () => {
+ const url = "https://httpbin.org/post/file";
+ const mockArgs: Fetcher.Args = {
+ url,
+ method: "POST",
+ headers: { "X-Test": "x-test-header" },
+ contentType: "application/octet-stream",
+ requestType: "bytes",
+ duplex: "half",
+ body: fs.createReadStream(join(__dirname, "test-file.txt")),
+ };
+
+ global.fetch = jest.fn().mockResolvedValue({
+ ok: true,
+ status: 200,
+ text: () => Promise.resolve(JSON.stringify({ data: "test" })),
+ json: () => Promise.resolve({ data: "test" }),
+ });
+
+ const result = await fetcherImpl(mockArgs);
+
+ expect(global.fetch).toHaveBeenCalledWith(
+ url,
+ expect.objectContaining({
+ method: "POST",
+ headers: expect.objectContaining({ "X-Test": "x-test-header" }),
+ body: expect.any(fs.ReadStream),
+ })
+ );
+ expect(result.ok).toBe(true);
+ if (result.ok) {
+ expect(result.body).toEqual({ data: "test" });
+ }
+ });
+});
diff --git a/tests/unit/fetcher/createRequestUrl.test.ts b/tests/unit/fetcher/createRequestUrl.test.ts
new file mode 100644
index 0000000..f2cd24b
--- /dev/null
+++ b/tests/unit/fetcher/createRequestUrl.test.ts
@@ -0,0 +1,51 @@
+import { createRequestUrl } from "../../../src/core/fetcher/createRequestUrl";
+
+describe("Test createRequestUrl", () => {
+ it("should return the base URL when no query parameters are provided", () => {
+ const baseUrl = "https://api.example.com";
+ expect(createRequestUrl(baseUrl)).toBe(baseUrl);
+ });
+
+ it("should append simple query parameters", () => {
+ const baseUrl = "https://api.example.com";
+ const queryParams = { key: "value", another: "param" };
+ expect(createRequestUrl(baseUrl, queryParams)).toBe("https://api.example.com?key=value&another=param");
+ });
+
+ it("should handle array query parameters", () => {
+ const baseUrl = "https://api.example.com";
+ const queryParams = { items: ["a", "b", "c"] };
+ expect(createRequestUrl(baseUrl, queryParams)).toBe("https://api.example.com?items=a&items=b&items=c");
+ });
+
+ it("should handle object query parameters", () => {
+ const baseUrl = "https://api.example.com";
+ const queryParams = { filter: { name: "John", age: 30 } };
+ expect(createRequestUrl(baseUrl, queryParams)).toBe(
+ "https://api.example.com?filter%5Bname%5D=John&filter%5Bage%5D=30"
+ );
+ });
+
+ it("should handle mixed types of query parameters", () => {
+ const baseUrl = "https://api.example.com";
+ const queryParams = {
+ simple: "value",
+ array: ["x", "y"],
+ object: { key: "value" },
+ };
+ expect(createRequestUrl(baseUrl, queryParams)).toBe(
+ "https://api.example.com?simple=value&array=x&array=y&object%5Bkey%5D=value"
+ );
+ });
+
+ it("should handle empty query parameters object", () => {
+ const baseUrl = "https://api.example.com";
+ expect(createRequestUrl(baseUrl, {})).toBe(baseUrl);
+ });
+
+ it("should encode special characters in query parameters", () => {
+ const baseUrl = "https://api.example.com";
+ const queryParams = { special: "a&b=c d" };
+ expect(createRequestUrl(baseUrl, queryParams)).toBe("https://api.example.com?special=a%26b%3Dc%20d");
+ });
+});
diff --git a/tests/unit/fetcher/getFetchFn.test.ts b/tests/unit/fetcher/getFetchFn.test.ts
new file mode 100644
index 0000000..9b315ad
--- /dev/null
+++ b/tests/unit/fetcher/getFetchFn.test.ts
@@ -0,0 +1,22 @@
+import { RUNTIME } from "../../../src/core/runtime";
+import { getFetchFn } from "../../../src/core/fetcher/getFetchFn";
+
+describe("Test for getFetchFn", () => {
+ it("should get node-fetch function", async () => {
+ if (RUNTIME.type == "node") {
+ if (RUNTIME.parsedVersion != null && RUNTIME.parsedVersion >= 18) {
+ expect(await getFetchFn()).toBe(fetch);
+ } else {
+ expect(await getFetchFn()).toEqual((await import("node-fetch")).default as any);
+ }
+ }
+ });
+
+ it("should get fetch function", async () => {
+ if (RUNTIME.type == "browser") {
+ const fetchFn = await getFetchFn();
+ expect(typeof fetchFn).toBe("function");
+ expect(fetchFn.name).toBe("fetch");
+ }
+ });
+});
diff --git a/tests/unit/fetcher/getRequestBody.test.ts b/tests/unit/fetcher/getRequestBody.test.ts
new file mode 100644
index 0000000..919604c
--- /dev/null
+++ b/tests/unit/fetcher/getRequestBody.test.ts
@@ -0,0 +1,77 @@
+import { RUNTIME } from "../../../src/core/runtime";
+import { getRequestBody } from "../../../src/core/fetcher/getRequestBody";
+
+describe("Test getRequestBody", () => {
+ it("should return FormData as is in Node environment", async () => {
+ if (RUNTIME.type === "node") {
+ const formData = new (await import("formdata-node")).FormData();
+ formData.append("key", "value");
+ const result = await getRequestBody({
+ body: formData,
+ type: "file",
+ });
+ expect(result).toBe(formData);
+ }
+ });
+
+ it("should stringify body if not FormData in Node environment", async () => {
+ if (RUNTIME.type === "node") {
+ const body = { key: "value" };
+ const result = await getRequestBody({
+ body,
+ type: "json",
+ });
+ expect(result).toBe('{"key":"value"}');
+ }
+ });
+
+ it("should return FormData in browser environment", async () => {
+ if (RUNTIME.type === "browser") {
+ const formData = new (await import("form-data")).default();
+ formData.append("key", "value");
+ const result = await getRequestBody({
+ body: formData,
+ type: "file",
+ });
+ expect(result).toBe(formData);
+ }
+ });
+
+ it("should stringify body if not FormData in browser environment", async () => {
+ if (RUNTIME.type === "browser") {
+ const body = { key: "value" };
+ const result = await getRequestBody({
+ body,
+ type: "json",
+ });
+ expect(result).toBe('{"key":"value"}');
+ }
+ });
+
+ it("should return the Uint8Array", async () => {
+ const input = new Uint8Array([1, 2, 3]);
+ const result = await getRequestBody({
+ body: input,
+ type: "bytes",
+ });
+ expect(result).toBe(input);
+ });
+
+ it("should return the input for content-type 'application/x-www-form-urlencoded'", async () => {
+ const input = "key=value&another=param";
+ const result = await getRequestBody({
+ body: input,
+ type: "other",
+ });
+ expect(result).toBe(input);
+ });
+
+ it("should JSON stringify objects", async () => {
+ const input = { key: "value" };
+ const result = await getRequestBody({
+ body: input,
+ type: "json",
+ });
+ expect(result).toBe('{"key":"value"}');
+ });
+});
diff --git a/tests/unit/fetcher/getResponseBody.test.ts b/tests/unit/fetcher/getResponseBody.test.ts
new file mode 100644
index 0000000..1030c51
--- /dev/null
+++ b/tests/unit/fetcher/getResponseBody.test.ts
@@ -0,0 +1,64 @@
+import { RUNTIME } from "../../../src/core/runtime";
+import { getResponseBody } from "../../../src/core/fetcher/getResponseBody";
+import { chooseStreamWrapper } from "../../../src/core/fetcher/stream-wrappers/chooseStreamWrapper";
+
+describe("Test getResponseBody", () => {
+ it("should handle blob response type", async () => {
+ const mockBlob = new Blob(["test"], { type: "text/plain" });
+ const mockResponse = new Response(mockBlob);
+ const result = await getResponseBody(mockResponse, "blob");
+ // @ts-expect-error
+ expect(result.constructor.name).toBe("Blob");
+ });
+
+ it("should handle sse response type", async () => {
+ if (RUNTIME.type === "node") {
+ const mockStream = new ReadableStream();
+ const mockResponse = new Response(mockStream);
+ const result = await getResponseBody(mockResponse, "sse");
+ expect(result).toBe(mockStream);
+ }
+ });
+
+ it("should handle streaming response type", async () => {
+ if (RUNTIME.type === "node") {
+ const mockStream = new ReadableStream();
+ const mockResponse = new Response(mockStream);
+ const result = await getResponseBody(mockResponse, "streaming");
+ // need to reinstantiate string as a result of locked state in Readable Stream after registration with Response
+ expect(JSON.stringify(result)).toBe(JSON.stringify(await chooseStreamWrapper(new ReadableStream())));
+ }
+ });
+
+ it("should handle text response type", async () => {
+ const mockResponse = new Response("test text");
+ const result = await getResponseBody(mockResponse, "text");
+ expect(result).toBe("test text");
+ });
+
+ it("should handle JSON response", async () => {
+ const mockJson = { key: "value" };
+ const mockResponse = new Response(JSON.stringify(mockJson));
+ const result = await getResponseBody(mockResponse);
+ expect(result).toEqual(mockJson);
+ });
+
+ it("should handle empty response", async () => {
+ const mockResponse = new Response("");
+ const result = await getResponseBody(mockResponse);
+ expect(result).toBeUndefined();
+ });
+
+ it("should handle non-JSON response", async () => {
+ const mockResponse = new Response("invalid json");
+ const result = await getResponseBody(mockResponse);
+ expect(result).toEqual({
+ ok: false,
+ error: {
+ reason: "non-json",
+ statusCode: 200,
+ rawBody: "invalid json",
+ },
+ });
+ });
+});
diff --git a/tests/unit/fetcher/makeRequest.test.ts b/tests/unit/fetcher/makeRequest.test.ts
new file mode 100644
index 0000000..be94ab4
--- /dev/null
+++ b/tests/unit/fetcher/makeRequest.test.ts
@@ -0,0 +1,54 @@
+import { RUNTIME } from "../../../src/core/runtime";
+import { makeRequest } from "../../../src/core/fetcher/makeRequest";
+
+describe("Test makeRequest", () => {
+ const mockPostUrl = "https://httpbin.org/post";
+ const mockGetUrl = "https://httpbin.org/get";
+ const mockHeaders = { "Content-Type": "application/json" };
+ const mockBody = JSON.stringify({ key: "value" });
+
+ let mockFetch: jest.Mock;
+
+ beforeEach(() => {
+ mockFetch = jest.fn();
+ mockFetch.mockResolvedValue(new Response(JSON.stringify({ test: "successful" }), { status: 200 }));
+ });
+
+ it("should handle POST request correctly", async () => {
+ const response = await makeRequest(mockFetch, mockPostUrl, "POST", mockHeaders, mockBody);
+ const responseBody = await response.json();
+ expect(responseBody).toEqual({ test: "successful" });
+ expect(mockFetch).toHaveBeenCalledTimes(1);
+ const [calledUrl, calledOptions] = mockFetch.mock.calls[0];
+ expect(calledUrl).toBe(mockPostUrl);
+ expect(calledOptions).toEqual(
+ expect.objectContaining({
+ method: "POST",
+ headers: mockHeaders,
+ body: mockBody,
+ credentials: undefined,
+ })
+ );
+ expect(calledOptions.signal).toBeDefined();
+ expect(calledOptions.signal).toBeInstanceOf(AbortSignal);
+ });
+
+ it("should handle GET request correctly", async () => {
+ const response = await makeRequest(mockFetch, mockGetUrl, "GET", mockHeaders, undefined);
+ const responseBody = await response.json();
+ expect(responseBody).toEqual({ test: "successful" });
+ expect(mockFetch).toHaveBeenCalledTimes(1);
+ const [calledUrl, calledOptions] = mockFetch.mock.calls[0];
+ expect(calledUrl).toBe(mockGetUrl);
+ expect(calledOptions).toEqual(
+ expect.objectContaining({
+ method: "GET",
+ headers: mockHeaders,
+ body: undefined,
+ credentials: undefined,
+ })
+ );
+ expect(calledOptions.signal).toBeDefined();
+ expect(calledOptions.signal).toBeInstanceOf(AbortSignal);
+ });
+});
diff --git a/tests/unit/fetcher/requestWithRetries.test.ts b/tests/unit/fetcher/requestWithRetries.test.ts
new file mode 100644
index 0000000..6f77f09
--- /dev/null
+++ b/tests/unit/fetcher/requestWithRetries.test.ts
@@ -0,0 +1,133 @@
+import { RUNTIME } from "../../../src/core/runtime";
+import { requestWithRetries } from "../../../src/core/fetcher/requestWithRetries";
+
+describe("requestWithRetries", () => {
+ let mockFetch: jest.Mock;
+ let originalMathRandom: typeof Math.random;
+ let setTimeoutSpy: jest.SpyInstance;
+
+ beforeEach(() => {
+ mockFetch = jest.fn();
+ originalMathRandom = Math.random;
+
+ // Mock Math.random for consistent jitter
+ Math.random = jest.fn(() => 0.5);
+
+ jest.useFakeTimers({ doNotFake: ["nextTick"] });
+ });
+
+ afterEach(() => {
+ Math.random = originalMathRandom;
+ jest.clearAllMocks();
+ jest.clearAllTimers();
+ });
+
+ it("should retry on retryable status codes", async () => {
+ setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback) => {
+ process.nextTick(callback);
+ return null as any;
+ });
+
+ const retryableStatuses = [408, 409, 429, 500, 502];
+ let callCount = 0;
+
+ mockFetch.mockImplementation(async () => {
+ if (callCount < retryableStatuses.length) {
+ return new Response("", { status: retryableStatuses[callCount++] });
+ }
+ return new Response("", { status: 200 });
+ });
+
+ const responsePromise = requestWithRetries(() => mockFetch(), retryableStatuses.length);
+ await jest.runAllTimersAsync();
+ const response = await responsePromise;
+
+ expect(mockFetch).toHaveBeenCalledTimes(retryableStatuses.length + 1);
+ expect(response.status).toBe(200);
+ });
+
+ it("should respect maxRetries limit", async () => {
+ setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback) => {
+ process.nextTick(callback);
+ return null as any;
+ });
+
+ const maxRetries = 2;
+ mockFetch.mockResolvedValue(new Response("", { status: 500 }));
+
+ const responsePromise = requestWithRetries(() => mockFetch(), maxRetries);
+ await jest.runAllTimersAsync();
+ const response = await responsePromise;
+
+ expect(mockFetch).toHaveBeenCalledTimes(maxRetries + 1);
+ expect(response.status).toBe(500);
+ });
+
+ it("should not retry on success status codes", async () => {
+ setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback) => {
+ process.nextTick(callback);
+ return null as any;
+ });
+
+ const successStatuses = [200, 201, 202];
+
+ for (const status of successStatuses) {
+ mockFetch.mockReset();
+ setTimeoutSpy.mockClear();
+ mockFetch.mockResolvedValueOnce(new Response("", { status }));
+
+ const responsePromise = requestWithRetries(() => mockFetch(), 3);
+ await jest.runAllTimersAsync();
+ await responsePromise;
+
+ expect(mockFetch).toHaveBeenCalledTimes(1);
+ expect(setTimeoutSpy).not.toHaveBeenCalled();
+ }
+ });
+
+ it("should apply correct exponential backoff with jitter", async () => {
+ setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback) => {
+ process.nextTick(callback);
+ return null as any;
+ });
+
+ mockFetch.mockResolvedValue(new Response("", { status: 500 }));
+ const maxRetries = 3;
+ const expectedDelays = [1000, 2000, 4000];
+
+ const responsePromise = requestWithRetries(() => mockFetch(), maxRetries);
+ await jest.runAllTimersAsync();
+ await responsePromise;
+
+ // Verify setTimeout calls
+ expect(setTimeoutSpy).toHaveBeenCalledTimes(expectedDelays.length);
+
+ expectedDelays.forEach((delay, index) => {
+ expect(setTimeoutSpy).toHaveBeenNthCalledWith(index + 1, expect.any(Function), delay);
+ });
+
+ expect(mockFetch).toHaveBeenCalledTimes(maxRetries + 1);
+ });
+
+ it("should handle concurrent retries independently", async () => {
+ setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback) => {
+ process.nextTick(callback);
+ return null as any;
+ });
+
+ mockFetch
+ .mockResolvedValueOnce(new Response("", { status: 500 }))
+ .mockResolvedValueOnce(new Response("", { status: 500 }))
+ .mockResolvedValueOnce(new Response("", { status: 200 }))
+ .mockResolvedValueOnce(new Response("", { status: 200 }));
+
+ const promise1 = requestWithRetries(() => mockFetch(), 1);
+ const promise2 = requestWithRetries(() => mockFetch(), 1);
+
+ await jest.runAllTimersAsync();
+ const [response1, response2] = await Promise.all([promise1, promise2]);
+
+ expect(response1.status).toBe(200);
+ expect(response2.status).toBe(200);
+ });
+});
diff --git a/tests/unit/fetcher/signals.test.ts b/tests/unit/fetcher/signals.test.ts
new file mode 100644
index 0000000..9cabfa0
--- /dev/null
+++ b/tests/unit/fetcher/signals.test.ts
@@ -0,0 +1,69 @@
+import { anySignal, getTimeoutSignal } from "../../../src/core/fetcher/signals";
+
+describe("Test getTimeoutSignal", () => {
+ beforeEach(() => {
+ jest.useFakeTimers();
+ });
+
+ afterEach(() => {
+ jest.useRealTimers();
+ });
+
+ it("should return an object with signal and abortId", () => {
+ const { signal, abortId } = getTimeoutSignal(1000);
+
+ expect(signal).toBeDefined();
+ expect(abortId).toBeDefined();
+ expect(signal).toBeInstanceOf(AbortSignal);
+ expect(signal.aborted).toBe(false);
+ });
+
+ it("should create a signal that aborts after the specified timeout", () => {
+ const timeoutMs = 5000;
+ const { signal } = getTimeoutSignal(timeoutMs);
+
+ expect(signal.aborted).toBe(false);
+
+ jest.advanceTimersByTime(timeoutMs - 1);
+ expect(signal.aborted).toBe(false);
+
+ jest.advanceTimersByTime(1);
+ expect(signal.aborted).toBe(true);
+ });
+});
+
+describe("Test anySignal", () => {
+ it("should return an AbortSignal", () => {
+ const signal = anySignal(new AbortController().signal);
+ expect(signal).toBeInstanceOf(AbortSignal);
+ });
+
+ it("should abort when any of the input signals is aborted", () => {
+ const controller1 = new AbortController();
+ const controller2 = new AbortController();
+ const signal = anySignal(controller1.signal, controller2.signal);
+
+ expect(signal.aborted).toBe(false);
+ controller1.abort();
+ expect(signal.aborted).toBe(true);
+ });
+
+ it("should handle an array of signals", () => {
+ const controller1 = new AbortController();
+ const controller2 = new AbortController();
+ const signal = anySignal([controller1.signal, controller2.signal]);
+
+ expect(signal.aborted).toBe(false);
+ controller2.abort();
+ expect(signal.aborted).toBe(true);
+ });
+
+ it("should abort immediately if one of the input signals is already aborted", () => {
+ const controller1 = new AbortController();
+ const controller2 = new AbortController();
+ controller1.abort();
+
+ const signal = anySignal(controller1.signal, controller2.signal);
+ expect(signal.aborted).toBe(true);
+ });
+});
diff --git a/tests/unit/fetcher/stream-wrappers/Node18UniversalStreamWrapper.test.ts b/tests/unit/fetcher/stream-wrappers/Node18UniversalStreamWrapper.test.ts
new file mode 100644
index 0000000..1dc9be0
--- /dev/null
+++ b/tests/unit/fetcher/stream-wrappers/Node18UniversalStreamWrapper.test.ts
@@ -0,0 +1,178 @@
+import { Node18UniversalStreamWrapper } from "../../../../src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper";
+
+describe("Node18UniversalStreamWrapper", () => {
+ it("should set encoding to utf-8", async () => {
+ const rawStream = new ReadableStream();
+ const stream = new Node18UniversalStreamWrapper(rawStream);
+ const setEncodingSpy = jest.spyOn(stream, "setEncoding");
+
+ stream.setEncoding("utf-8");
+
+ expect(setEncodingSpy).toHaveBeenCalledWith("utf-8");
+ });
+
+ it("should register an event listener for readable", async () => {
+ const rawStream = new ReadableStream();
+ const stream = new Node18UniversalStreamWrapper(rawStream);
+ const onSpy = jest.spyOn(stream, "on");
+
+ stream.on("readable", () => {});
+
+ expect(onSpy).toHaveBeenCalledWith("readable", expect.any(Function));
+ });
+
+ it("should remove an event listener for data", async () => {
+ const rawStream = new ReadableStream();
+ const stream = new Node18UniversalStreamWrapper(rawStream);
+ const offSpy = jest.spyOn(stream, "off");
+
+ const fn = () => {};
+ stream.on("data", fn);
+ stream.off("data", fn);
+
+ expect(offSpy).toHaveBeenCalledWith("data", expect.any(Function));
+ });
+
+ it("should write to dest when calling pipe to writable stream", async () => {
+ const rawStream = new ReadableStream({
+ start(controller) {
+ controller.enqueue(new TextEncoder().encode("test"));
+ controller.enqueue(new TextEncoder().encode("test"));
+ controller.close();
+ },
+ });
+ const stream = new Node18UniversalStreamWrapper(rawStream);
+ const dest = new WritableStream({
+ write(chunk) {
+ expect(chunk).toEqual(new TextEncoder().encode("test"));
+ },
+ });
+
+ stream.pipe(dest);
+ });
+
+ it("should write to dest when calling pipe to node writable stream", async () => {
+ const rawStream = new ReadableStream({
+ start(controller) {
+ controller.enqueue(new TextEncoder().encode("test"));
+ controller.enqueue(new TextEncoder().encode("test"));
+ controller.close();
+ },
+ });
+ const stream = new Node18UniversalStreamWrapper(rawStream);
+ const dest = new (await import("readable-stream")).Writable({
+ write(chunk, encoding, callback) {
+ expect(chunk.toString()).toEqual("test");
+ callback();
+ },
+ });
+
+ stream.pipe(dest);
+ });
+
+ it("should write nothing when calling pipe and unpipe", async () => {
+ const rawStream = new ReadableStream({
+ start(controller) {
+ controller.enqueue(new TextEncoder().encode("test"));
+ controller.enqueue(new TextEncoder().encode("test"));
+ controller.close();
+ },
+ });
+ const stream = new Node18UniversalStreamWrapper(rawStream);
+ const buffer: Uint8Array[] = [];
+ const dest = new WritableStream({
+ write(chunk) {
+ buffer.push(chunk);
+ },
+ });
+
+ stream.pipe(dest);
+ stream.unpipe(dest);
+ expect(buffer).toEqual([]);
+ });
+
+ it("should destroy the stream", async () => {
+ const rawStream = new ReadableStream();
+ const stream = new Node18UniversalStreamWrapper(rawStream);
+ const destroySpy = jest.spyOn(stream, "destroy");
+
+ stream.destroy();
+
+ expect(destroySpy).toHaveBeenCalled();
+ });
+
+ it("should pause and resume the stream", async () => {
+ const rawStream = new ReadableStream();
+ const stream = new Node18UniversalStreamWrapper(rawStream);
+ const pauseSpy = jest.spyOn(stream, "pause");
+ const resumeSpy = jest.spyOn(stream, "resume");
+
+ expect(stream.isPaused).toBe(false);
+ stream.pause();
+ expect(stream.isPaused).toBe(true);
+ stream.resume();
+
+ expect(pauseSpy).toHaveBeenCalled();
+ expect(resumeSpy).toHaveBeenCalled();
+ });
+
+ it("should read the stream", async () => {
+ const rawStream = new ReadableStream({
+ start(controller) {
+ controller.enqueue(new TextEncoder().encode("test"));
+ controller.enqueue(new TextEncoder().encode("test"));
+ controller.close();
+ },
+ });
+ const stream = new Node18UniversalStreamWrapper(rawStream);
+
+ expect(await stream.read()).toEqual(new TextEncoder().encode("test"));
+ expect(await stream.read()).toEqual(new TextEncoder().encode("test"));
+ });
+
+ it("should read the stream as text", async () => {
+ const rawStream = new ReadableStream({
+ start(controller) {
+ controller.enqueue(new TextEncoder().encode("test"));
+ controller.enqueue(new TextEncoder().encode("test"));
+ controller.close();
+ },
+ });
+ const stream = new Node18UniversalStreamWrapper(rawStream);
+
+ const data = await stream.text();
+
+ expect(data).toEqual("testtest");
+ });
+
+ it("should read the stream as json", async () => {
+ const rawStream = new ReadableStream({
+ start(controller) {
+ controller.enqueue(new TextEncoder().encode(JSON.stringify({ test: "test" })));
+ controller.close();
+ },
+ });
+ const stream = new Node18UniversalStreamWrapper(rawStream);
+
+ const data = await stream.json();
+
+ expect(data).toEqual({ test: "test" });
+ });
+
+ it("should allow use with async iteratable stream", async () => {
+ const rawStream = new ReadableStream({
+ start(controller) {
+ controller.enqueue(new TextEncoder().encode("test"));
+ controller.enqueue(new TextEncoder().encode("test"));
+ controller.close();
+ },
+ });
+ let data = "";
+ const stream = new Node18UniversalStreamWrapper(rawStream);
+ for await (const chunk of stream) {
+ data += new TextDecoder().decode(chunk);
+ }
+
+ expect(data).toEqual("testtest");
+ });
+});
diff --git a/tests/unit/fetcher/stream-wrappers/NodePre18StreamWrapper.test.ts b/tests/unit/fetcher/stream-wrappers/NodePre18StreamWrapper.test.ts
new file mode 100644
index 0000000..0c99d3b
--- /dev/null
+++ b/tests/unit/fetcher/stream-wrappers/NodePre18StreamWrapper.test.ts
@@ -0,0 +1,124 @@
+import { NodePre18StreamWrapper } from "../../../../src/core/fetcher/stream-wrappers/NodePre18StreamWrapper";
+
+describe("NodePre18StreamWrapper", () => {
+ it("should set encoding to utf-8", async () => {
+ const rawStream = (await import("readable-stream")).Readable.from(["test", "test"]);
+ const stream = new NodePre18StreamWrapper(rawStream);
+ const setEncodingSpy = jest.spyOn(stream, "setEncoding");
+
+ stream.setEncoding("utf-8");
+
+ expect(setEncodingSpy).toHaveBeenCalledWith("utf-8");
+ });
+
+ it("should register an event listener for readable", async () => {
+ const rawStream = (await import("readable-stream")).Readable.from(["test", "test"]);
+ const stream = new NodePre18StreamWrapper(rawStream);
+ const onSpy = jest.spyOn(stream, "on");
+
+ stream.on("readable", () => {});
+
+ expect(onSpy).toHaveBeenCalledWith("readable", expect.any(Function));
+ });
+
+ it("should remove an event listener for data", async () => {
+ const rawStream = (await import("readable-stream")).Readable.from(["test", "test"]);
+ const stream = new NodePre18StreamWrapper(rawStream);
+ const offSpy = jest.spyOn(stream, "off");
+
+ const fn = () => {};
+ stream.on("data", fn);
+ stream.off("data", fn);
+
+ expect(offSpy).toHaveBeenCalledWith("data", expect.any(Function));
+ });
+
+ it("should write to dest when calling pipe to node writable stream", async () => {
+ const rawStream = (await import("readable-stream")).Readable.from(["test", "test"]);
+ const stream = new NodePre18StreamWrapper(rawStream);
+ const dest = new (await import("readable-stream")).Writable({
+ write(chunk, encoding, callback) {
+ expect(chunk.toString()).toEqual("test");
+ callback();
+ },
+ });
+
+ stream.pipe(dest);
+ });
+
+ it("should write nothing when calling pipe and unpipe", async () => {
+ const rawStream = (await import("readable-stream")).Readable.from(["test", "test"]);
+ const stream = new NodePre18StreamWrapper(rawStream);
+ const buffer: Uint8Array[] = [];
+ const dest = new (await import("readable-stream")).Writable({
+ write(chunk, encoding, callback) {
+ buffer.push(chunk);
+ callback();
+ },
+ });
+ stream.pipe(dest);
+ stream.unpipe();
+
+ expect(buffer).toEqual([]);
+ });
+
+ it("should destroy the stream", async () => {
+ const rawStream = (await import("readable-stream")).Readable.from(["test", "test"]);
+ const stream = new NodePre18StreamWrapper(rawStream);
+ const destroySpy = jest.spyOn(stream, "destroy");
+
+ stream.destroy();
+
+ expect(destroySpy).toHaveBeenCalledWith();
+ });
+
+ it("should pause the stream and resume", async () => {
+ const rawStream = (await import("readable-stream")).Readable.from(["test", "test"]);
+ const stream = new NodePre18StreamWrapper(rawStream);
+ const pauseSpy = jest.spyOn(stream, "pause");
+
+ stream.pause();
+ expect(stream.isPaused).toBe(true);
+ stream.resume();
+ expect(stream.isPaused).toBe(false);
+
+ expect(pauseSpy).toHaveBeenCalledWith();
+ });
+
+ it("should read the stream", async () => {
+ const rawStream = (await import("readable-stream")).Readable.from(["test", "test"]);
+ const stream = new NodePre18StreamWrapper(rawStream);
+
+ expect(await stream.read()).toEqual("test");
+ expect(await stream.read()).toEqual("test");
+ });
+
+ it("should read the stream as text", async () => {
+ const rawStream = (await import("readable-stream")).Readable.from(["test", "test"]);
+ const stream = new NodePre18StreamWrapper(rawStream);
+
+ const data = await stream.text();
+
+ expect(data).toEqual("testtest");
+ });
+
+ it("should read the stream as json", async () => {
+ const rawStream = (await import("readable-stream")).Readable.from([JSON.stringify({ test: "test" })]);
+ const stream = new NodePre18StreamWrapper(rawStream);
+
+ const data = await stream.json();
+
+ expect(data).toEqual({ test: "test" });
+ });
+
+ it("should allow use with async iteratable stream", async () => {
+ const rawStream = (await import("readable-stream")).Readable.from(["test", "test"]);
+ let data = "";
+ const stream = new NodePre18StreamWrapper(rawStream);
+ for await (const chunk of stream) {
+ data += chunk;
+ }
+
+ expect(data).toEqual("testtest");
+ });
+});
diff --git a/tests/unit/fetcher/stream-wrappers/UndiciStreamWrapper.test.ts b/tests/unit/fetcher/stream-wrappers/UndiciStreamWrapper.test.ts
new file mode 100644
index 0000000..1d171ce
--- /dev/null
+++ b/tests/unit/fetcher/stream-wrappers/UndiciStreamWrapper.test.ts
@@ -0,0 +1,153 @@
+import { UndiciStreamWrapper } from "../../../../src/core/fetcher/stream-wrappers/UndiciStreamWrapper";
+
+describe("UndiciStreamWrapper", () => {
+ it("should set encoding to utf-8", async () => {
+ const rawStream = new ReadableStream();
+ const stream = new UndiciStreamWrapper(rawStream);
+ const setEncodingSpy = jest.spyOn(stream, "setEncoding");
+
+ stream.setEncoding("utf-8");
+
+ expect(setEncodingSpy).toHaveBeenCalledWith("utf-8");
+ });
+
+ it("should register an event listener for readable", async () => {
+ const rawStream = new ReadableStream();
+ const stream = new UndiciStreamWrapper(rawStream);
+ const onSpy = jest.spyOn(stream, "on");
+
+ stream.on("readable", () => {});
+
+ expect(onSpy).toHaveBeenCalledWith("readable", expect.any(Function));
+ });
+
+ it("should remove an event listener for data", async () => {
+ const rawStream = new ReadableStream();
+ const stream = new UndiciStreamWrapper(rawStream);
+ const offSpy = jest.spyOn(stream, "off");
+
+ const fn = () => {};
+ stream.on("data", fn);
+ stream.off("data", fn);
+
+ expect(offSpy).toHaveBeenCalledWith("data", expect.any(Function));
+ });
+
+ it("should write to dest when calling pipe to writable stream", async () => {
+ const rawStream = new ReadableStream({
+ start(controller) {
+ controller.enqueue(new TextEncoder().encode("test"));
+ controller.enqueue(new TextEncoder().encode("test"));
+ controller.close();
+ },
+ });
+ const stream = new UndiciStreamWrapper(rawStream);
+ const dest = new WritableStream({
+ write(chunk) {
+ expect(chunk).toEqual(new TextEncoder().encode("test"));
+ },
+ });
+
+ stream.pipe(dest);
+ });
+
+ it("should write nothing when calling pipe and unpipe", async () => {
+ const rawStream = new ReadableStream();
+ const stream = new UndiciStreamWrapper(rawStream);
+ const buffer: Uint8Array[] = [];
+ const dest = new WritableStream({
+ write(chunk) {
+ buffer.push(chunk);
+ },
+ });
+ stream.pipe(dest);
+ stream.unpipe(dest);
+
+ expect(buffer).toEqual([]);
+ });
+
+ it("should destroy the stream", async () => {
+ const rawStream = new ReadableStream();
+ const stream = new UndiciStreamWrapper(rawStream);
+ const destroySpy = jest.spyOn(stream, "destroy");
+
+ stream.destroy();
+
+ expect(destroySpy).toHaveBeenCalled();
+ });
+
+ it("should pause and resume the stream", async () => {
+ const rawStream = new ReadableStream();
+ const stream = new UndiciStreamWrapper(rawStream);
+ const pauseSpy = jest.spyOn(stream, "pause");
+ const resumeSpy = jest.spyOn(stream, "resume");
+
+ expect(stream.isPaused).toBe(false);
+ stream.pause();
+ expect(stream.isPaused).toBe(true);
+ stream.resume();
+
+ expect(pauseSpy).toHaveBeenCalled();
+ expect(resumeSpy).toHaveBeenCalled();
+ });
+
+ it("should read the stream", async () => {
+ const rawStream = new ReadableStream({
+ start(controller) {
+ controller.enqueue(new TextEncoder().encode("test"));
+ controller.enqueue(new TextEncoder().encode("test"));
+ controller.close();
+ },
+ });
+ const stream = new UndiciStreamWrapper(rawStream);
+
+ expect(await stream.read()).toEqual(new TextEncoder().encode("test"));
+ expect(await stream.read()).toEqual(new TextEncoder().encode("test"));
+ });
+
+ it("should read the stream as text", async () => {
+ const rawStream = new ReadableStream({
+ start(controller) {
+ controller.enqueue(new TextEncoder().encode("test"));
+ controller.enqueue(new TextEncoder().encode("test"));
+ controller.close();
+ },
+ });
+ const stream = new UndiciStreamWrapper(rawStream);
+
+ const data = await stream.text();
+
+ expect(data).toEqual("testtest");
+ });
+
+ it("should read the stream as json", async () => {
+ const rawStream = new ReadableStream({
+ start(controller) {
+ controller.enqueue(new TextEncoder().encode(JSON.stringify({ test: "test" })));
+ controller.close();
+ },
+ });
+ const stream = new UndiciStreamWrapper(rawStream);
+
+ const data = await stream.json();
+
+ expect(data).toEqual({ test: "test" });
+ });
+
+ it("should allow use with async iteratable stream", async () => {
+ const rawStream = new ReadableStream({
+ start(controller) {
+ controller.enqueue(new TextEncoder().encode("test"));
+ controller.enqueue(new TextEncoder().encode("test"));
+ controller.close();
+ },
+ });
+ let data = "";
+ const stream = new UndiciStreamWrapper(rawStream);
+ for await (const chunk of stream) {
+ data += new TextDecoder().decode(chunk);
+ }
+
+ expect(data).toEqual("testtest");
+ });
+});
diff --git a/tests/unit/fetcher/stream-wrappers/chooseStreamWrapper.test.ts b/tests/unit/fetcher/stream-wrappers/chooseStreamWrapper.test.ts
new file mode 100644
index 0000000..17cf37a
--- /dev/null
+++ b/tests/unit/fetcher/stream-wrappers/chooseStreamWrapper.test.ts
@@ -0,0 +1,43 @@
+import { RUNTIME } from "../../../../src/core/runtime";
+import { chooseStreamWrapper } from "../../../../src/core/fetcher/stream-wrappers/chooseStreamWrapper";
+import { Node18UniversalStreamWrapper } from "../../../../src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper";
+import { NodePre18StreamWrapper } from "../../../../src/core/fetcher/stream-wrappers/NodePre18StreamWrapper";
+import { UndiciStreamWrapper } from "../../../../src/core/fetcher/stream-wrappers/UndiciStreamWrapper";
+
+describe("chooseStreamWrapper", () => {
+ beforeEach(() => {
+ RUNTIME.type = "unknown";
+ RUNTIME.parsedVersion = 0;
+ });
+
+ it('should return a Node18UniversalStreamWrapper when RUNTIME.type is "node" and RUNTIME.parsedVersion is not null and RUNTIME.parsedVersion is greater than or equal to 18', async () => {
+ const expected = new Node18UniversalStreamWrapper(new ReadableStream());
+ RUNTIME.type = "node";
+ RUNTIME.parsedVersion = 18;
+
+ const result = await chooseStreamWrapper(new ReadableStream());
+
+ expect(JSON.stringify(result)).toBe(JSON.stringify(expected));
+ });
+
+ it('should return a NodePre18StreamWrapper when RUNTIME.type is "node" and RUNTIME.parsedVersion is not null and RUNTIME.parsedVersion is less than 18', async () => {
+ const stream = await import("readable-stream");
+ const expected = new NodePre18StreamWrapper(new stream.Readable());
+
+ RUNTIME.type = "node";
+ RUNTIME.parsedVersion = 16;
+
+ const result = await chooseStreamWrapper(new stream.Readable());
+
+ expect(JSON.stringify(result)).toEqual(JSON.stringify(expected));
+ });
+
+ it('should return a Undici when RUNTIME.type is not "node"', async () => {
+ const expected = new UndiciStreamWrapper(new ReadableStream());
+ RUNTIME.type = "browser";
+
+ const result = await chooseStreamWrapper(new ReadableStream());
+
+ expect(JSON.stringify(result)).toEqual(JSON.stringify(expected));
+ });
+});
diff --git a/tests/unit/fetcher/stream-wrappers/webpack.test.ts b/tests/unit/fetcher/stream-wrappers/webpack.test.ts
new file mode 100644
index 0000000..557db6d
--- /dev/null
+++ b/tests/unit/fetcher/stream-wrappers/webpack.test.ts
@@ -0,0 +1,38 @@
+import webpack from "webpack";
+
+describe("test env compatibility", () => {
+ test("webpack", () => {
+ return new Promise((resolve, reject) => {
+ webpack(
+ {
+ mode: "production",
+ entry: "./src/index.ts",
+ module: {
+ rules: [
+ {
+ test: /\.tsx?$/,
+ use: "ts-loader",
+ exclude: /node_modules/,
+ },
+ ],
+ },
+ resolve: {
+ extensions: [".tsx", ".ts", ".js"],
+ },
+ },
+ (err, stats) => {
+ try {
+ expect(err).toBe(null);
+ if (stats?.hasErrors()) {
+ console.log(stats?.toString());
+ }
+ expect(stats?.hasErrors()).toBe(false);
+ resolve();
+ } catch (error) {
+ reject(error);
+ }
+ }
+ );
+ });
+ }, 60_000);
+});
diff --git a/tests/unit/fetcher/test-file.txt b/tests/unit/fetcher/test-file.txt
new file mode 100644
index 0000000..c66d471
--- /dev/null
+++ b/tests/unit/fetcher/test-file.txt
@@ -0,0 +1 @@
+This is a test file!
diff --git a/tests/unit/form-data-utils/formDataWrapper.test.ts b/tests/unit/form-data-utils/formDataWrapper.test.ts
new file mode 100644
index 0000000..9af30c9
--- /dev/null
+++ b/tests/unit/form-data-utils/formDataWrapper.test.ts
@@ -0,0 +1,127 @@
+/* eslint-disable @typescript-eslint/ban-ts-comment */
+import { Node18FormData, WebFormData } from "../../../src/core/form-data-utils/FormDataWrapper";
+
+describe("CrossPlatformFormData", () => {
+ describe("Node18FormData", () => {
+ let formData: any;
+
+ beforeEach(async () => {
+ formData = new Node18FormData();
+ await formData.setup();
+ });
+
+ it("should append a Readable stream with a specified filename", async () => {
+ const value = (await import("readable-stream")).Readable.from(["file content"]);
+ const filename = "testfile.txt";
+
+ await formData.appendFile("file", value, filename);
+
+ const request = await formData.getRequest();
+ const decoder = new TextDecoder("utf-8");
+ let data = "";
+ for await (const chunk of request.body) {
+ data += decoder.decode(chunk);
+ }
+ expect(data).toContain(filename);
+ });
+
+ it("should append a Blob with a specified filename", async () => {
+ const value = new Blob(["file content"], { type: "text/plain" });
+ const filename = "testfile.txt";
+
+ await formData.appendFile("file", value, filename);
+
+ const request = await formData.getRequest();
+ const decoder = new TextDecoder("utf-8");
+ let data = "";
+ for await (const chunk of request.body) {
+ data += decoder.decode(chunk);
+ }
+ expect(data).toContain(filename);
+ });
+
+ it("should append a File with a specified filename", async () => {
+ const filename = "testfile.txt";
+ // @ts-expect-error
+ const value = new (await import("buffer")).File(["file content"], filename);
+
+ await formData.appendFile("file", value);
+
+ const request = await formData.getRequest();
+ const decoder = new TextDecoder("utf-8");
+ let data = "";
+ for await (const chunk of request.body) {
+ data += decoder.decode(chunk);
+ }
+ expect(data).toContain("testfile.txt");
+ });
+
+ it("should append a File with an explicit filename", async () => {
+ const filename = "testfile.txt";
+ // @ts-expect-error
+ const value = new (await import("buffer")).File(["file content"], filename);
+
+ await formData.appendFile("file", value, "test.txt");
+
+ const request = await formData.getRequest();
+ const decoder = new TextDecoder("utf-8");
+ let data = "";
+ for await (const chunk of request.body) {
+ data += decoder.decode(chunk);
+ }
+ expect(data).toContain("test.txt");
+ });
+ });
+
+ describe("WebFormData", () => {
+ let formData: any;
+
+ beforeEach(async () => {
+ formData = new WebFormData();
+ await formData.setup();
+ });
+
+ it("should append a Readable stream with a specified filename", async () => {
+ const value = (await import("readable-stream")).Readable.from(["file content"]);
+ const filename = "testfile.txt";
+
+ await formData.appendFile("file", value, filename);
+
+ const request = formData.getRequest();
+ expect(request.body.get("file").name).toBe(filename);
+ });
+
+ it("should append a Blob with a specified filename", async () => {
+ const value = new Blob(["file content"], { type: "text/plain" });
+ const filename = "testfile.txt";
+
+ await formData.appendFile("file", value, filename);
+
+ const request = formData.getRequest();
+
+ expect(request.body.get("file").name).toBe(filename);
+ });
+
+ it("should append a File with a specified filename", async () => {
+ const filename = "testfile.txt";
+ // @ts-expect-error
+ const value = new (await import("buffer")).File(["file content"], filename);
+
+ await formData.appendFile("file", value);
+
+ const request = formData.getRequest();
+ expect(request.body.get("file").name).toBe(filename);
+ });
+
+ it("should append a File with an explicit filename", async () => {
+ const filename = "testfile.txt";
+ // @ts-expect-error
+ const value = new (await import("buffer")).File(["file content"], filename);
+
+ await formData.appendFile("file", value, "test.txt");
+
+ const request = formData.getRequest();
+ expect(request.body.get("file").name).toBe("test.txt");
+ });
+ });
+});
diff --git a/tsconfig.json b/tsconfig.json
new file mode 100644
index 0000000..538c94f
--- /dev/null
+++ b/tsconfig.json
@@ -0,0 +1,17 @@
+{
+ "compilerOptions": {
+ "extendedDiagnostics": true,
+ "strict": true,
+ "target": "ES6",
+ "module": "CommonJS",
+ "moduleResolution": "node",
+ "esModuleInterop": true,
+ "skipLibCheck": true,
+ "declaration": true,
+ "outDir": "dist",
+ "rootDir": "src",
+ "baseUrl": "src"
+ },
+ "include": ["src"],
+ "exclude": []
+}
diff --git a/yarn.lock b/yarn.lock
new file mode 100644
index 0000000..96cfb1d
--- /dev/null
+++ b/yarn.lock
@@ -0,0 +1,3208 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+# yarn lockfile v1
+
+
+"@ampproject/remapping@^2.2.0":
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.3.0.tgz#ed441b6fa600072520ce18b43d2c8cc8caecc7f4"
+ integrity sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==
+ dependencies:
+ "@jridgewell/gen-mapping" "^0.3.5"
+ "@jridgewell/trace-mapping" "^0.3.24"
+
+"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.25.9", "@babel/code-frame@^7.26.0", "@babel/code-frame@^7.26.2":
+ version "7.26.2"
+ resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.26.2.tgz#4b5fab97d33338eff916235055f0ebc21e573a85"
+ integrity sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==
+ dependencies:
+ "@babel/helper-validator-identifier" "^7.25.9"
+ js-tokens "^4.0.0"
+ picocolors "^1.0.0"
+
+"@babel/compat-data@^7.25.9":
+ version "7.26.3"
+ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.26.3.tgz#99488264a56b2aded63983abd6a417f03b92ed02"
+ integrity sha512-nHIxvKPniQXpmQLb0vhY3VaFb3S0YrTAwpOWJZh1wn3oJPjJk9Asva204PsBdmAE8vpzfHudT8DB0scYvy9q0g==
+
+"@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9":
+ version "7.26.0"
+ resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.26.0.tgz#d78b6023cc8f3114ccf049eb219613f74a747b40"
+ integrity sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==
+ dependencies:
+ "@ampproject/remapping" "^2.2.0"
+ "@babel/code-frame" "^7.26.0"
+ "@babel/generator" "^7.26.0"
+ "@babel/helper-compilation-targets" "^7.25.9"
+ "@babel/helper-module-transforms" "^7.26.0"
+ "@babel/helpers" "^7.26.0"
+ "@babel/parser" "^7.26.0"
+ "@babel/template" "^7.25.9"
+ "@babel/traverse" "^7.25.9"
+ "@babel/types" "^7.26.0"
+ convert-source-map "^2.0.0"
+ debug "^4.1.0"
+ gensync "^1.0.0-beta.2"
+ json5 "^2.2.3"
+ semver "^6.3.1"
+
+"@babel/generator@^7.26.0", "@babel/generator@^7.26.3", "@babel/generator@^7.7.2":
+ version "7.26.3"
+ resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.26.3.tgz#ab8d4360544a425c90c248df7059881f4b2ce019"
+ integrity sha512-6FF/urZvD0sTeO7k6/B15pMLC4CHUv1426lzr3N01aHJTl046uCAh9LXW/fzeXXjPNCJ6iABW5XaWOsIZB93aQ==
+ dependencies:
+ "@babel/parser" "^7.26.3"
+ "@babel/types" "^7.26.3"
+ "@jridgewell/gen-mapping" "^0.3.5"
+ "@jridgewell/trace-mapping" "^0.3.25"
+ jsesc "^3.0.2"
+
+"@babel/helper-compilation-targets@^7.25.9":
+ version "7.25.9"
+ resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.9.tgz#55af025ce365be3cdc0c1c1e56c6af617ce88875"
+ integrity sha512-j9Db8Suy6yV/VHa4qzrj9yZfZxhLWQdVnRlXxmKLYlhWUVB1sB2G5sxuWYXk/whHD9iW76PmNzxZ4UCnTQTVEQ==
+ dependencies:
+ "@babel/compat-data" "^7.25.9"
+ "@babel/helper-validator-option" "^7.25.9"
+ browserslist "^4.24.0"
+ lru-cache "^5.1.1"
+ semver "^6.3.1"
+
+"@babel/helper-module-imports@^7.25.9":
+ version "7.25.9"
+ resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz#e7f8d20602ebdbf9ebbea0a0751fb0f2a4141715"
+ integrity sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==
+ dependencies:
+ "@babel/traverse" "^7.25.9"
+ "@babel/types" "^7.25.9"
+
+"@babel/helper-module-transforms@^7.26.0":
+ version "7.26.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz#8ce54ec9d592695e58d84cd884b7b5c6a2fdeeae"
+ integrity sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==
+ dependencies:
+ "@babel/helper-module-imports" "^7.25.9"
+ "@babel/helper-validator-identifier" "^7.25.9"
+ "@babel/traverse" "^7.25.9"
+
+"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.25.9", "@babel/helper-plugin-utils@^7.8.0":
+ version "7.25.9"
+ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.9.tgz#9cbdd63a9443a2c92a725cca7ebca12cc8dd9f46"
+ integrity sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw==
+
+"@babel/helper-string-parser@^7.25.9":
+ version "7.25.9"
+ resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz#1aabb72ee72ed35789b4bbcad3ca2862ce614e8c"
+ integrity sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==
+
+"@babel/helper-validator-identifier@^7.25.9":
+ version "7.25.9"
+ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz#24b64e2c3ec7cd3b3c547729b8d16871f22cbdc7"
+ integrity sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==
+
+"@babel/helper-validator-option@^7.25.9":
+ version "7.25.9"
+ resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz#86e45bd8a49ab7e03f276577f96179653d41da72"
+ integrity sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==
+
+"@babel/helpers@^7.26.0":
+ version "7.26.0"
+ resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.26.0.tgz#30e621f1eba5aa45fe6f4868d2e9154d884119a4"
+ integrity sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw==
+ dependencies:
+ "@babel/template" "^7.25.9"
+ "@babel/types" "^7.26.0"
+
+"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.25.9", "@babel/parser@^7.26.0", "@babel/parser@^7.26.3":
+ version "7.26.3"
+ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.26.3.tgz#8c51c5db6ddf08134af1ddbacf16aaab48bac234"
+ integrity sha512-WJ/CvmY8Mea8iDXo6a7RK2wbmJITT5fN3BEkRuFlxVyNx8jOKIIhmC4fSkTcPcf8JyavbBwIe6OpiCOBXt/IcA==
+ dependencies:
+ "@babel/types" "^7.26.3"
+
+"@babel/plugin-syntax-async-generators@^7.8.4":
+ version "7.8.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d"
+ integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.0"
+
+"@babel/plugin-syntax-bigint@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz#4c9a6f669f5d0cdf1b90a1671e9a146be5300cea"
+ integrity sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.0"
+
+"@babel/plugin-syntax-class-properties@^7.12.13":
+ version "7.12.13"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10"
+ integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.12.13"
+
+"@babel/plugin-syntax-class-static-block@^7.14.5":
+ version "7.14.5"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz#195df89b146b4b78b3bf897fd7a257c84659d406"
+ integrity sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.14.5"
+
+"@babel/plugin-syntax-import-attributes@^7.24.7":
+ version "7.26.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.26.0.tgz#3b1412847699eea739b4f2602c74ce36f6b0b0f7"
+ integrity sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.25.9"
+
+"@babel/plugin-syntax-import-meta@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51"
+ integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.10.4"
+
+"@babel/plugin-syntax-json-strings@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a"
+ integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.0"
+
+"@babel/plugin-syntax-jsx@^7.7.2":
+ version "7.25.9"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.9.tgz#a34313a178ea56f1951599b929c1ceacee719290"
+ integrity sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.25.9"
+
+"@babel/plugin-syntax-logical-assignment-operators@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699"
+ integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.10.4"
+
+"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9"
+ integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.0"
+
+"@babel/plugin-syntax-numeric-separator@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97"
+ integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.10.4"
+
+"@babel/plugin-syntax-object-rest-spread@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871"
+ integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.0"
+
+"@babel/plugin-syntax-optional-catch-binding@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1"
+ integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.0"
+
+"@babel/plugin-syntax-optional-chaining@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a"
+ integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.0"
+
+"@babel/plugin-syntax-private-property-in-object@^7.14.5":
+ version "7.14.5"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz#0dc6671ec0ea22b6e94a1114f857970cd39de1ad"
+ integrity sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.14.5"
+
+"@babel/plugin-syntax-top-level-await@^7.14.5":
+ version "7.14.5"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c"
+ integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.14.5"
+
+"@babel/plugin-syntax-typescript@^7.7.2":
+ version "7.25.9"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.9.tgz#67dda2b74da43727cf21d46cf9afef23f4365399"
+ integrity sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.25.9"
+
+"@babel/template@^7.25.9", "@babel/template@^7.3.3":
+ version "7.25.9"
+ resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.25.9.tgz#ecb62d81a8a6f5dc5fe8abfc3901fc52ddf15016"
+ integrity sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==
+ dependencies:
+ "@babel/code-frame" "^7.25.9"
+ "@babel/parser" "^7.25.9"
+ "@babel/types" "^7.25.9"
+
+"@babel/traverse@^7.25.9":
+ version "7.26.4"
+ resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.26.4.tgz#ac3a2a84b908dde6d463c3bfa2c5fdc1653574bd"
+ integrity sha512-fH+b7Y4p3yqvApJALCPJcwb0/XaOSgtK4pzV6WVjPR5GLFQBRI7pfoX2V2iM48NXvX07NUxxm1Vw98YjqTcU5w==
+ dependencies:
+ "@babel/code-frame" "^7.26.2"
+ "@babel/generator" "^7.26.3"
+ "@babel/parser" "^7.26.3"
+ "@babel/template" "^7.25.9"
+ "@babel/types" "^7.26.3"
+ debug "^4.3.1"
+ globals "^11.1.0"
+
+"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.25.9", "@babel/types@^7.26.0", "@babel/types@^7.26.3", "@babel/types@^7.3.3":
+ version "7.26.3"
+ resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.26.3.tgz#37e79830f04c2b5687acc77db97fbc75fb81f3c0"
+ integrity sha512-vN5p+1kl59GVKMvTHt55NzzmYVxprfJD+ql7U9NFIfKCBkYE55LYtS+WtPlaYOyzydrKI8Nezd+aZextrd+FMA==
+ dependencies:
+ "@babel/helper-string-parser" "^7.25.9"
+ "@babel/helper-validator-identifier" "^7.25.9"
+
+"@bcoe/v8-coverage@^0.2.3":
+ version "0.2.3"
+ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
+ integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
+
+"@istanbuljs/load-nyc-config@^1.0.0":
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced"
+ integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==
+ dependencies:
+ camelcase "^5.3.1"
+ find-up "^4.1.0"
+ get-package-type "^0.1.0"
+ js-yaml "^3.13.1"
+ resolve-from "^5.0.0"
+
+"@istanbuljs/schema@^0.1.2", "@istanbuljs/schema@^0.1.3":
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98"
+ integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==
+
+"@jest/console@^29.7.0":
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/@jest/console/-/console-29.7.0.tgz#cd4822dbdb84529265c5a2bdb529a3c9cc950ffc"
+ integrity sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==
+ dependencies:
+ "@jest/types" "^29.6.3"
+ "@types/node" "*"
+ chalk "^4.0.0"
+ jest-message-util "^29.7.0"
+ jest-util "^29.7.0"
+ slash "^3.0.0"
+
+"@jest/core@^29.7.0":
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/@jest/core/-/core-29.7.0.tgz#b6cccc239f30ff36609658c5a5e2291757ce448f"
+ integrity sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==
+ dependencies:
+ "@jest/console" "^29.7.0"
+ "@jest/reporters" "^29.7.0"
+ "@jest/test-result" "^29.7.0"
+ "@jest/transform" "^29.7.0"
+ "@jest/types" "^29.6.3"
+ "@types/node" "*"
+ ansi-escapes "^4.2.1"
+ chalk "^4.0.0"
+ ci-info "^3.2.0"
+ exit "^0.1.2"
+ graceful-fs "^4.2.9"
+ jest-changed-files "^29.7.0"
+ jest-config "^29.7.0"
+ jest-haste-map "^29.7.0"
+ jest-message-util "^29.7.0"
+ jest-regex-util "^29.6.3"
+ jest-resolve "^29.7.0"
+ jest-resolve-dependencies "^29.7.0"
+ jest-runner "^29.7.0"
+ jest-runtime "^29.7.0"
+ jest-snapshot "^29.7.0"
+ jest-util "^29.7.0"
+ jest-validate "^29.7.0"
+ jest-watcher "^29.7.0"
+ micromatch "^4.0.4"
+ pretty-format "^29.7.0"
+ slash "^3.0.0"
+ strip-ansi "^6.0.0"
+
+"@jest/environment@^29.7.0":
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.7.0.tgz#24d61f54ff1f786f3cd4073b4b94416383baf2a7"
+ integrity sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==
+ dependencies:
+ "@jest/fake-timers" "^29.7.0"
+ "@jest/types" "^29.6.3"
+ "@types/node" "*"
+ jest-mock "^29.7.0"
+
+"@jest/expect-utils@^29.7.0":
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.7.0.tgz#023efe5d26a8a70f21677d0a1afc0f0a44e3a1c6"
+ integrity sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==
+ dependencies:
+ jest-get-type "^29.6.3"
+
+"@jest/expect@^29.7.0":
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-29.7.0.tgz#76a3edb0cb753b70dfbfe23283510d3d45432bf2"
+ integrity sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==
+ dependencies:
+ expect "^29.7.0"
+ jest-snapshot "^29.7.0"
+
+"@jest/fake-timers@^29.7.0":
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.7.0.tgz#fd91bf1fffb16d7d0d24a426ab1a47a49881a565"
+ integrity sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==
+ dependencies:
+ "@jest/types" "^29.6.3"
+ "@sinonjs/fake-timers" "^10.0.2"
+ "@types/node" "*"
+ jest-message-util "^29.7.0"
+ jest-mock "^29.7.0"
+ jest-util "^29.7.0"
+
+"@jest/globals@^29.7.0":
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.7.0.tgz#8d9290f9ec47ff772607fa864ca1d5a2efae1d4d"
+ integrity sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==
+ dependencies:
+ "@jest/environment" "^29.7.0"
+ "@jest/expect" "^29.7.0"
+ "@jest/types" "^29.6.3"
+ jest-mock "^29.7.0"
+
+"@jest/reporters@^29.7.0":
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.7.0.tgz#04b262ecb3b8faa83b0b3d321623972393e8f4c7"
+ integrity sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==
+ dependencies:
+ "@bcoe/v8-coverage" "^0.2.3"
+ "@jest/console" "^29.7.0"
+ "@jest/test-result" "^29.7.0"
+ "@jest/transform" "^29.7.0"
+ "@jest/types" "^29.6.3"
+ "@jridgewell/trace-mapping" "^0.3.18"
+ "@types/node" "*"
+ chalk "^4.0.0"
+ collect-v8-coverage "^1.0.0"
+ exit "^0.1.2"
+ glob "^7.1.3"
+ graceful-fs "^4.2.9"
+ istanbul-lib-coverage "^3.0.0"
+ istanbul-lib-instrument "^6.0.0"
+ istanbul-lib-report "^3.0.0"
+ istanbul-lib-source-maps "^4.0.0"
+ istanbul-reports "^3.1.3"
+ jest-message-util "^29.7.0"
+ jest-util "^29.7.0"
+ jest-worker "^29.7.0"
+ slash "^3.0.0"
+ string-length "^4.0.1"
+ strip-ansi "^6.0.0"
+ v8-to-istanbul "^9.0.1"
+
+"@jest/schemas@^29.6.3":
+ version "29.6.3"
+ resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03"
+ integrity sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==
+ dependencies:
+ "@sinclair/typebox" "^0.27.8"
+
+"@jest/source-map@^29.6.3":
+ version "29.6.3"
+ resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-29.6.3.tgz#d90ba772095cf37a34a5eb9413f1b562a08554c4"
+ integrity sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==
+ dependencies:
+ "@jridgewell/trace-mapping" "^0.3.18"
+ callsites "^3.0.0"
+ graceful-fs "^4.2.9"
+
+"@jest/test-result@^29.7.0":
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-29.7.0.tgz#8db9a80aa1a097bb2262572686734baed9b1657c"
+ integrity sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==
+ dependencies:
+ "@jest/console" "^29.7.0"
+ "@jest/types" "^29.6.3"
+ "@types/istanbul-lib-coverage" "^2.0.0"
+ collect-v8-coverage "^1.0.0"
+
+"@jest/test-sequencer@^29.7.0":
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz#6cef977ce1d39834a3aea887a1726628a6f072ce"
+ integrity sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==
+ dependencies:
+ "@jest/test-result" "^29.7.0"
+ graceful-fs "^4.2.9"
+ jest-haste-map "^29.7.0"
+ slash "^3.0.0"
+
+"@jest/transform@^29.7.0":
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.7.0.tgz#df2dd9c346c7d7768b8a06639994640c642e284c"
+ integrity sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==
+ dependencies:
+ "@babel/core" "^7.11.6"
+ "@jest/types" "^29.6.3"
+ "@jridgewell/trace-mapping" "^0.3.18"
+ babel-plugin-istanbul "^6.1.1"
+ chalk "^4.0.0"
+ convert-source-map "^2.0.0"
+ fast-json-stable-stringify "^2.1.0"
+ graceful-fs "^4.2.9"
+ jest-haste-map "^29.7.0"
+ jest-regex-util "^29.6.3"
+ jest-util "^29.7.0"
+ micromatch "^4.0.4"
+ pirates "^4.0.4"
+ slash "^3.0.0"
+ write-file-atomic "^4.0.2"
+
+"@jest/types@^29.6.3":
+ version "29.6.3"
+ resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.6.3.tgz#1131f8cf634e7e84c5e77bab12f052af585fba59"
+ integrity sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==
+ dependencies:
+ "@jest/schemas" "^29.6.3"
+ "@types/istanbul-lib-coverage" "^2.0.0"
+ "@types/istanbul-reports" "^3.0.0"
+ "@types/node" "*"
+ "@types/yargs" "^17.0.8"
+ chalk "^4.0.0"
+
+"@jridgewell/gen-mapping@^0.3.5":
+ version "0.3.8"
+ resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz#4f0e06362e01362f823d348f1872b08f666d8142"
+ integrity sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==
+ dependencies:
+ "@jridgewell/set-array" "^1.2.1"
+ "@jridgewell/sourcemap-codec" "^1.4.10"
+ "@jridgewell/trace-mapping" "^0.3.24"
+
+"@jridgewell/resolve-uri@^3.1.0":
+ version "3.1.2"
+ resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6"
+ integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==
+
+"@jridgewell/set-array@^1.2.1":
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.2.1.tgz#558fb6472ed16a4c850b889530e6b36438c49280"
+ integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==
+
+"@jridgewell/source-map@^0.3.3":
+ version "0.3.6"
+ resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.6.tgz#9d71ca886e32502eb9362c9a74a46787c36df81a"
+ integrity sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==
+ dependencies:
+ "@jridgewell/gen-mapping" "^0.3.5"
+ "@jridgewell/trace-mapping" "^0.3.25"
+
+"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14":
+ version "1.5.0"
+ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a"
+ integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==
+
+"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25":
+ version "0.3.25"
+ resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0"
+ integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==
+ dependencies:
+ "@jridgewell/resolve-uri" "^3.1.0"
+ "@jridgewell/sourcemap-codec" "^1.4.14"
+
+"@sinclair/typebox@^0.27.8":
+ version "0.27.8"
+ resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e"
+ integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==
+
+"@sinonjs/commons@^3.0.0":
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-3.0.1.tgz#1029357e44ca901a615585f6d27738dbc89084cd"
+ integrity sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==
+ dependencies:
+ type-detect "4.0.8"
+
+"@sinonjs/fake-timers@^10.0.2":
+ version "10.3.0"
+ resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz#55fdff1ecab9f354019129daf4df0dd4d923ea66"
+ integrity sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==
+ dependencies:
+ "@sinonjs/commons" "^3.0.0"
+
+"@tootallnate/once@2":
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf"
+ integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==
+
+"@types/babel__core@^7.1.14":
+ version "7.20.5"
+ resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.5.tgz#3df15f27ba85319caa07ba08d0721889bb39c017"
+ integrity sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==
+ dependencies:
+ "@babel/parser" "^7.20.7"
+ "@babel/types" "^7.20.7"
+ "@types/babel__generator" "*"
+ "@types/babel__template" "*"
+ "@types/babel__traverse" "*"
+
+"@types/babel__generator@*":
+ version "7.6.8"
+ resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.8.tgz#f836c61f48b1346e7d2b0d93c6dacc5b9535d3ab"
+ integrity sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==
+ dependencies:
+ "@babel/types" "^7.0.0"
+
+"@types/babel__template@*":
+ version "7.4.4"
+ resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.4.tgz#5672513701c1b2199bc6dad636a9d7491586766f"
+ integrity sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==
+ dependencies:
+ "@babel/parser" "^7.1.0"
+ "@babel/types" "^7.0.0"
+
+"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6":
+ version "7.20.6"
+ resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.20.6.tgz#8dc9f0ae0f202c08d8d4dab648912c8d6038e3f7"
+ integrity sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==
+ dependencies:
+ "@babel/types" "^7.20.7"
+
+"@types/eslint-scope@^3.7.7":
+ version "3.7.7"
+ resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.7.tgz#3108bd5f18b0cdb277c867b3dd449c9ed7079ac5"
+ integrity sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==
+ dependencies:
+ "@types/eslint" "*"
+ "@types/estree" "*"
+
+"@types/eslint@*":
+ version "9.6.1"
+ resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-9.6.1.tgz#d5795ad732ce81715f27f75da913004a56751584"
+ integrity sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==
+ dependencies:
+ "@types/estree" "*"
+ "@types/json-schema" "*"
+
+"@types/estree@*", "@types/estree@^1.0.6":
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50"
+ integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==
+
+"@types/graceful-fs@^4.1.3":
+ version "4.1.9"
+ resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.9.tgz#2a06bc0f68a20ab37b3e36aa238be6abdf49e8b4"
+ integrity sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==
+ dependencies:
+ "@types/node" "*"
+
+"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1":
+ version "2.0.6"
+ resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz#7739c232a1fee9b4d3ce8985f314c0c6d33549d7"
+ integrity sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==
+
+"@types/istanbul-lib-report@*":
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz#53047614ae72e19fc0401d872de3ae2b4ce350bf"
+ integrity sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==
+ dependencies:
+ "@types/istanbul-lib-coverage" "*"
+
+"@types/istanbul-reports@^3.0.0":
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz#0f03e3d2f670fbdac586e34b433783070cc16f54"
+ integrity sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==
+ dependencies:
+ "@types/istanbul-lib-report" "*"
+
+"@types/jest@29.5.5":
+ version "29.5.5"
+ resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.5.tgz#727204e06228fe24373df9bae76b90f3e8236a2a"
+ integrity sha512-ebylz2hnsWR9mYvmBFbXJXr+33UPc4+ZdxyDXh5w0FlPBTfCVN3wPL+kuOiQt3xvrK419v7XWeAs+AeOksafXg==
+ dependencies:
+ expect "^29.0.0"
+ pretty-format "^29.0.0"
+
+"@types/jsdom@^20.0.0":
+ version "20.0.1"
+ resolved "https://registry.yarnpkg.com/@types/jsdom/-/jsdom-20.0.1.tgz#07c14bc19bd2f918c1929541cdaacae894744808"
+ integrity sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==
+ dependencies:
+ "@types/node" "*"
+ "@types/tough-cookie" "*"
+ parse5 "^7.0.0"
+
+"@types/json-schema@*", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9":
+ version "7.0.15"
+ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841"
+ integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==
+
+"@types/node-fetch@2.6.9":
+ version "2.6.9"
+ resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.9.tgz#15f529d247f1ede1824f7e7acdaa192d5f28071e"
+ integrity sha512-bQVlnMLFJ2d35DkPNjEPmd9ueO/rh5EiaZt2bhqiSarPjZIuIV6bPQVqcrEyvNo+AfTrRGVazle1tl597w3gfA==
+ dependencies:
+ "@types/node" "*"
+ form-data "^4.0.0"
+
+"@types/node@*":
+ version "22.10.2"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-22.10.2.tgz#a485426e6d1fdafc7b0d4c7b24e2c78182ddabb9"
+ integrity sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ==
+ dependencies:
+ undici-types "~6.20.0"
+
+"@types/node@17.0.33":
+ version "17.0.33"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.33.tgz#3c1879b276dc63e73030bb91165e62a4509cd506"
+ integrity sha512-miWq2m2FiQZmaHfdZNcbpp9PuXg34W5JZ5CrJ/BaS70VuhoJENBEQybeiYSaPBRNq6KQGnjfEnc/F3PN++D+XQ==
+
+"@types/qs@6.9.8":
+ version "6.9.8"
+ resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.8.tgz#f2a7de3c107b89b441e071d5472e6b726b4adf45"
+ integrity sha512-u95svzDlTysU5xecFNTgfFG5RUWu1A9P0VzgpcIiGZA9iraHOdSzcxMxQ55DyeRaGCSxQi7LxXDI4rzq/MYfdg==
+
+"@types/readable-stream@^4.0.15":
+ version "4.0.18"
+ resolved "https://registry.yarnpkg.com/@types/readable-stream/-/readable-stream-4.0.18.tgz#5d8d15d26c776500ce573cae580787d149823bfc"
+ integrity sha512-21jK/1j+Wg+7jVw1xnSwy/2Q1VgVjWuFssbYGTREPUBeZ+rqVFl2udq0IkxzPC0ZhOzVceUbyIACFZKLqKEBlA==
+ dependencies:
+ "@types/node" "*"
+ safe-buffer "~5.1.1"
+
+"@types/stack-utils@^2.0.0":
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.3.tgz#6209321eb2c1712a7e7466422b8cb1fc0d9dd5d8"
+ integrity sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==
+
+"@types/tough-cookie@*":
+ version "4.0.5"
+ resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.5.tgz#cb6e2a691b70cb177c6e3ae9c1d2e8b2ea8cd304"
+ integrity sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==
+
+"@types/url-join@4.0.1":
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/@types/url-join/-/url-join-4.0.1.tgz#4989c97f969464647a8586c7252d97b449cdc045"
+ integrity sha512-wDXw9LEEUHyV+7UWy7U315nrJGJ7p1BzaCxDpEoLr789Dk1WDVMMlf3iBfbG2F8NdWnYyFbtTxUn2ZNbm1Q4LQ==
+
+"@types/yargs-parser@*":
+ version "21.0.3"
+ resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.3.tgz#815e30b786d2e8f0dcd85fd5bcf5e1a04d008f15"
+ integrity sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==
+
+"@types/yargs@^17.0.8":
+ version "17.0.33"
+ resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.33.tgz#8c32303da83eec050a84b3c7ae7b9f922d13e32d"
+ integrity sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==
+ dependencies:
+ "@types/yargs-parser" "*"
+
+"@webassemblyjs/ast@1.14.1", "@webassemblyjs/ast@^1.14.1":
+ version "1.14.1"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.14.1.tgz#a9f6a07f2b03c95c8d38c4536a1fdfb521ff55b6"
+ integrity sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==
+ dependencies:
+ "@webassemblyjs/helper-numbers" "1.13.2"
+ "@webassemblyjs/helper-wasm-bytecode" "1.13.2"
+
+"@webassemblyjs/floating-point-hex-parser@1.13.2":
+ version "1.13.2"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.13.2.tgz#fcca1eeddb1cc4e7b6eed4fc7956d6813b21b9fb"
+ integrity sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==
+
+"@webassemblyjs/helper-api-error@1.13.2":
+ version "1.13.2"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.13.2.tgz#e0a16152248bc38daee76dd7e21f15c5ef3ab1e7"
+ integrity sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==
+
+"@webassemblyjs/helper-buffer@1.14.1":
+ version "1.14.1"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.14.1.tgz#822a9bc603166531f7d5df84e67b5bf99b72b96b"
+ integrity sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==
+
+"@webassemblyjs/helper-numbers@1.13.2":
+ version "1.13.2"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.13.2.tgz#dbd932548e7119f4b8a7877fd5a8d20e63490b2d"
+ integrity sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==
+ dependencies:
+ "@webassemblyjs/floating-point-hex-parser" "1.13.2"
+ "@webassemblyjs/helper-api-error" "1.13.2"
+ "@xtuc/long" "4.2.2"
+
+"@webassemblyjs/helper-wasm-bytecode@1.13.2":
+ version "1.13.2"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.13.2.tgz#e556108758f448aae84c850e593ce18a0eb31e0b"
+ integrity sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==
+
+"@webassemblyjs/helper-wasm-section@1.14.1":
+ version "1.14.1"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.14.1.tgz#9629dda9c4430eab54b591053d6dc6f3ba050348"
+ integrity sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==
+ dependencies:
+ "@webassemblyjs/ast" "1.14.1"
+ "@webassemblyjs/helper-buffer" "1.14.1"
+ "@webassemblyjs/helper-wasm-bytecode" "1.13.2"
+ "@webassemblyjs/wasm-gen" "1.14.1"
+
+"@webassemblyjs/ieee754@1.13.2":
+ version "1.13.2"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.13.2.tgz#1c5eaace1d606ada2c7fd7045ea9356c59ee0dba"
+ integrity sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==
+ dependencies:
+ "@xtuc/ieee754" "^1.2.0"
+
+"@webassemblyjs/leb128@1.13.2":
+ version "1.13.2"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.13.2.tgz#57c5c3deb0105d02ce25fa3fd74f4ebc9fd0bbb0"
+ integrity sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==
+ dependencies:
+ "@xtuc/long" "4.2.2"
+
+"@webassemblyjs/utf8@1.13.2":
+ version "1.13.2"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.13.2.tgz#917a20e93f71ad5602966c2d685ae0c6c21f60f1"
+ integrity sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==
+
+"@webassemblyjs/wasm-edit@^1.14.1":
+ version "1.14.1"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.14.1.tgz#ac6689f502219b59198ddec42dcd496b1004d597"
+ integrity sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==
+ dependencies:
+ "@webassemblyjs/ast" "1.14.1"
+ "@webassemblyjs/helper-buffer" "1.14.1"
+ "@webassemblyjs/helper-wasm-bytecode" "1.13.2"
+ "@webassemblyjs/helper-wasm-section" "1.14.1"
+ "@webassemblyjs/wasm-gen" "1.14.1"
+ "@webassemblyjs/wasm-opt" "1.14.1"
+ "@webassemblyjs/wasm-parser" "1.14.1"
+ "@webassemblyjs/wast-printer" "1.14.1"
+
+"@webassemblyjs/wasm-gen@1.14.1":
+ version "1.14.1"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.14.1.tgz#991e7f0c090cb0bb62bbac882076e3d219da9570"
+ integrity sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==
+ dependencies:
+ "@webassemblyjs/ast" "1.14.1"
+ "@webassemblyjs/helper-wasm-bytecode" "1.13.2"
+ "@webassemblyjs/ieee754" "1.13.2"
+ "@webassemblyjs/leb128" "1.13.2"
+ "@webassemblyjs/utf8" "1.13.2"
+
+"@webassemblyjs/wasm-opt@1.14.1":
+ version "1.14.1"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.14.1.tgz#e6f71ed7ccae46781c206017d3c14c50efa8106b"
+ integrity sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==
+ dependencies:
+ "@webassemblyjs/ast" "1.14.1"
+ "@webassemblyjs/helper-buffer" "1.14.1"
+ "@webassemblyjs/wasm-gen" "1.14.1"
+ "@webassemblyjs/wasm-parser" "1.14.1"
+
+"@webassemblyjs/wasm-parser@1.14.1", "@webassemblyjs/wasm-parser@^1.14.1":
+ version "1.14.1"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.14.1.tgz#b3e13f1893605ca78b52c68e54cf6a865f90b9fb"
+ integrity sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==
+ dependencies:
+ "@webassemblyjs/ast" "1.14.1"
+ "@webassemblyjs/helper-api-error" "1.13.2"
+ "@webassemblyjs/helper-wasm-bytecode" "1.13.2"
+ "@webassemblyjs/ieee754" "1.13.2"
+ "@webassemblyjs/leb128" "1.13.2"
+ "@webassemblyjs/utf8" "1.13.2"
+
+"@webassemblyjs/wast-printer@1.14.1":
+ version "1.14.1"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.14.1.tgz#3bb3e9638a8ae5fdaf9610e7a06b4d9f9aa6fe07"
+ integrity sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==
+ dependencies:
+ "@webassemblyjs/ast" "1.14.1"
+ "@xtuc/long" "4.2.2"
+
+"@xtuc/ieee754@^1.2.0":
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790"
+ integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==
+
+"@xtuc/long@4.2.2":
+ version "4.2.2"
+ resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d"
+ integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==
+
+abab@^2.0.6:
+ version "2.0.6"
+ resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291"
+ integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==
+
+abort-controller@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392"
+ integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==
+ dependencies:
+ event-target-shim "^5.0.0"
+
+acorn-globals@^7.0.0:
+ version "7.0.1"
+ resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-7.0.1.tgz#0dbf05c44fa7c94332914c02066d5beff62c40c3"
+ integrity sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q==
+ dependencies:
+ acorn "^8.1.0"
+ acorn-walk "^8.0.2"
+
+acorn-walk@^8.0.2:
+ version "8.3.4"
+ resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.4.tgz#794dd169c3977edf4ba4ea47583587c5866236b7"
+ integrity sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==
+ dependencies:
+ acorn "^8.11.0"
+
+acorn@^8.1.0, acorn@^8.11.0, acorn@^8.14.0, acorn@^8.8.1, acorn@^8.8.2:
+ version "8.14.0"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.14.0.tgz#063e2c70cac5fb4f6467f0b11152e04c682795b0"
+ integrity sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==
+
+agent-base@6:
+ version "6.0.2"
+ resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77"
+ integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==
+ dependencies:
+ debug "4"
+
+ajv-formats@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-2.1.1.tgz#6e669400659eb74973bbf2e33327180a0996b520"
+ integrity sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==
+ dependencies:
+ ajv "^8.0.0"
+
+ajv-keywords@^3.5.2:
+ version "3.5.2"
+ resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d"
+ integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==
+
+ajv-keywords@^5.1.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-5.1.0.tgz#69d4d385a4733cdbeab44964a1170a88f87f0e16"
+ integrity sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==
+ dependencies:
+ fast-deep-equal "^3.1.3"
+
+ajv@^6.12.5:
+ version "6.12.6"
+ resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4"
+ integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==
+ dependencies:
+ fast-deep-equal "^3.1.1"
+ fast-json-stable-stringify "^2.0.0"
+ json-schema-traverse "^0.4.1"
+ uri-js "^4.2.2"
+
+ajv@^8.0.0, ajv@^8.9.0:
+ version "8.17.1"
+ resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.17.1.tgz#37d9a5c776af6bc92d7f4f9510eba4c0a60d11a6"
+ integrity sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==
+ dependencies:
+ fast-deep-equal "^3.1.3"
+ fast-uri "^3.0.1"
+ json-schema-traverse "^1.0.0"
+ require-from-string "^2.0.2"
+
+ansi-escapes@^4.2.1:
+ version "4.3.2"
+ resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e"
+ integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==
+ dependencies:
+ type-fest "^0.21.3"
+
+ansi-regex@^5.0.1:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"
+ integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
+
+ansi-styles@^4.0.0, ansi-styles@^4.1.0:
+ version "4.3.0"
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937"
+ integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==
+ dependencies:
+ color-convert "^2.0.1"
+
+ansi-styles@^5.0.0:
+ version "5.2.0"
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b"
+ integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==
+
+anymatch@^3.0.3:
+ version "3.1.3"
+ resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e"
+ integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==
+ dependencies:
+ normalize-path "^3.0.0"
+ picomatch "^2.0.4"
+
+argparse@^1.0.7:
+ version "1.0.10"
+ resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
+ integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==
+ dependencies:
+ sprintf-js "~1.0.2"
+
+asynckit@^0.4.0:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
+ integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==
+
+babel-jest@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.7.0.tgz#f4369919225b684c56085998ac63dbd05be020d5"
+ integrity sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==
+ dependencies:
+ "@jest/transform" "^29.7.0"
+ "@types/babel__core" "^7.1.14"
+ babel-plugin-istanbul "^6.1.1"
+ babel-preset-jest "^29.6.3"
+ chalk "^4.0.0"
+ graceful-fs "^4.2.9"
+ slash "^3.0.0"
+
+babel-plugin-istanbul@^6.1.1:
+ version "6.1.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73"
+ integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.0.0"
+ "@istanbuljs/load-nyc-config" "^1.0.0"
+ "@istanbuljs/schema" "^0.1.2"
+ istanbul-lib-instrument "^5.0.4"
+ test-exclude "^6.0.0"
+
+babel-plugin-jest-hoist@^29.6.3:
+ version "29.6.3"
+ resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz#aadbe943464182a8922c3c927c3067ff40d24626"
+ integrity sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==
+ dependencies:
+ "@babel/template" "^7.3.3"
+ "@babel/types" "^7.3.3"
+ "@types/babel__core" "^7.1.14"
+ "@types/babel__traverse" "^7.0.6"
+
+babel-preset-current-node-syntax@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz#9a929eafece419612ef4ae4f60b1862ebad8ef30"
+ integrity sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==
+ dependencies:
+ "@babel/plugin-syntax-async-generators" "^7.8.4"
+ "@babel/plugin-syntax-bigint" "^7.8.3"
+ "@babel/plugin-syntax-class-properties" "^7.12.13"
+ "@babel/plugin-syntax-class-static-block" "^7.14.5"
+ "@babel/plugin-syntax-import-attributes" "^7.24.7"
+ "@babel/plugin-syntax-import-meta" "^7.10.4"
+ "@babel/plugin-syntax-json-strings" "^7.8.3"
+ "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4"
+ "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3"
+ "@babel/plugin-syntax-numeric-separator" "^7.10.4"
+ "@babel/plugin-syntax-object-rest-spread" "^7.8.3"
+ "@babel/plugin-syntax-optional-catch-binding" "^7.8.3"
+ "@babel/plugin-syntax-optional-chaining" "^7.8.3"
+ "@babel/plugin-syntax-private-property-in-object" "^7.14.5"
+ "@babel/plugin-syntax-top-level-await" "^7.14.5"
+
+babel-preset-jest@^29.6.3:
+ version "29.6.3"
+ resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz#fa05fa510e7d493896d7b0dd2033601c840f171c"
+ integrity sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==
+ dependencies:
+ babel-plugin-jest-hoist "^29.6.3"
+ babel-preset-current-node-syntax "^1.0.0"
+
+balanced-match@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
+ integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
+
+base64-js@^1.3.1:
+ version "1.5.1"
+ resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a"
+ integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==
+
+brace-expansion@^1.1.7:
+ version "1.1.11"
+ resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
+ integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==
+ dependencies:
+ balanced-match "^1.0.0"
+ concat-map "0.0.1"
+
+braces@^3.0.3:
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789"
+ integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==
+ dependencies:
+ fill-range "^7.1.1"
+
+browserslist@^4.24.0:
+ version "4.24.3"
+ resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.24.3.tgz#5fc2725ca8fb3c1432e13dac278c7cc103e026d2"
+ integrity sha512-1CPmv8iobE2fyRMV97dAcMVegvvWKxmq94hkLiAkUGwKVTyDLw33K+ZxiFrREKmmps4rIw6grcCFCnTMSZ/YiA==
+ dependencies:
+ caniuse-lite "^1.0.30001688"
+ electron-to-chromium "^1.5.73"
+ node-releases "^2.0.19"
+ update-browserslist-db "^1.1.1"
+
+bs-logger@0.x:
+ version "0.2.6"
+ resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8"
+ integrity sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==
+ dependencies:
+ fast-json-stable-stringify "2.x"
+
+bser@2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05"
+ integrity sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==
+ dependencies:
+ node-int64 "^0.4.0"
+
+buffer-from@^1.0.0:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5"
+ integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==
+
+buffer@^6.0.3:
+ version "6.0.3"
+ resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6"
+ integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==
+ dependencies:
+ base64-js "^1.3.1"
+ ieee754 "^1.2.1"
+
+call-bind-apply-helpers@^1.0.0, call-bind-apply-helpers@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz#32e5892e6361b29b0b545ba6f7763378daca2840"
+ integrity sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==
+ dependencies:
+ es-errors "^1.3.0"
+ function-bind "^1.1.2"
+
+call-bind@^1.0.8:
+ version "1.0.8"
+ resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.8.tgz#0736a9660f537e3388826f440d5ec45f744eaa4c"
+ integrity sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==
+ dependencies:
+ call-bind-apply-helpers "^1.0.0"
+ es-define-property "^1.0.0"
+ get-intrinsic "^1.2.4"
+ set-function-length "^1.2.2"
+
+call-bound@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/call-bound/-/call-bound-1.0.2.tgz#9dbd4daf9f5f753bec3e4c8fbb8a2ecc4de6c39b"
+ integrity sha512-0lk0PHFe/uz0vl527fG9CgdE9WdafjDbCXvBbs+LUv000TVt2Jjhqbs4Jwm8gz070w8xXyEAxrPOMullsxXeGg==
+ dependencies:
+ call-bind "^1.0.8"
+ get-intrinsic "^1.2.5"
+
+callsites@^3.0.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73"
+ integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==
+
+camelcase@^5.3.1:
+ version "5.3.1"
+ resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320"
+ integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==
+
+camelcase@^6.2.0:
+ version "6.3.0"
+ resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a"
+ integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==
+
+caniuse-lite@^1.0.30001688:
+ version "1.0.30001688"
+ resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001688.tgz#f9d3ede749f083ce0db4c13db9d828adaf2e8d0a"
+ integrity sha512-Nmqpru91cuABu/DTCXbM2NSRHzM2uVHfPnhJ/1zEAJx/ILBRVmz3pzH4N7DZqbdG0gWClsCC05Oj0mJ/1AWMbA==
+
+chalk@^4.0.0, chalk@^4.1.0:
+ version "4.1.2"
+ resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"
+ integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==
+ dependencies:
+ ansi-styles "^4.1.0"
+ supports-color "^7.1.0"
+
+char-regex@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf"
+ integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==
+
+chrome-trace-event@^1.0.2:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz#05bffd7ff928465093314708c93bdfa9bd1f0f5b"
+ integrity sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==
+
+ci-info@^3.2.0:
+ version "3.9.0"
+ resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4"
+ integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==
+
+cjs-module-lexer@^1.0.0:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.4.1.tgz#707413784dbb3a72aa11c2f2b042a0bef4004170"
+ integrity sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA==
+
+cliui@^8.0.1:
+ version "8.0.1"
+ resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa"
+ integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==
+ dependencies:
+ string-width "^4.2.0"
+ strip-ansi "^6.0.1"
+ wrap-ansi "^7.0.0"
+
+co@^4.6.0:
+ version "4.6.0"
+ resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
+ integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==
+
+collect-v8-coverage@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz#c0b29bcd33bcd0779a1344c2136051e6afd3d9e9"
+ integrity sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==
+
+color-convert@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3"
+ integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==
+ dependencies:
+ color-name "~1.1.4"
+
+color-name@~1.1.4:
+ version "1.1.4"
+ resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
+ integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
+
+combined-stream@^1.0.8:
+ version "1.0.8"
+ resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f"
+ integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==
+ dependencies:
+ delayed-stream "~1.0.0"
+
+commander@^2.20.0:
+ version "2.20.3"
+ resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
+ integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
+
+concat-map@0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
+ integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==
+
+convert-source-map@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a"
+ integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==
+
+create-jest@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/create-jest/-/create-jest-29.7.0.tgz#a355c5b3cb1e1af02ba177fe7afd7feee49a5320"
+ integrity sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==
+ dependencies:
+ "@jest/types" "^29.6.3"
+ chalk "^4.0.0"
+ exit "^0.1.2"
+ graceful-fs "^4.2.9"
+ jest-config "^29.7.0"
+ jest-util "^29.7.0"
+ prompts "^2.0.1"
+
+cross-spawn@^7.0.3:
+ version "7.0.6"
+ resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f"
+ integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==
+ dependencies:
+ path-key "^3.1.0"
+ shebang-command "^2.0.0"
+ which "^2.0.1"
+
+cssom@^0.5.0:
+ version "0.5.0"
+ resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.5.0.tgz#d254fa92cd8b6fbd83811b9fbaed34663cc17c36"
+ integrity sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==
+
+cssom@~0.3.6:
+ version "0.3.8"
+ resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a"
+ integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==
+
+cssstyle@^2.3.0:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-2.3.0.tgz#ff665a0ddbdc31864b09647f34163443d90b0852"
+ integrity sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==
+ dependencies:
+ cssom "~0.3.6"
+
+data-urls@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-3.0.2.tgz#9cf24a477ae22bcef5cd5f6f0bfbc1d2d3be9143"
+ integrity sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==
+ dependencies:
+ abab "^2.0.6"
+ whatwg-mimetype "^3.0.0"
+ whatwg-url "^11.0.0"
+
+debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1:
+ version "4.4.0"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.0.tgz#2b3f2aea2ffeb776477460267377dc8710faba8a"
+ integrity sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==
+ dependencies:
+ ms "^2.1.3"
+
+decimal.js@^10.4.2:
+ version "10.4.3"
+ resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.4.3.tgz#1044092884d245d1b7f65725fa4ad4c6f781cc23"
+ integrity sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==
+
+dedent@^1.0.0:
+ version "1.5.3"
+ resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.5.3.tgz#99aee19eb9bae55a67327717b6e848d0bf777e5a"
+ integrity sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==
+
+deepmerge@^4.2.2:
+ version "4.3.1"
+ resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a"
+ integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==
+
+define-data-property@^1.1.4:
+ version "1.1.4"
+ resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e"
+ integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==
+ dependencies:
+ es-define-property "^1.0.0"
+ es-errors "^1.3.0"
+ gopd "^1.0.1"
+
+delayed-stream@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
+ integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==
+
+detect-newline@^3.0.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651"
+ integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==
+
+diff-sequences@^29.6.3:
+ version "29.6.3"
+ resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921"
+ integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==
+
+domexception@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/domexception/-/domexception-4.0.0.tgz#4ad1be56ccadc86fc76d033353999a8037d03673"
+ integrity sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==
+ dependencies:
+ webidl-conversions "^7.0.0"
+
+dunder-proto@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/dunder-proto/-/dunder-proto-1.0.0.tgz#c2fce098b3c8f8899554905f4377b6d85dabaa80"
+ integrity sha512-9+Sj30DIu+4KvHqMfLUGLFYL2PkURSYMVXJyXe92nFRvlYq5hBjLEhblKB+vkd/WVlUYMWigiY07T91Fkk0+4A==
+ dependencies:
+ call-bind-apply-helpers "^1.0.0"
+ es-errors "^1.3.0"
+ gopd "^1.2.0"
+
+electron-to-chromium@^1.5.73:
+ version "1.5.73"
+ resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.73.tgz#f32956ce40947fa3c8606726a96cd8fb5bb5f720"
+ integrity sha512-8wGNxG9tAG5KhGd3eeA0o6ixhiNdgr0DcHWm85XPCphwZgD1lIEoi6t3VERayWao7SF7AAZTw6oARGJeVjH8Kg==
+
+emittery@^0.13.1:
+ version "0.13.1"
+ resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.13.1.tgz#c04b8c3457490e0847ae51fced3af52d338e3dad"
+ integrity sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==
+
+emoji-regex@^8.0.0:
+ version "8.0.0"
+ resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
+ integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
+
+enhanced-resolve@^5.0.0, enhanced-resolve@^5.17.1:
+ version "5.17.1"
+ resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz#67bfbbcc2f81d511be77d686a90267ef7f898a15"
+ integrity sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==
+ dependencies:
+ graceful-fs "^4.2.4"
+ tapable "^2.2.0"
+
+entities@^4.5.0:
+ version "4.5.0"
+ resolved "https://registry.yarnpkg.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48"
+ integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==
+
+error-ex@^1.3.1:
+ version "1.3.2"
+ resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf"
+ integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==
+ dependencies:
+ is-arrayish "^0.2.1"
+
+es-define-property@^1.0.0, es-define-property@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa"
+ integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==
+
+es-errors@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f"
+ integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==
+
+es-module-lexer@^1.2.1:
+ version "1.5.4"
+ resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.5.4.tgz#a8efec3a3da991e60efa6b633a7cad6ab8d26b78"
+ integrity sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==
+
+es-object-atoms@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.0.0.tgz#ddb55cd47ac2e240701260bc2a8e31ecb643d941"
+ integrity sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==
+ dependencies:
+ es-errors "^1.3.0"
+
+escalade@^3.1.1, escalade@^3.2.0:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5"
+ integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==
+
+escape-string-regexp@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344"
+ integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==
+
+escodegen@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.1.0.tgz#ba93bbb7a43986d29d6041f99f5262da773e2e17"
+ integrity sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==
+ dependencies:
+ esprima "^4.0.1"
+ estraverse "^5.2.0"
+ esutils "^2.0.2"
+ optionalDependencies:
+ source-map "~0.6.1"
+
+eslint-scope@5.1.1:
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c"
+ integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==
+ dependencies:
+ esrecurse "^4.3.0"
+ estraverse "^4.1.1"
+
+esprima@^4.0.0, esprima@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
+ integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==
+
+esrecurse@^4.3.0:
+ version "4.3.0"
+ resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921"
+ integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==
+ dependencies:
+ estraverse "^5.2.0"
+
+estraverse@^4.1.1:
+ version "4.3.0"
+ resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d"
+ integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==
+
+estraverse@^5.2.0:
+ version "5.3.0"
+ resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123"
+ integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==
+
+esutils@^2.0.2:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"
+ integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==
+
+event-target-shim@^5.0.0:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789"
+ integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==
+
+events@^3.2.0, events@^3.3.0:
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400"
+ integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==
+
+execa@^5.0.0:
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd"
+ integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==
+ dependencies:
+ cross-spawn "^7.0.3"
+ get-stream "^6.0.0"
+ human-signals "^2.1.0"
+ is-stream "^2.0.0"
+ merge-stream "^2.0.0"
+ npm-run-path "^4.0.1"
+ onetime "^5.1.2"
+ signal-exit "^3.0.3"
+ strip-final-newline "^2.0.0"
+
+exit@^0.1.2:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c"
+ integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==
+
+expect@^29.0.0, expect@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/expect/-/expect-29.7.0.tgz#578874590dcb3214514084c08115d8aee61e11bc"
+ integrity sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==
+ dependencies:
+ "@jest/expect-utils" "^29.7.0"
+ jest-get-type "^29.6.3"
+ jest-matcher-utils "^29.7.0"
+ jest-message-util "^29.7.0"
+ jest-util "^29.7.0"
+
+fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3:
+ version "3.1.3"
+ resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
+ integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
+
+fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
+ integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==
+
+fast-uri@^3.0.1:
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.3.tgz#892a1c91802d5d7860de728f18608a0573142241"
+ integrity sha512-aLrHthzCjH5He4Z2H9YZ+v6Ujb9ocRuW6ZzkJQOrTxleEijANq4v1TsaPaVG1PZcuurEzrLcWRyYBYXD5cEiaw==
+
+fb-watchman@^2.0.0:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.2.tgz#e9524ee6b5c77e9e5001af0f85f3adbb8623255c"
+ integrity sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==
+ dependencies:
+ bser "2.1.1"
+
+fill-range@^7.1.1:
+ version "7.1.1"
+ resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292"
+ integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==
+ dependencies:
+ to-regex-range "^5.0.1"
+
+find-up@^4.0.0, find-up@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19"
+ integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==
+ dependencies:
+ locate-path "^5.0.0"
+ path-exists "^4.0.0"
+
+form-data-encoder@^4.0.2:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/form-data-encoder/-/form-data-encoder-4.0.2.tgz#dd286fd5f9049e8ded1d44ce427f5e29185c7c12"
+ integrity sha512-KQVhvhK8ZkWzxKxOr56CPulAhH3dobtuQ4+hNQ+HekH/Wp5gSOafqRAeTphQUJAIk0GBvHZgJ2ZGRWd5kphMuw==
+
+form-data@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.1.tgz#ba1076daaaa5bfd7e99c1a6cb02aa0a5cff90d48"
+ integrity sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==
+ dependencies:
+ asynckit "^0.4.0"
+ combined-stream "^1.0.8"
+ mime-types "^2.1.12"
+
+formdata-node@^6.0.3:
+ version "6.0.3"
+ resolved "https://registry.yarnpkg.com/formdata-node/-/formdata-node-6.0.3.tgz#48f8e2206ae2befded82af621ef015f08168dc6d"
+ integrity sha512-8e1++BCiTzUno9v5IZ2J6bv4RU+3UKDmqWUQD0MIMVCd9AdhWkO1gw57oo1mNEX1dMq2EGI+FbWz4B92pscSQg==
+
+fs.realpath@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
+ integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==
+
+fsevents@^2.3.2:
+ version "2.3.3"
+ resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6"
+ integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==
+
+function-bind@^1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c"
+ integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==
+
+gensync@^1.0.0-beta.2:
+ version "1.0.0-beta.2"
+ resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0"
+ integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==
+
+get-caller-file@^2.0.5:
+ version "2.0.5"
+ resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
+ integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
+
+get-intrinsic@^1.2.4, get-intrinsic@^1.2.5:
+ version "1.2.6"
+ resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.6.tgz#43dd3dd0e7b49b82b2dfcad10dc824bf7fc265d5"
+ integrity sha512-qxsEs+9A+u85HhllWJJFicJfPDhRmjzoYdl64aMWW9yRIJmSyxdn8IEkuIM530/7T+lv0TIHd8L6Q/ra0tEoeA==
+ dependencies:
+ call-bind-apply-helpers "^1.0.1"
+ dunder-proto "^1.0.0"
+ es-define-property "^1.0.1"
+ es-errors "^1.3.0"
+ es-object-atoms "^1.0.0"
+ function-bind "^1.1.2"
+ gopd "^1.2.0"
+ has-symbols "^1.1.0"
+ hasown "^2.0.2"
+ math-intrinsics "^1.0.0"
+
+get-package-type@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a"
+ integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==
+
+get-stream@^6.0.0:
+ version "6.0.1"
+ resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7"
+ integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==
+
+glob-to-regexp@^0.4.1:
+ version "0.4.1"
+ resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e"
+ integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==
+
+glob@^7.1.3, glob@^7.1.4:
+ version "7.2.3"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b"
+ integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==
+ dependencies:
+ fs.realpath "^1.0.0"
+ inflight "^1.0.4"
+ inherits "2"
+ minimatch "^3.1.1"
+ once "^1.3.0"
+ path-is-absolute "^1.0.0"
+
+globals@^11.1.0:
+ version "11.12.0"
+ resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e"
+ integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==
+
+gopd@^1.0.1, gopd@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1"
+ integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==
+
+graceful-fs@^4.1.2, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.9:
+ version "4.2.11"
+ resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3"
+ integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==
+
+has-flag@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
+ integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
+
+has-property-descriptors@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854"
+ integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==
+ dependencies:
+ es-define-property "^1.0.0"
+
+has-symbols@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338"
+ integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==
+
+hasown@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003"
+ integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==
+ dependencies:
+ function-bind "^1.1.2"
+
+html-encoding-sniffer@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz#2cb1a8cf0db52414776e5b2a7a04d5dd98158de9"
+ integrity sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==
+ dependencies:
+ whatwg-encoding "^2.0.0"
+
+html-escaper@^2.0.0:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453"
+ integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==
+
+http-proxy-agent@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz#5129800203520d434f142bc78ff3c170800f2b43"
+ integrity sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==
+ dependencies:
+ "@tootallnate/once" "2"
+ agent-base "6"
+ debug "4"
+
+https-proxy-agent@^5.0.1:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6"
+ integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==
+ dependencies:
+ agent-base "6"
+ debug "4"
+
+human-signals@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0"
+ integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==
+
+iconv-lite@0.6.3:
+ version "0.6.3"
+ resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501"
+ integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==
+ dependencies:
+ safer-buffer ">= 2.1.2 < 3.0.0"
+
+ieee754@^1.2.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352"
+ integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==
+
+import-local@^3.0.2:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.2.0.tgz#c3d5c745798c02a6f8b897726aba5100186ee260"
+ integrity sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==
+ dependencies:
+ pkg-dir "^4.2.0"
+ resolve-cwd "^3.0.0"
+
+imurmurhash@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
+ integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==
+
+inflight@^1.0.4:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
+ integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==
+ dependencies:
+ once "^1.3.0"
+ wrappy "1"
+
+inherits@2:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
+ integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
+
+is-arrayish@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
+ integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==
+
+is-core-module@^2.16.0:
+ version "2.16.0"
+ resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.16.0.tgz#6c01ffdd5e33c49c1d2abfa93334a85cb56bd81c"
+ integrity sha512-urTSINYfAYgcbLb0yDQ6egFm6h3Mo1DcF9EkyXSRjjzdHbsulg01qhwWuXdOoUBuTkbQ80KDboXa0vFJ+BDH+g==
+ dependencies:
+ hasown "^2.0.2"
+
+is-fullwidth-code-point@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d"
+ integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==
+
+is-generator-fn@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118"
+ integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==
+
+is-number@^7.0.0:
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
+ integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
+
+is-potential-custom-element-name@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5"
+ integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==
+
+is-stream@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077"
+ integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==
+
+isexe@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
+ integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==
+
+istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0:
+ version "3.2.2"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz#2d166c4b0644d43a39f04bf6c2edd1e585f31756"
+ integrity sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==
+
+istanbul-lib-instrument@^5.0.4:
+ version "5.2.1"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d"
+ integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==
+ dependencies:
+ "@babel/core" "^7.12.3"
+ "@babel/parser" "^7.14.7"
+ "@istanbuljs/schema" "^0.1.2"
+ istanbul-lib-coverage "^3.2.0"
+ semver "^6.3.0"
+
+istanbul-lib-instrument@^6.0.0:
+ version "6.0.3"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz#fa15401df6c15874bcb2105f773325d78c666765"
+ integrity sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==
+ dependencies:
+ "@babel/core" "^7.23.9"
+ "@babel/parser" "^7.23.9"
+ "@istanbuljs/schema" "^0.1.3"
+ istanbul-lib-coverage "^3.2.0"
+ semver "^7.5.4"
+
+istanbul-lib-report@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz#908305bac9a5bd175ac6a74489eafd0fc2445a7d"
+ integrity sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==
+ dependencies:
+ istanbul-lib-coverage "^3.0.0"
+ make-dir "^4.0.0"
+ supports-color "^7.1.0"
+
+istanbul-lib-source-maps@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz#895f3a709fcfba34c6de5a42939022f3e4358551"
+ integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==
+ dependencies:
+ debug "^4.1.1"
+ istanbul-lib-coverage "^3.0.0"
+ source-map "^0.6.1"
+
+istanbul-reports@^3.1.3:
+ version "3.1.7"
+ resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.7.tgz#daed12b9e1dca518e15c056e1e537e741280fa0b"
+ integrity sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==
+ dependencies:
+ html-escaper "^2.0.0"
+ istanbul-lib-report "^3.0.0"
+
+jest-changed-files@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.7.0.tgz#1c06d07e77c78e1585d020424dedc10d6e17ac3a"
+ integrity sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==
+ dependencies:
+ execa "^5.0.0"
+ jest-util "^29.7.0"
+ p-limit "^3.1.0"
+
+jest-circus@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-29.7.0.tgz#b6817a45fcc835d8b16d5962d0c026473ee3668a"
+ integrity sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==
+ dependencies:
+ "@jest/environment" "^29.7.0"
+ "@jest/expect" "^29.7.0"
+ "@jest/test-result" "^29.7.0"
+ "@jest/types" "^29.6.3"
+ "@types/node" "*"
+ chalk "^4.0.0"
+ co "^4.6.0"
+ dedent "^1.0.0"
+ is-generator-fn "^2.0.0"
+ jest-each "^29.7.0"
+ jest-matcher-utils "^29.7.0"
+ jest-message-util "^29.7.0"
+ jest-runtime "^29.7.0"
+ jest-snapshot "^29.7.0"
+ jest-util "^29.7.0"
+ p-limit "^3.1.0"
+ pretty-format "^29.7.0"
+ pure-rand "^6.0.0"
+ slash "^3.0.0"
+ stack-utils "^2.0.3"
+
+jest-cli@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-29.7.0.tgz#5592c940798e0cae677eec169264f2d839a37995"
+ integrity sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==
+ dependencies:
+ "@jest/core" "^29.7.0"
+ "@jest/test-result" "^29.7.0"
+ "@jest/types" "^29.6.3"
+ chalk "^4.0.0"
+ create-jest "^29.7.0"
+ exit "^0.1.2"
+ import-local "^3.0.2"
+ jest-config "^29.7.0"
+ jest-util "^29.7.0"
+ jest-validate "^29.7.0"
+ yargs "^17.3.1"
+
+jest-config@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-29.7.0.tgz#bcbda8806dbcc01b1e316a46bb74085a84b0245f"
+ integrity sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==
+ dependencies:
+ "@babel/core" "^7.11.6"
+ "@jest/test-sequencer" "^29.7.0"
+ "@jest/types" "^29.6.3"
+ babel-jest "^29.7.0"
+ chalk "^4.0.0"
+ ci-info "^3.2.0"
+ deepmerge "^4.2.2"
+ glob "^7.1.3"
+ graceful-fs "^4.2.9"
+ jest-circus "^29.7.0"
+ jest-environment-node "^29.7.0"
+ jest-get-type "^29.6.3"
+ jest-regex-util "^29.6.3"
+ jest-resolve "^29.7.0"
+ jest-runner "^29.7.0"
+ jest-util "^29.7.0"
+ jest-validate "^29.7.0"
+ micromatch "^4.0.4"
+ parse-json "^5.2.0"
+ pretty-format "^29.7.0"
+ slash "^3.0.0"
+ strip-json-comments "^3.1.1"
+
+jest-diff@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.7.0.tgz#017934a66ebb7ecf6f205e84699be10afd70458a"
+ integrity sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==
+ dependencies:
+ chalk "^4.0.0"
+ diff-sequences "^29.6.3"
+ jest-get-type "^29.6.3"
+ pretty-format "^29.7.0"
+
+jest-docblock@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-29.7.0.tgz#8fddb6adc3cdc955c93e2a87f61cfd350d5d119a"
+ integrity sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==
+ dependencies:
+ detect-newline "^3.0.0"
+
+jest-each@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-29.7.0.tgz#162a9b3f2328bdd991beaabffbb74745e56577d1"
+ integrity sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==
+ dependencies:
+ "@jest/types" "^29.6.3"
+ chalk "^4.0.0"
+ jest-get-type "^29.6.3"
+ jest-util "^29.7.0"
+ pretty-format "^29.7.0"
+
+jest-environment-jsdom@29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-29.7.0.tgz#d206fa3551933c3fd519e5dfdb58a0f5139a837f"
+ integrity sha512-k9iQbsf9OyOfdzWH8HDmrRT0gSIcX+FLNW7IQq94tFX0gynPwqDTW0Ho6iMVNjGz/nb+l/vW3dWM2bbLLpkbXA==
+ dependencies:
+ "@jest/environment" "^29.7.0"
+ "@jest/fake-timers" "^29.7.0"
+ "@jest/types" "^29.6.3"
+ "@types/jsdom" "^20.0.0"
+ "@types/node" "*"
+ jest-mock "^29.7.0"
+ jest-util "^29.7.0"
+ jsdom "^20.0.0"
+
+jest-environment-node@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.7.0.tgz#0b93e111dda8ec120bc8300e6d1fb9576e164376"
+ integrity sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==
+ dependencies:
+ "@jest/environment" "^29.7.0"
+ "@jest/fake-timers" "^29.7.0"
+ "@jest/types" "^29.6.3"
+ "@types/node" "*"
+ jest-mock "^29.7.0"
+ jest-util "^29.7.0"
+
+jest-get-type@^29.6.3:
+ version "29.6.3"
+ resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.6.3.tgz#36f499fdcea197c1045a127319c0481723908fd1"
+ integrity sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==
+
+jest-haste-map@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.7.0.tgz#3c2396524482f5a0506376e6c858c3bbcc17b104"
+ integrity sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==
+ dependencies:
+ "@jest/types" "^29.6.3"
+ "@types/graceful-fs" "^4.1.3"
+ "@types/node" "*"
+ anymatch "^3.0.3"
+ fb-watchman "^2.0.0"
+ graceful-fs "^4.2.9"
+ jest-regex-util "^29.6.3"
+ jest-util "^29.7.0"
+ jest-worker "^29.7.0"
+ micromatch "^4.0.4"
+ walker "^1.0.8"
+ optionalDependencies:
+ fsevents "^2.3.2"
+
+jest-leak-detector@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz#5b7ec0dadfdfec0ca383dc9aa016d36b5ea4c728"
+ integrity sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==
+ dependencies:
+ jest-get-type "^29.6.3"
+ pretty-format "^29.7.0"
+
+jest-matcher-utils@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz#ae8fec79ff249fd592ce80e3ee474e83a6c44f12"
+ integrity sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==
+ dependencies:
+ chalk "^4.0.0"
+ jest-diff "^29.7.0"
+ jest-get-type "^29.6.3"
+ pretty-format "^29.7.0"
+
+jest-message-util@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.7.0.tgz#8bc392e204e95dfe7564abbe72a404e28e51f7f3"
+ integrity sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==
+ dependencies:
+ "@babel/code-frame" "^7.12.13"
+ "@jest/types" "^29.6.3"
+ "@types/stack-utils" "^2.0.0"
+ chalk "^4.0.0"
+ graceful-fs "^4.2.9"
+ micromatch "^4.0.4"
+ pretty-format "^29.7.0"
+ slash "^3.0.0"
+ stack-utils "^2.0.3"
+
+jest-mock@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.7.0.tgz#4e836cf60e99c6fcfabe9f99d017f3fdd50a6347"
+ integrity sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==
+ dependencies:
+ "@jest/types" "^29.6.3"
+ "@types/node" "*"
+ jest-util "^29.7.0"
+
+jest-pnp-resolver@^1.2.2:
+ version "1.2.3"
+ resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz#930b1546164d4ad5937d5540e711d4d38d4cad2e"
+ integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==
+
+jest-regex-util@^29.6.3:
+ version "29.6.3"
+ resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.6.3.tgz#4a556d9c776af68e1c5f48194f4d0327d24e8a52"
+ integrity sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==
+
+jest-resolve-dependencies@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz#1b04f2c095f37fc776ff40803dc92921b1e88428"
+ integrity sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==
+ dependencies:
+ jest-regex-util "^29.6.3"
+ jest-snapshot "^29.7.0"
+
+jest-resolve@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-29.7.0.tgz#64d6a8992dd26f635ab0c01e5eef4399c6bcbc30"
+ integrity sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==
+ dependencies:
+ chalk "^4.0.0"
+ graceful-fs "^4.2.9"
+ jest-haste-map "^29.7.0"
+ jest-pnp-resolver "^1.2.2"
+ jest-util "^29.7.0"
+ jest-validate "^29.7.0"
+ resolve "^1.20.0"
+ resolve.exports "^2.0.0"
+ slash "^3.0.0"
+
+jest-runner@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-29.7.0.tgz#809af072d408a53dcfd2e849a4c976d3132f718e"
+ integrity sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==
+ dependencies:
+ "@jest/console" "^29.7.0"
+ "@jest/environment" "^29.7.0"
+ "@jest/test-result" "^29.7.0"
+ "@jest/transform" "^29.7.0"
+ "@jest/types" "^29.6.3"
+ "@types/node" "*"
+ chalk "^4.0.0"
+ emittery "^0.13.1"
+ graceful-fs "^4.2.9"
+ jest-docblock "^29.7.0"
+ jest-environment-node "^29.7.0"
+ jest-haste-map "^29.7.0"
+ jest-leak-detector "^29.7.0"
+ jest-message-util "^29.7.0"
+ jest-resolve "^29.7.0"
+ jest-runtime "^29.7.0"
+ jest-util "^29.7.0"
+ jest-watcher "^29.7.0"
+ jest-worker "^29.7.0"
+ p-limit "^3.1.0"
+ source-map-support "0.5.13"
+
+jest-runtime@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-29.7.0.tgz#efecb3141cf7d3767a3a0cc8f7c9990587d3d817"
+ integrity sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==
+ dependencies:
+ "@jest/environment" "^29.7.0"
+ "@jest/fake-timers" "^29.7.0"
+ "@jest/globals" "^29.7.0"
+ "@jest/source-map" "^29.6.3"
+ "@jest/test-result" "^29.7.0"
+ "@jest/transform" "^29.7.0"
+ "@jest/types" "^29.6.3"
+ "@types/node" "*"
+ chalk "^4.0.0"
+ cjs-module-lexer "^1.0.0"
+ collect-v8-coverage "^1.0.0"
+ glob "^7.1.3"
+ graceful-fs "^4.2.9"
+ jest-haste-map "^29.7.0"
+ jest-message-util "^29.7.0"
+ jest-mock "^29.7.0"
+ jest-regex-util "^29.6.3"
+ jest-resolve "^29.7.0"
+ jest-snapshot "^29.7.0"
+ jest-util "^29.7.0"
+ slash "^3.0.0"
+ strip-bom "^4.0.0"
+
+jest-snapshot@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.7.0.tgz#c2c574c3f51865da1bb329036778a69bf88a6be5"
+ integrity sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==
+ dependencies:
+ "@babel/core" "^7.11.6"
+ "@babel/generator" "^7.7.2"
+ "@babel/plugin-syntax-jsx" "^7.7.2"
+ "@babel/plugin-syntax-typescript" "^7.7.2"
+ "@babel/types" "^7.3.3"
+ "@jest/expect-utils" "^29.7.0"
+ "@jest/transform" "^29.7.0"
+ "@jest/types" "^29.6.3"
+ babel-preset-current-node-syntax "^1.0.0"
+ chalk "^4.0.0"
+ expect "^29.7.0"
+ graceful-fs "^4.2.9"
+ jest-diff "^29.7.0"
+ jest-get-type "^29.6.3"
+ jest-matcher-utils "^29.7.0"
+ jest-message-util "^29.7.0"
+ jest-util "^29.7.0"
+ natural-compare "^1.4.0"
+ pretty-format "^29.7.0"
+ semver "^7.5.3"
+
+jest-util@^29.0.0, jest-util@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.7.0.tgz#23c2b62bfb22be82b44de98055802ff3710fc0bc"
+ integrity sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==
+ dependencies:
+ "@jest/types" "^29.6.3"
+ "@types/node" "*"
+ chalk "^4.0.0"
+ ci-info "^3.2.0"
+ graceful-fs "^4.2.9"
+ picomatch "^2.2.3"
+
+jest-validate@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.7.0.tgz#7bf705511c64da591d46b15fce41400d52147d9c"
+ integrity sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==
+ dependencies:
+ "@jest/types" "^29.6.3"
+ camelcase "^6.2.0"
+ chalk "^4.0.0"
+ jest-get-type "^29.6.3"
+ leven "^3.1.0"
+ pretty-format "^29.7.0"
+
+jest-watcher@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-29.7.0.tgz#7810d30d619c3a62093223ce6bb359ca1b28a2f2"
+ integrity sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==
+ dependencies:
+ "@jest/test-result" "^29.7.0"
+ "@jest/types" "^29.6.3"
+ "@types/node" "*"
+ ansi-escapes "^4.2.1"
+ chalk "^4.0.0"
+ emittery "^0.13.1"
+ jest-util "^29.7.0"
+ string-length "^4.0.1"
+
+jest-worker@^27.4.5:
+ version "27.5.1"
+ resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0"
+ integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==
+ dependencies:
+ "@types/node" "*"
+ merge-stream "^2.0.0"
+ supports-color "^8.0.0"
+
+jest-worker@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.7.0.tgz#acad073acbbaeb7262bd5389e1bcf43e10058d4a"
+ integrity sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==
+ dependencies:
+ "@types/node" "*"
+ jest-util "^29.7.0"
+ merge-stream "^2.0.0"
+ supports-color "^8.0.0"
+
+jest@29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest/-/jest-29.7.0.tgz#994676fc24177f088f1c5e3737f5697204ff2613"
+ integrity sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==
+ dependencies:
+ "@jest/core" "^29.7.0"
+ "@jest/types" "^29.6.3"
+ import-local "^3.0.2"
+ jest-cli "^29.7.0"
+
+js-base64@3.7.2:
+ version "3.7.2"
+ resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-3.7.2.tgz#816d11d81a8aff241603d19ce5761e13e41d7745"
+ integrity sha512-NnRs6dsyqUXejqk/yv2aiXlAvOs56sLkX6nUdeaNezI5LFFLlsZjOThmwnrcwh5ZZRwZlCMnVAY3CvhIhoVEKQ==
+
+js-tokens@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
+ integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
+
+js-yaml@^3.13.1:
+ version "3.14.1"
+ resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537"
+ integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==
+ dependencies:
+ argparse "^1.0.7"
+ esprima "^4.0.0"
+
+jsdom@^20.0.0:
+ version "20.0.3"
+ resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-20.0.3.tgz#886a41ba1d4726f67a8858028c99489fed6ad4db"
+ integrity sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ==
+ dependencies:
+ abab "^2.0.6"
+ acorn "^8.8.1"
+ acorn-globals "^7.0.0"
+ cssom "^0.5.0"
+ cssstyle "^2.3.0"
+ data-urls "^3.0.2"
+ decimal.js "^10.4.2"
+ domexception "^4.0.0"
+ escodegen "^2.0.0"
+ form-data "^4.0.0"
+ html-encoding-sniffer "^3.0.0"
+ http-proxy-agent "^5.0.0"
+ https-proxy-agent "^5.0.1"
+ is-potential-custom-element-name "^1.0.1"
+ nwsapi "^2.2.2"
+ parse5 "^7.1.1"
+ saxes "^6.0.0"
+ symbol-tree "^3.2.4"
+ tough-cookie "^4.1.2"
+ w3c-xmlserializer "^4.0.0"
+ webidl-conversions "^7.0.0"
+ whatwg-encoding "^2.0.0"
+ whatwg-mimetype "^3.0.0"
+ whatwg-url "^11.0.0"
+ ws "^8.11.0"
+ xml-name-validator "^4.0.0"
+
+jsesc@^3.0.2:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-3.1.0.tgz#74d335a234f67ed19907fdadfac7ccf9d409825d"
+ integrity sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==
+
+json-parse-even-better-errors@^2.3.0, json-parse-even-better-errors@^2.3.1:
+ version "2.3.1"
+ resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d"
+ integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==
+
+json-schema-traverse@^0.4.1:
+ version "0.4.1"
+ resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660"
+ integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==
+
+json-schema-traverse@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2"
+ integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==
+
+json5@^2.2.3:
+ version "2.2.3"
+ resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283"
+ integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==
+
+kleur@^3.0.3:
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e"
+ integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==
+
+leven@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2"
+ integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==
+
+lines-and-columns@^1.1.6:
+ version "1.2.4"
+ resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632"
+ integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==
+
+loader-runner@^4.2.0:
+ version "4.3.0"
+ resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1"
+ integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==
+
+locate-path@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0"
+ integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==
+ dependencies:
+ p-locate "^4.1.0"
+
+lodash.memoize@4.x:
+ version "4.1.2"
+ resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe"
+ integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==
+
+lru-cache@^5.1.1:
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920"
+ integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==
+ dependencies:
+ yallist "^3.0.2"
+
+make-dir@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e"
+ integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==
+ dependencies:
+ semver "^7.5.3"
+
+make-error@1.x:
+ version "1.3.6"
+ resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2"
+ integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==
+
+makeerror@1.0.12:
+ version "1.0.12"
+ resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.12.tgz#3e5dd2079a82e812e983cc6610c4a2cb0eaa801a"
+ integrity sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==
+ dependencies:
+ tmpl "1.0.5"
+
+math-intrinsics@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.0.0.tgz#4e04bf87c85aa51e90d078dac2252b4eb5260817"
+ integrity sha512-4MqMiKP90ybymYvsut0CH2g4XWbfLtmlCkXmtmdcDCxNB+mQcu1w/1+L/VD7vi/PSv7X2JYV7SCcR+jiPXnQtA==
+
+merge-stream@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60"
+ integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==
+
+micromatch@^4.0.0, micromatch@^4.0.4:
+ version "4.0.8"
+ resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202"
+ integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==
+ dependencies:
+ braces "^3.0.3"
+ picomatch "^2.3.1"
+
+mime-db@1.52.0:
+ version "1.52.0"
+ resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70"
+ integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==
+
+mime-types@^2.1.12, mime-types@^2.1.27:
+ version "2.1.35"
+ resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a"
+ integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==
+ dependencies:
+ mime-db "1.52.0"
+
+mimic-fn@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b"
+ integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==
+
+minimatch@^3.0.4, minimatch@^3.1.1:
+ version "3.1.2"
+ resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b"
+ integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==
+ dependencies:
+ brace-expansion "^1.1.7"
+
+ms@^2.1.3:
+ version "2.1.3"
+ resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
+ integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
+
+natural-compare@^1.4.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
+ integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==
+
+neo-async@^2.6.2:
+ version "2.6.2"
+ resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f"
+ integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==
+
+node-fetch@2.7.0:
+ version "2.7.0"
+ resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d"
+ integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==
+ dependencies:
+ whatwg-url "^5.0.0"
+
+node-int64@^0.4.0:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b"
+ integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==
+
+node-releases@^2.0.19:
+ version "2.0.19"
+ resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.19.tgz#9e445a52950951ec4d177d843af370b411caf314"
+ integrity sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==
+
+normalize-path@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
+ integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==
+
+npm-run-path@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea"
+ integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==
+ dependencies:
+ path-key "^3.0.0"
+
+nwsapi@^2.2.2:
+ version "2.2.16"
+ resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.16.tgz#177760bba02c351df1d2644e220c31dfec8cdb43"
+ integrity sha512-F1I/bimDpj3ncaNDhfyMWuFqmQDBwDB0Fogc2qpL3BWvkQteFD/8BzWuIRl83rq0DXfm8SGt/HFhLXZyljTXcQ==
+
+object-inspect@^1.13.3:
+ version "1.13.3"
+ resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.3.tgz#f14c183de51130243d6d18ae149375ff50ea488a"
+ integrity sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==
+
+once@^1.3.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
+ integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==
+ dependencies:
+ wrappy "1"
+
+onetime@^5.1.2:
+ version "5.1.2"
+ resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e"
+ integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==
+ dependencies:
+ mimic-fn "^2.1.0"
+
+p-limit@^2.2.0:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1"
+ integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==
+ dependencies:
+ p-try "^2.0.0"
+
+p-limit@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b"
+ integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==
+ dependencies:
+ yocto-queue "^0.1.0"
+
+p-locate@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07"
+ integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==
+ dependencies:
+ p-limit "^2.2.0"
+
+p-try@^2.0.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6"
+ integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==
+
+parse-json@^5.2.0:
+ version "5.2.0"
+ resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd"
+ integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==
+ dependencies:
+ "@babel/code-frame" "^7.0.0"
+ error-ex "^1.3.1"
+ json-parse-even-better-errors "^2.3.0"
+ lines-and-columns "^1.1.6"
+
+parse5@^7.0.0, parse5@^7.1.1:
+ version "7.2.1"
+ resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.2.1.tgz#8928f55915e6125f430cc44309765bf17556a33a"
+ integrity sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ==
+ dependencies:
+ entities "^4.5.0"
+
+path-exists@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3"
+ integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==
+
+path-is-absolute@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
+ integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==
+
+path-key@^3.0.0, path-key@^3.1.0:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375"
+ integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==
+
+path-parse@^1.0.7:
+ version "1.0.7"
+ resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735"
+ integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==
+
+picocolors@^1.0.0, picocolors@^1.1.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b"
+ integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==
+
+picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1:
+ version "2.3.1"
+ resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
+ integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
+
+pirates@^4.0.4:
+ version "4.0.6"
+ resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9"
+ integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==
+
+pkg-dir@^4.2.0:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3"
+ integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==
+ dependencies:
+ find-up "^4.0.0"
+
+prettier@2.7.1:
+ version "2.7.1"
+ resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64"
+ integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==
+
+pretty-format@^29.0.0, pretty-format@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.7.0.tgz#ca42c758310f365bfa71a0bda0a807160b776812"
+ integrity sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==
+ dependencies:
+ "@jest/schemas" "^29.6.3"
+ ansi-styles "^5.0.0"
+ react-is "^18.0.0"
+
+process@^0.11.10:
+ version "0.11.10"
+ resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182"
+ integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==
+
+prompts@^2.0.1:
+ version "2.4.2"
+ resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069"
+ integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==
+ dependencies:
+ kleur "^3.0.3"
+ sisteransi "^1.0.5"
+
+psl@^1.1.33:
+ version "1.15.0"
+ resolved "https://registry.yarnpkg.com/psl/-/psl-1.15.0.tgz#bdace31896f1d97cec6a79e8224898ce93d974c6"
+ integrity sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==
+ dependencies:
+ punycode "^2.3.1"
+
+punycode@^2.1.0, punycode@^2.1.1, punycode@^2.3.1:
+ version "2.3.1"
+ resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5"
+ integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==
+
+pure-rand@^6.0.0:
+ version "6.1.0"
+ resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-6.1.0.tgz#d173cf23258231976ccbdb05247c9787957604f2"
+ integrity sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==
+
+qs@6.11.2:
+ version "6.11.2"
+ resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.2.tgz#64bea51f12c1f5da1bc01496f48ffcff7c69d7d9"
+ integrity sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==
+ dependencies:
+ side-channel "^1.0.4"
+
+querystringify@^2.1.1:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6"
+ integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==
+
+randombytes@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a"
+ integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==
+ dependencies:
+ safe-buffer "^5.1.0"
+
+react-is@^18.0.0:
+ version "18.3.1"
+ resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.3.1.tgz#e83557dc12eae63a99e003a46388b1dcbb44db7e"
+ integrity sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==
+
+readable-stream@^4.5.2:
+ version "4.5.2"
+ resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-4.5.2.tgz#9e7fc4c45099baeed934bff6eb97ba6cf2729e09"
+ integrity sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==
+ dependencies:
+ abort-controller "^3.0.0"
+ buffer "^6.0.3"
+ events "^3.3.0"
+ process "^0.11.10"
+ string_decoder "^1.3.0"
+
+require-directory@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
+ integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==
+
+require-from-string@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909"
+ integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==
+
+requires-port@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff"
+ integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==
+
+resolve-cwd@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d"
+ integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==
+ dependencies:
+ resolve-from "^5.0.0"
+
+resolve-from@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69"
+ integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==
+
+resolve.exports@^2.0.0:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.3.tgz#41955e6f1b4013b7586f873749a635dea07ebe3f"
+ integrity sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==
+
+resolve@^1.20.0:
+ version "1.22.9"
+ resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.9.tgz#6da76e4cdc57181fa4471231400e8851d0a924f3"
+ integrity sha512-QxrmX1DzraFIi9PxdG5VkRfRwIgjwyud+z/iBwfRRrVmHc+P9Q7u2lSSpQ6bjr2gy5lrqIiU9vb6iAeGf2400A==
+ dependencies:
+ is-core-module "^2.16.0"
+ path-parse "^1.0.7"
+ supports-preserve-symlinks-flag "^1.0.0"
+
+safe-buffer@^5.1.0, safe-buffer@~5.2.0:
+ version "5.2.1"
+ resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
+ integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
+
+safe-buffer@~5.1.1:
+ version "5.1.2"
+ resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
+ integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
+
+"safer-buffer@>= 2.1.2 < 3.0.0":
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
+ integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
+
+saxes@^6.0.0:
+ version "6.0.0"
+ resolved "https://registry.yarnpkg.com/saxes/-/saxes-6.0.0.tgz#fe5b4a4768df4f14a201b1ba6a65c1f3d9988cc5"
+ integrity sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==
+ dependencies:
+ xmlchars "^2.2.0"
+
+schema-utils@^3.2.0:
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.3.0.tgz#f50a88877c3c01652a15b622ae9e9795df7a60fe"
+ integrity sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==
+ dependencies:
+ "@types/json-schema" "^7.0.8"
+ ajv "^6.12.5"
+ ajv-keywords "^3.5.2"
+
+schema-utils@^4.3.0:
+ version "4.3.0"
+ resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.3.0.tgz#3b669f04f71ff2dfb5aba7ce2d5a9d79b35622c0"
+ integrity sha512-Gf9qqc58SpCA/xdziiHz35F4GNIWYWZrEshUc/G/r5BnLph6xpKuLeoJoQuj5WfBIx/eQLf+hmVPYHaxJu7V2g==
+ dependencies:
+ "@types/json-schema" "^7.0.9"
+ ajv "^8.9.0"
+ ajv-formats "^2.1.1"
+ ajv-keywords "^5.1.0"
+
+semver@^6.3.0, semver@^6.3.1:
+ version "6.3.1"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4"
+ integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==
+
+semver@^7.3.4, semver@^7.5.3, semver@^7.5.4:
+ version "7.6.3"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143"
+ integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==
+
+serialize-javascript@^6.0.2:
+ version "6.0.2"
+ resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2"
+ integrity sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==
+ dependencies:
+ randombytes "^2.1.0"
+
+set-function-length@^1.2.2:
+ version "1.2.2"
+ resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449"
+ integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==
+ dependencies:
+ define-data-property "^1.1.4"
+ es-errors "^1.3.0"
+ function-bind "^1.1.2"
+ get-intrinsic "^1.2.4"
+ gopd "^1.0.1"
+ has-property-descriptors "^1.0.2"
+
+shebang-command@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea"
+ integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==
+ dependencies:
+ shebang-regex "^3.0.0"
+
+shebang-regex@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
+ integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==
+
+side-channel-list@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/side-channel-list/-/side-channel-list-1.0.0.tgz#10cb5984263115d3b7a0e336591e290a830af8ad"
+ integrity sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==
+ dependencies:
+ es-errors "^1.3.0"
+ object-inspect "^1.13.3"
+
+side-channel-map@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/side-channel-map/-/side-channel-map-1.0.1.tgz#d6bb6b37902c6fef5174e5f533fab4c732a26f42"
+ integrity sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==
+ dependencies:
+ call-bound "^1.0.2"
+ es-errors "^1.3.0"
+ get-intrinsic "^1.2.5"
+ object-inspect "^1.13.3"
+
+side-channel-weakmap@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz#11dda19d5368e40ce9ec2bdc1fb0ecbc0790ecea"
+ integrity sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==
+ dependencies:
+ call-bound "^1.0.2"
+ es-errors "^1.3.0"
+ get-intrinsic "^1.2.5"
+ object-inspect "^1.13.3"
+ side-channel-map "^1.0.1"
+
+side-channel@^1.0.4:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.1.0.tgz#c3fcff9c4da932784873335ec9765fa94ff66bc9"
+ integrity sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==
+ dependencies:
+ es-errors "^1.3.0"
+ object-inspect "^1.13.3"
+ side-channel-list "^1.0.0"
+ side-channel-map "^1.0.1"
+ side-channel-weakmap "^1.0.2"
+
+signal-exit@^3.0.3, signal-exit@^3.0.7:
+ version "3.0.7"
+ resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9"
+ integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==
+
+sisteransi@^1.0.5:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed"
+ integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==
+
+slash@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634"
+ integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==
+
+source-map-support@0.5.13:
+ version "0.5.13"
+ resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932"
+ integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==
+ dependencies:
+ buffer-from "^1.0.0"
+ source-map "^0.6.0"
+
+source-map-support@~0.5.20:
+ version "0.5.21"
+ resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f"
+ integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==
+ dependencies:
+ buffer-from "^1.0.0"
+ source-map "^0.6.0"
+
+source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1:
+ version "0.6.1"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
+ integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
+
+source-map@^0.7.4:
+ version "0.7.4"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656"
+ integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==
+
+sprintf-js@~1.0.2:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
+ integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==
+
+stack-utils@^2.0.3:
+ version "2.0.6"
+ resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.6.tgz#aaf0748169c02fc33c8232abccf933f54a1cc34f"
+ integrity sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==
+ dependencies:
+ escape-string-regexp "^2.0.0"
+
+string-length@^4.0.1:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a"
+ integrity sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==
+ dependencies:
+ char-regex "^1.0.2"
+ strip-ansi "^6.0.0"
+
+string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
+ version "4.2.3"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
+ integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
+ dependencies:
+ emoji-regex "^8.0.0"
+ is-fullwidth-code-point "^3.0.0"
+ strip-ansi "^6.0.1"
+
+string_decoder@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e"
+ integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==
+ dependencies:
+ safe-buffer "~5.2.0"
+
+strip-ansi@^6.0.0, strip-ansi@^6.0.1:
+ version "6.0.1"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
+ integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
+ dependencies:
+ ansi-regex "^5.0.1"
+
+strip-bom@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878"
+ integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==
+
+strip-final-newline@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad"
+ integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==
+
+strip-json-comments@^3.1.1:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006"
+ integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==
+
+supports-color@^7.1.0:
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da"
+ integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==
+ dependencies:
+ has-flag "^4.0.0"
+
+supports-color@^8.0.0:
+ version "8.1.1"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c"
+ integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==
+ dependencies:
+ has-flag "^4.0.0"
+
+supports-preserve-symlinks-flag@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09"
+ integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==
+
+symbol-tree@^3.2.4:
+ version "3.2.4"
+ resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2"
+ integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==
+
+tapable@^2.1.1, tapable@^2.2.0:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0"
+ integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==
+
+terser-webpack-plugin@^5.3.10:
+ version "5.3.11"
+ resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.11.tgz#93c21f44ca86634257cac176f884f942b7ba3832"
+ integrity sha512-RVCsMfuD0+cTt3EwX8hSl2Ks56EbFHWmhluwcqoPKtBnfjiT6olaq7PRIRfhyU8nnC2MrnDrBLfrD/RGE+cVXQ==
+ dependencies:
+ "@jridgewell/trace-mapping" "^0.3.25"
+ jest-worker "^27.4.5"
+ schema-utils "^4.3.0"
+ serialize-javascript "^6.0.2"
+ terser "^5.31.1"
+
+terser@^5.31.1:
+ version "5.37.0"
+ resolved "https://registry.yarnpkg.com/terser/-/terser-5.37.0.tgz#38aa66d1cfc43d0638fab54e43ff8a4f72a21ba3"
+ integrity sha512-B8wRRkmre4ERucLM/uXx4MOV5cbnOlVAqUst+1+iLKPI0dOgFO28f84ptoQt9HEI537PMzfYa/d+GEPKTRXmYA==
+ dependencies:
+ "@jridgewell/source-map" "^0.3.3"
+ acorn "^8.8.2"
+ commander "^2.20.0"
+ source-map-support "~0.5.20"
+
+test-exclude@^6.0.0:
+ version "6.0.0"
+ resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e"
+ integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==
+ dependencies:
+ "@istanbuljs/schema" "^0.1.2"
+ glob "^7.1.4"
+ minimatch "^3.0.4"
+
+tmpl@1.0.5:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc"
+ integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==
+
+to-regex-range@^5.0.1:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4"
+ integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==
+ dependencies:
+ is-number "^7.0.0"
+
+tough-cookie@^4.1.2:
+ version "4.1.4"
+ resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.1.4.tgz#945f1461b45b5a8c76821c33ea49c3ac192c1b36"
+ integrity sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==
+ dependencies:
+ psl "^1.1.33"
+ punycode "^2.1.1"
+ universalify "^0.2.0"
+ url-parse "^1.5.3"
+
+tr46@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/tr46/-/tr46-3.0.0.tgz#555c4e297a950617e8eeddef633c87d4d9d6cbf9"
+ integrity sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==
+ dependencies:
+ punycode "^2.1.1"
+
+tr46@~0.0.3:
+ version "0.0.3"
+ resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a"
+ integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==
+
+ts-jest@29.1.1:
+ version "29.1.1"
+ resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.1.1.tgz#f58fe62c63caf7bfcc5cc6472082f79180f0815b"
+ integrity sha512-D6xjnnbP17cC85nliwGiL+tpoKN0StpgE0TeOjXQTU6MVCfsB4v7aW05CgQ/1OywGb0x/oy9hHFnN+sczTiRaA==
+ dependencies:
+ bs-logger "0.x"
+ fast-json-stable-stringify "2.x"
+ jest-util "^29.0.0"
+ json5 "^2.2.3"
+ lodash.memoize "4.x"
+ make-error "1.x"
+ semver "^7.5.3"
+ yargs-parser "^21.0.1"
+
+ts-loader@^9.3.1:
+ version "9.5.1"
+ resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.5.1.tgz#63d5912a86312f1fbe32cef0859fb8b2193d9b89"
+ integrity sha512-rNH3sK9kGZcH9dYzC7CewQm4NtxJTjSEVRJ2DyBZR7f8/wcta+iV44UPCXc5+nzDzivKtlzV6c9P4e+oFhDLYg==
+ dependencies:
+ chalk "^4.1.0"
+ enhanced-resolve "^5.0.0"
+ micromatch "^4.0.0"
+ semver "^7.3.4"
+ source-map "^0.7.4"
+
+type-detect@4.0.8:
+ version "4.0.8"
+ resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c"
+ integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==
+
+type-fest@^0.21.3:
+ version "0.21.3"
+ resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37"
+ integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==
+
+typescript@4.6.4:
+ version "4.6.4"
+ resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.4.tgz#caa78bbc3a59e6a5c510d35703f6a09877ce45e9"
+ integrity sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==
+
+undici-types@~6.20.0:
+ version "6.20.0"
+ resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.20.0.tgz#8171bf22c1f588d1554d55bf204bc624af388433"
+ integrity sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==
+
+universalify@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0"
+ integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==
+
+update-browserslist-db@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz#80846fba1d79e82547fb661f8d141e0945755fe5"
+ integrity sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==
+ dependencies:
+ escalade "^3.2.0"
+ picocolors "^1.1.0"
+
+uri-js@^4.2.2:
+ version "4.4.1"
+ resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e"
+ integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==
+ dependencies:
+ punycode "^2.1.0"
+
+url-join@4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/url-join/-/url-join-4.0.1.tgz#b642e21a2646808ffa178c4c5fda39844e12cde7"
+ integrity sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==
+
+url-parse@^1.5.3:
+ version "1.5.10"
+ resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1"
+ integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==
+ dependencies:
+ querystringify "^2.1.1"
+ requires-port "^1.0.0"
+
+v8-to-istanbul@^9.0.1:
+ version "9.3.0"
+ resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz#b9572abfa62bd556c16d75fdebc1a411d5ff3175"
+ integrity sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==
+ dependencies:
+ "@jridgewell/trace-mapping" "^0.3.12"
+ "@types/istanbul-lib-coverage" "^2.0.1"
+ convert-source-map "^2.0.0"
+
+w3c-xmlserializer@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz#aebdc84920d806222936e3cdce408e32488a3073"
+ integrity sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==
+ dependencies:
+ xml-name-validator "^4.0.0"
+
+walker@^1.0.8:
+ version "1.0.8"
+ resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f"
+ integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==
+ dependencies:
+ makeerror "1.0.12"
+
+watchpack@^2.4.1:
+ version "2.4.2"
+ resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.2.tgz#2feeaed67412e7c33184e5a79ca738fbd38564da"
+ integrity sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==
+ dependencies:
+ glob-to-regexp "^0.4.1"
+ graceful-fs "^4.1.2"
+
+webidl-conversions@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871"
+ integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==
+
+webidl-conversions@^7.0.0:
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-7.0.0.tgz#256b4e1882be7debbf01d05f0aa2039778ea080a"
+ integrity sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==
+
+webpack-sources@^3.2.3:
+ version "3.2.3"
+ resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde"
+ integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==
+
+webpack@^5.94.0:
+ version "5.97.1"
+ resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.97.1.tgz#972a8320a438b56ff0f1d94ade9e82eac155fa58"
+ integrity sha512-EksG6gFY3L1eFMROS/7Wzgrii5mBAFe4rIr3r2BTfo7bcc+DWwFZ4OJ/miOuHJO/A85HwyI4eQ0F6IKXesO7Fg==
+ dependencies:
+ "@types/eslint-scope" "^3.7.7"
+ "@types/estree" "^1.0.6"
+ "@webassemblyjs/ast" "^1.14.1"
+ "@webassemblyjs/wasm-edit" "^1.14.1"
+ "@webassemblyjs/wasm-parser" "^1.14.1"
+ acorn "^8.14.0"
+ browserslist "^4.24.0"
+ chrome-trace-event "^1.0.2"
+ enhanced-resolve "^5.17.1"
+ es-module-lexer "^1.2.1"
+ eslint-scope "5.1.1"
+ events "^3.2.0"
+ glob-to-regexp "^0.4.1"
+ graceful-fs "^4.2.11"
+ json-parse-even-better-errors "^2.3.1"
+ loader-runner "^4.2.0"
+ mime-types "^2.1.27"
+ neo-async "^2.6.2"
+ schema-utils "^3.2.0"
+ tapable "^2.1.1"
+ terser-webpack-plugin "^5.3.10"
+ watchpack "^2.4.1"
+ webpack-sources "^3.2.3"
+
+whatwg-encoding@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz#e7635f597fd87020858626805a2729fa7698ac53"
+ integrity sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==
+ dependencies:
+ iconv-lite "0.6.3"
+
+whatwg-mimetype@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz#5fa1a7623867ff1af6ca3dc72ad6b8a4208beba7"
+ integrity sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==
+
+whatwg-url@^11.0.0:
+ version "11.0.0"
+ resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-11.0.0.tgz#0a849eebb5faf2119b901bb76fd795c2848d4018"
+ integrity sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==
+ dependencies:
+ tr46 "^3.0.0"
+ webidl-conversions "^7.0.0"
+
+whatwg-url@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d"
+ integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==
+ dependencies:
+ tr46 "~0.0.3"
+ webidl-conversions "^3.0.0"
+
+which@^2.0.1:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1"
+ integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==
+ dependencies:
+ isexe "^2.0.0"
+
+wrap-ansi@^7.0.0:
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
+ integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
+ dependencies:
+ ansi-styles "^4.0.0"
+ string-width "^4.1.0"
+ strip-ansi "^6.0.0"
+
+wrappy@1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
+ integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==
+
+write-file-atomic@^4.0.2:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.2.tgz#a9df01ae5b77858a027fd2e80768ee433555fcfd"
+ integrity sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==
+ dependencies:
+ imurmurhash "^0.1.4"
+ signal-exit "^3.0.7"
+
+ws@^8.11.0:
+ version "8.18.0"
+ resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc"
+ integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==
+
+xml-name-validator@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-4.0.0.tgz#79a006e2e63149a8600f15430f0a4725d1524835"
+ integrity sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==
+
+xmlchars@^2.2.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb"
+ integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==
+
+y18n@^5.0.5:
+ version "5.0.8"
+ resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55"
+ integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==
+
+yallist@^3.0.2:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd"
+ integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==
+
+yargs-parser@^21.0.1, yargs-parser@^21.1.1:
+ version "21.1.1"
+ resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35"
+ integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==
+
+yargs@^17.3.1:
+ version "17.7.2"
+ resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269"
+ integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==
+ dependencies:
+ cliui "^8.0.1"
+ escalade "^3.1.1"
+ get-caller-file "^2.0.5"
+ require-directory "^2.1.1"
+ string-width "^4.2.3"
+ y18n "^5.0.5"
+ yargs-parser "^21.1.1"
+
+yocto-queue@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
+ integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==