@letta-ai/letta-client 0.1.7 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Client.d.ts +8 -0
- package/Client.js +10 -0
- package/README.md +9 -9
- package/api/errors/ConflictError.js +17 -7
- package/api/errors/InternalServerError.js +17 -7
- package/api/errors/NotFoundError.js +17 -7
- package/api/errors/UnprocessableEntityError.js +17 -7
- package/api/resources/agents/client/Client.d.ts +17 -7
- package/api/resources/agents/client/Client.js +116 -39
- package/api/resources/agents/client/requests/CreateAgentRequest.d.ts +6 -9
- package/api/resources/agents/client/requests/ResetMessagesRequest.d.ts +13 -0
- package/api/resources/agents/client/requests/ResetMessagesRequest.js +5 -0
- package/api/resources/agents/client/requests/index.d.ts +1 -0
- package/api/resources/agents/resources/archivalMemory/client/Client.d.ts +2 -0
- package/api/resources/agents/resources/archivalMemory/client/Client.js +31 -21
- package/api/resources/agents/resources/context/client/Client.d.ts +2 -0
- package/api/resources/agents/resources/context/client/Client.js +20 -10
- package/api/resources/agents/resources/coreMemory/client/Client.d.ts +2 -0
- package/api/resources/agents/resources/coreMemory/client/Client.js +38 -28
- package/api/resources/agents/resources/index.js +17 -7
- package/api/resources/agents/resources/memoryVariables/client/Client.d.ts +2 -0
- package/api/resources/agents/resources/memoryVariables/client/Client.js +20 -10
- package/api/resources/agents/resources/messages/client/Client.d.ts +3 -1
- package/api/resources/agents/resources/messages/client/Client.js +37 -27
- package/api/resources/agents/resources/messages/types/LettaStreamingResponse.d.ts +1 -1
- package/api/resources/agents/resources/messages/types/MessagesListResponse.d.ts +1 -1
- package/api/resources/agents/resources/messages/types/MessagesListResponseItem.d.ts +1 -1
- package/api/resources/agents/resources/recallMemory/client/Client.d.ts +2 -0
- package/api/resources/agents/resources/recallMemory/client/Client.js +20 -10
- package/api/resources/agents/resources/sources/client/Client.d.ts +2 -0
- package/api/resources/agents/resources/sources/client/Client.js +20 -10
- package/api/resources/agents/resources/templates/client/Client.d.ts +2 -0
- package/api/resources/agents/resources/templates/client/Client.js +30 -20
- package/api/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.d.ts +1 -1
- package/api/resources/agents/resources/tools/client/Client.d.ts +2 -0
- package/api/resources/agents/resources/tools/client/Client.js +26 -16
- package/api/resources/agents/types/AgentsSearchRequestCombinator.d.ts +1 -1
- package/api/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +1 -1
- package/api/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.d.ts +1 -1
- package/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.d.ts +1 -1
- package/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.d.ts +1 -1
- package/api/resources/agents/types/CreateAgentRequestToolRulesItem.d.ts +1 -1
- package/api/resources/agents/types/UpdateAgentToolRulesItem.d.ts +1 -1
- package/api/resources/blocks/client/Client.d.ts +2 -0
- package/api/resources/blocks/client/Client.js +40 -30
- package/api/resources/health/client/Client.d.ts +2 -0
- package/api/resources/health/client/Client.js +20 -10
- package/api/resources/index.d.ts +4 -0
- package/api/resources/index.js +22 -8
- package/api/resources/jobs/client/Client.d.ts +2 -0
- package/api/resources/jobs/client/Client.js +31 -21
- package/api/resources/models/client/Client.d.ts +2 -0
- package/api/resources/models/client/Client.js +23 -13
- package/api/resources/providers/client/Client.d.ts +2 -0
- package/api/resources/providers/client/Client.js +31 -21
- package/api/resources/runs/client/Client.d.ts +117 -0
- package/api/resources/runs/client/Client.js +510 -0
- package/api/resources/runs/client/index.d.ts +1 -0
- package/api/resources/runs/client/index.js +17 -0
- package/api/resources/runs/client/requests/GetRunMessagesRequest.d.ts +50 -0
- package/api/resources/runs/client/requests/GetRunMessagesRequest.js +5 -0
- package/api/resources/runs/client/requests/index.d.ts +1 -0
- package/api/resources/runs/client/requests/index.js +2 -0
- package/api/resources/runs/index.d.ts +1 -0
- package/api/resources/runs/index.js +17 -0
- package/api/resources/sources/client/Client.d.ts +2 -0
- package/api/resources/sources/client/Client.js +43 -33
- package/api/resources/sources/resources/files/client/Client.d.ts +2 -1
- package/api/resources/sources/resources/files/client/Client.js +28 -18
- package/api/resources/sources/resources/index.js +17 -7
- package/api/resources/sources/resources/passages/client/Client.d.ts +2 -0
- package/api/resources/sources/resources/passages/client/Client.js +20 -10
- package/api/resources/tag/client/Client.d.ts +44 -0
- package/api/resources/tag/client/Client.js +146 -0
- package/api/resources/tag/client/index.d.ts +1 -0
- package/api/resources/tag/client/index.js +17 -0
- package/api/resources/tag/client/requests/ListTagsRequest.d.ts +12 -0
- package/api/resources/tag/client/requests/ListTagsRequest.js +5 -0
- package/api/resources/tag/client/requests/index.d.ts +1 -0
- package/api/resources/tag/client/requests/index.js +2 -0
- package/api/resources/tag/index.d.ts +1 -0
- package/api/resources/tag/index.js +17 -0
- package/api/resources/tools/client/Client.d.ts +2 -0
- package/api/resources/tools/client/Client.js +57 -47
- package/api/resources/tools/client/requests/ToolRunFromSource.d.ts +1 -1
- package/api/resources/tools/client/requests/ToolUpdate.d.ts +0 -2
- package/api/types/AgentStateToolRulesItem.d.ts +1 -1
- package/api/types/AgentType.d.ts +1 -1
- package/api/types/AppAuthSchemeAuthMode.d.ts +1 -1
- package/api/types/ChatCompletionRequestFunctionCall.d.ts +1 -1
- package/api/types/ChatCompletionRequestMessagesItem.d.ts +1 -1
- package/api/types/ChatCompletionRequestStop.d.ts +1 -1
- package/api/types/ChatCompletionRequestToolChoice.d.ts +1 -1
- package/api/types/EmbeddingConfigEmbeddingEndpointType.d.ts +1 -1
- package/api/types/Job.d.ts +2 -0
- package/api/types/JobStatus.d.ts +1 -1
- package/api/types/JobType.d.ts +8 -0
- package/api/types/JobType.js +10 -0
- package/api/types/LettaResponseMessagesItem.d.ts +1 -1
- package/api/types/LettaSchemasToolTool.d.ts +0 -2
- package/api/types/LlmConfigModelEndpointType.d.ts +1 -1
- package/api/types/MessageCreateRole.d.ts +1 -1
- package/api/types/MessageRole.d.ts +1 -1
- package/api/types/NotFoundErrorBodyMessage.d.ts +1 -1
- package/api/types/Run.d.ts +34 -0
- package/api/types/Run.js +5 -0
- package/api/types/SandboxConfigCreateConfig.d.ts +1 -1
- package/api/types/SandboxConfigUpdateConfig.d.ts +1 -1
- package/api/types/SandboxType.d.ts +1 -1
- package/api/types/ToolCallMessageToolCall.d.ts +1 -1
- package/api/types/ToolCreate.d.ts +0 -2
- package/api/types/ToolReturnMessageStatus.d.ts +1 -1
- package/api/types/ToolRuleType.d.ts +1 -1
- package/api/types/ToolType.d.ts +1 -1
- package/api/types/UserMessageInputContent.d.ts +1 -1
- package/api/types/ValidationErrorLocItem.d.ts +1 -1
- package/api/types/index.d.ts +2 -0
- package/api/types/index.js +2 -0
- package/core/fetcher/APIResponse.d.ts +1 -1
- package/core/fetcher/Fetcher.d.ts +1 -1
- package/core/fetcher/Fetcher.js +2 -2
- package/core/fetcher/Supplier.d.ts +1 -1
- package/core/fetcher/createRequestUrl.js +1 -2
- package/core/fetcher/getFetchFn.js +18 -9
- package/core/fetcher/getHeader.js +1 -2
- package/core/fetcher/getRequestBody.js +3 -4
- package/core/fetcher/getResponseBody.js +1 -2
- package/core/fetcher/makeRequest.d.ts +1 -1
- package/core/fetcher/requestWithRetries.js +3 -4
- package/core/fetcher/signals.d.ts +0 -1
- package/core/fetcher/signals.js +2 -3
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -1
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +6 -4
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +1 -1
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -1
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +18 -9
- package/core/form-data-utils/FormDataWrapper.d.ts +4 -4
- package/core/form-data-utils/FormDataWrapper.js +22 -12
- package/core/index.js +17 -7
- package/core/runtime/runtime.d.ts +1 -1
- package/core/runtime/runtime.js +51 -41
- package/core/schemas/Schema.d.ts +5 -5
- package/core/schemas/builders/bigint/bigint.js +1 -2
- package/core/schemas/builders/date/date.js +1 -2
- package/core/schemas/builders/enum/enum.js +1 -2
- package/core/schemas/builders/lazy/lazy.d.ts +1 -1
- package/core/schemas/builders/lazy/lazy.js +3 -4
- package/core/schemas/builders/lazy/lazyObject.js +1 -2
- package/core/schemas/builders/list/list.js +1 -2
- package/core/schemas/builders/literals/booleanLiteral.js +1 -2
- package/core/schemas/builders/literals/stringLiteral.js +1 -2
- package/core/schemas/builders/object/object.d.ts +1 -1
- package/core/schemas/builders/object/object.js +2 -3
- package/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
- package/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
- package/core/schemas/builders/object/property.js +2 -3
- package/core/schemas/builders/object/types.d.ts +11 -11
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +2 -3
- package/core/schemas/builders/object-like/types.d.ts +1 -1
- package/core/schemas/builders/record/record.js +1 -2
- package/core/schemas/builders/record/types.d.ts +2 -2
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +3 -4
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
- package/core/schemas/builders/set/set.js +1 -2
- package/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +1 -2
- package/core/schemas/builders/union/discriminant.js +1 -2
- package/core/schemas/builders/union/types.d.ts +6 -6
- package/core/schemas/builders/union/union.d.ts +1 -1
- package/core/schemas/builders/union/union.js +1 -2
- package/core/schemas/utils/MaybePromise.d.ts +1 -1
- package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +3 -3
- package/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
- package/core/schemas/utils/entries.d.ts +1 -1
- package/core/schemas/utils/entries.js +1 -2
- package/core/schemas/utils/filterObject.d.ts +1 -1
- package/core/schemas/utils/filterObject.js +1 -2
- package/core/schemas/utils/getErrorMessageForIncorrectType.js +1 -2
- package/core/schemas/utils/isPlainObject.js +1 -2
- package/core/schemas/utils/keys.d.ts +1 -1
- package/core/schemas/utils/keys.js +1 -2
- package/core/schemas/utils/maybeSkipValidation.js +1 -2
- package/core/schemas/utils/partition.js +1 -2
- package/core/streaming-fetcher/Stream.d.ts +0 -1
- package/core/streaming-fetcher/Stream.js +20 -21
- package/dist/Client.d.ts +8 -0
- package/dist/Client.js +10 -0
- package/dist/api/errors/ConflictError.js +17 -7
- package/dist/api/errors/InternalServerError.js +17 -7
- package/dist/api/errors/NotFoundError.js +17 -7
- package/dist/api/errors/UnprocessableEntityError.js +17 -7
- package/dist/api/resources/agents/client/Client.d.ts +17 -7
- package/dist/api/resources/agents/client/Client.js +116 -39
- package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +6 -9
- package/dist/api/resources/agents/client/requests/ResetMessagesRequest.d.ts +13 -0
- package/dist/api/resources/agents/client/requests/ResetMessagesRequest.js +5 -0
- package/dist/api/resources/agents/client/requests/index.d.ts +1 -0
- package/dist/api/resources/agents/resources/archivalMemory/client/Client.d.ts +2 -0
- package/dist/api/resources/agents/resources/archivalMemory/client/Client.js +31 -21
- package/dist/api/resources/agents/resources/context/client/Client.d.ts +2 -0
- package/dist/api/resources/agents/resources/context/client/Client.js +20 -10
- package/dist/api/resources/agents/resources/coreMemory/client/Client.d.ts +2 -0
- package/dist/api/resources/agents/resources/coreMemory/client/Client.js +38 -28
- package/dist/api/resources/agents/resources/index.js +17 -7
- package/dist/api/resources/agents/resources/memoryVariables/client/Client.d.ts +2 -0
- package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +20 -10
- package/dist/api/resources/agents/resources/messages/client/Client.d.ts +3 -1
- package/dist/api/resources/agents/resources/messages/client/Client.js +37 -27
- package/dist/api/resources/agents/resources/messages/types/LettaStreamingResponse.d.ts +1 -1
- package/dist/api/resources/agents/resources/messages/types/MessagesListResponse.d.ts +1 -1
- package/dist/api/resources/agents/resources/messages/types/MessagesListResponseItem.d.ts +1 -1
- package/dist/api/resources/agents/resources/recallMemory/client/Client.d.ts +2 -0
- package/dist/api/resources/agents/resources/recallMemory/client/Client.js +20 -10
- package/dist/api/resources/agents/resources/sources/client/Client.d.ts +2 -0
- package/dist/api/resources/agents/resources/sources/client/Client.js +20 -10
- package/dist/api/resources/agents/resources/templates/client/Client.d.ts +2 -0
- package/dist/api/resources/agents/resources/templates/client/Client.js +30 -20
- package/dist/api/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.d.ts +1 -1
- package/dist/api/resources/agents/resources/tools/client/Client.d.ts +2 -0
- package/dist/api/resources/agents/resources/tools/client/Client.js +26 -16
- package/dist/api/resources/agents/types/AgentsSearchRequestCombinator.d.ts +1 -1
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +1 -1
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.d.ts +1 -1
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.d.ts +1 -1
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.d.ts +1 -1
- package/dist/api/resources/agents/types/CreateAgentRequestToolRulesItem.d.ts +1 -1
- package/dist/api/resources/agents/types/UpdateAgentToolRulesItem.d.ts +1 -1
- package/dist/api/resources/blocks/client/Client.d.ts +2 -0
- package/dist/api/resources/blocks/client/Client.js +40 -30
- package/dist/api/resources/health/client/Client.d.ts +2 -0
- package/dist/api/resources/health/client/Client.js +20 -10
- package/dist/api/resources/index.d.ts +4 -0
- package/dist/api/resources/index.js +22 -8
- package/dist/api/resources/jobs/client/Client.d.ts +2 -0
- package/dist/api/resources/jobs/client/Client.js +31 -21
- package/dist/api/resources/models/client/Client.d.ts +2 -0
- package/dist/api/resources/models/client/Client.js +23 -13
- package/dist/api/resources/providers/client/Client.d.ts +2 -0
- package/dist/api/resources/providers/client/Client.js +31 -21
- package/dist/api/resources/runs/client/Client.d.ts +117 -0
- package/dist/api/resources/runs/client/Client.js +510 -0
- package/dist/api/resources/runs/client/index.d.ts +1 -0
- package/dist/api/resources/runs/client/index.js +17 -0
- package/dist/api/resources/runs/client/requests/GetRunMessagesRequest.d.ts +50 -0
- package/dist/api/resources/runs/client/requests/GetRunMessagesRequest.js +5 -0
- package/dist/api/resources/runs/client/requests/index.d.ts +1 -0
- package/dist/api/resources/runs/client/requests/index.js +2 -0
- package/dist/api/resources/runs/index.d.ts +1 -0
- package/dist/api/resources/runs/index.js +17 -0
- package/dist/api/resources/sources/client/Client.d.ts +2 -0
- package/dist/api/resources/sources/client/Client.js +43 -33
- package/dist/api/resources/sources/resources/files/client/Client.d.ts +2 -1
- package/dist/api/resources/sources/resources/files/client/Client.js +28 -18
- package/dist/api/resources/sources/resources/index.js +17 -7
- package/dist/api/resources/sources/resources/passages/client/Client.d.ts +2 -0
- package/dist/api/resources/sources/resources/passages/client/Client.js +20 -10
- package/dist/api/resources/tag/client/Client.d.ts +44 -0
- package/dist/api/resources/tag/client/Client.js +146 -0
- package/dist/api/resources/tag/client/index.d.ts +1 -0
- package/dist/api/resources/tag/client/index.js +17 -0
- package/dist/api/resources/tag/client/requests/ListTagsRequest.d.ts +12 -0
- package/dist/api/resources/tag/client/requests/ListTagsRequest.js +5 -0
- package/dist/api/resources/tag/client/requests/index.d.ts +1 -0
- package/dist/api/resources/tag/client/requests/index.js +2 -0
- package/dist/api/resources/tag/index.d.ts +1 -0
- package/dist/api/resources/tag/index.js +17 -0
- package/dist/api/resources/tools/client/Client.d.ts +2 -0
- package/dist/api/resources/tools/client/Client.js +57 -47
- package/dist/api/resources/tools/client/requests/ToolRunFromSource.d.ts +1 -1
- package/dist/api/resources/tools/client/requests/ToolUpdate.d.ts +0 -2
- package/dist/api/types/AgentStateToolRulesItem.d.ts +1 -1
- package/dist/api/types/AgentType.d.ts +1 -1
- package/dist/api/types/AppAuthSchemeAuthMode.d.ts +1 -1
- package/dist/api/types/ChatCompletionRequestFunctionCall.d.ts +1 -1
- package/dist/api/types/ChatCompletionRequestMessagesItem.d.ts +1 -1
- package/dist/api/types/ChatCompletionRequestStop.d.ts +1 -1
- package/dist/api/types/ChatCompletionRequestToolChoice.d.ts +1 -1
- package/dist/api/types/EmbeddingConfigEmbeddingEndpointType.d.ts +1 -1
- package/dist/api/types/Job.d.ts +2 -0
- package/dist/api/types/JobStatus.d.ts +1 -1
- package/dist/api/types/JobType.d.ts +8 -0
- package/dist/api/types/JobType.js +10 -0
- package/dist/api/types/LettaResponseMessagesItem.d.ts +1 -1
- package/dist/api/types/LettaSchemasToolTool.d.ts +0 -2
- package/dist/api/types/LlmConfigModelEndpointType.d.ts +1 -1
- package/dist/api/types/MessageCreateRole.d.ts +1 -1
- package/dist/api/types/MessageRole.d.ts +1 -1
- package/dist/api/types/NotFoundErrorBodyMessage.d.ts +1 -1
- package/dist/api/types/Run.d.ts +34 -0
- package/dist/api/types/Run.js +5 -0
- package/dist/api/types/SandboxConfigCreateConfig.d.ts +1 -1
- package/dist/api/types/SandboxConfigUpdateConfig.d.ts +1 -1
- package/dist/api/types/SandboxType.d.ts +1 -1
- package/dist/api/types/ToolCallMessageToolCall.d.ts +1 -1
- package/dist/api/types/ToolCreate.d.ts +0 -2
- package/dist/api/types/ToolReturnMessageStatus.d.ts +1 -1
- package/dist/api/types/ToolRuleType.d.ts +1 -1
- package/dist/api/types/ToolType.d.ts +1 -1
- package/dist/api/types/UserMessageInputContent.d.ts +1 -1
- package/dist/api/types/ValidationErrorLocItem.d.ts +1 -1
- package/dist/api/types/index.d.ts +2 -0
- package/dist/api/types/index.js +2 -0
- package/dist/core/fetcher/APIResponse.d.ts +1 -1
- package/dist/core/fetcher/Fetcher.d.ts +1 -1
- package/dist/core/fetcher/Fetcher.js +2 -2
- package/dist/core/fetcher/Supplier.d.ts +1 -1
- package/dist/core/fetcher/createRequestUrl.js +1 -2
- package/dist/core/fetcher/getFetchFn.js +18 -9
- package/dist/core/fetcher/getHeader.js +1 -2
- package/dist/core/fetcher/getRequestBody.js +3 -4
- package/dist/core/fetcher/getResponseBody.js +1 -2
- package/dist/core/fetcher/makeRequest.d.ts +1 -1
- package/dist/core/fetcher/requestWithRetries.js +3 -4
- package/dist/core/fetcher/signals.d.ts +0 -1
- package/dist/core/fetcher/signals.js +2 -3
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -1
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +6 -4
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +1 -1
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -1
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +18 -9
- package/dist/core/form-data-utils/FormDataWrapper.d.ts +4 -4
- package/dist/core/form-data-utils/FormDataWrapper.js +22 -12
- package/dist/core/index.js +17 -7
- package/dist/core/runtime/runtime.d.ts +1 -1
- package/dist/core/runtime/runtime.js +51 -41
- package/dist/core/schemas/Schema.d.ts +5 -5
- package/dist/core/schemas/builders/bigint/bigint.js +1 -2
- package/dist/core/schemas/builders/date/date.js +1 -2
- package/dist/core/schemas/builders/enum/enum.js +1 -2
- package/dist/core/schemas/builders/lazy/lazy.d.ts +1 -1
- package/dist/core/schemas/builders/lazy/lazy.js +3 -4
- package/dist/core/schemas/builders/lazy/lazyObject.js +1 -2
- package/dist/core/schemas/builders/list/list.js +1 -2
- package/dist/core/schemas/builders/literals/booleanLiteral.js +1 -2
- package/dist/core/schemas/builders/literals/stringLiteral.js +1 -2
- package/dist/core/schemas/builders/object/object.d.ts +1 -1
- package/dist/core/schemas/builders/object/object.js +2 -3
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
- package/dist/core/schemas/builders/object/property.js +2 -3
- package/dist/core/schemas/builders/object/types.d.ts +11 -11
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +2 -3
- package/dist/core/schemas/builders/object-like/types.d.ts +1 -1
- package/dist/core/schemas/builders/record/record.js +1 -2
- package/dist/core/schemas/builders/record/types.d.ts +2 -2
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +3 -4
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
- package/dist/core/schemas/builders/set/set.js +1 -2
- package/dist/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +1 -2
- package/dist/core/schemas/builders/union/discriminant.js +1 -2
- package/dist/core/schemas/builders/union/types.d.ts +6 -6
- package/dist/core/schemas/builders/union/union.d.ts +1 -1
- package/dist/core/schemas/builders/union/union.js +1 -2
- package/dist/core/schemas/utils/MaybePromise.d.ts +1 -1
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +3 -3
- package/dist/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
- package/dist/core/schemas/utils/entries.d.ts +1 -1
- package/dist/core/schemas/utils/entries.js +1 -2
- package/dist/core/schemas/utils/filterObject.d.ts +1 -1
- package/dist/core/schemas/utils/filterObject.js +1 -2
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +1 -2
- package/dist/core/schemas/utils/isPlainObject.js +1 -2
- package/dist/core/schemas/utils/keys.d.ts +1 -1
- package/dist/core/schemas/utils/keys.js +1 -2
- package/dist/core/schemas/utils/maybeSkipValidation.js +1 -2
- package/dist/core/schemas/utils/partition.js +1 -2
- package/dist/core/streaming-fetcher/Stream.d.ts +0 -1
- package/dist/core/streaming-fetcher/Stream.js +20 -21
- package/dist/environments.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +19 -8
- package/dist/serialization/resources/agents/client/index.js +17 -7
- package/dist/serialization/resources/agents/client/list.js +17 -7
- package/dist/serialization/resources/agents/client/requests/AgentsSearchRequest.js +17 -7
- package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +3 -2
- package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.js +20 -9
- package/dist/serialization/resources/agents/client/requests/UpdateAgent.js +17 -7
- package/dist/serialization/resources/agents/resources/archivalMemory/client/create.js +17 -7
- package/dist/serialization/resources/agents/resources/archivalMemory/client/index.js +17 -7
- package/dist/serialization/resources/agents/resources/archivalMemory/client/list.js +17 -7
- package/dist/serialization/resources/agents/resources/archivalMemory/client/requests/CreateArchivalMemory.js +17 -7
- package/dist/serialization/resources/agents/resources/coreMemory/client/getBlocks.js +17 -7
- package/dist/serialization/resources/agents/resources/coreMemory/client/index.js +17 -7
- package/dist/serialization/resources/agents/resources/coreMemory/client/listInContext.js +17 -7
- package/dist/serialization/resources/agents/resources/index.js +17 -7
- package/dist/serialization/resources/agents/resources/memoryVariables/types/MemoryVariablesGetResponse.js +17 -7
- package/dist/serialization/resources/agents/resources/messages/client/requests/LettaStreamingRequest.js +17 -7
- package/dist/serialization/resources/agents/resources/messages/client/requests/MessageUpdate.js +17 -7
- package/dist/serialization/resources/agents/resources/messages/types/LettaStreamingResponse.js +17 -7
- package/dist/serialization/resources/agents/resources/messages/types/MessagesListResponse.js +17 -7
- package/dist/serialization/resources/agents/resources/messages/types/MessagesListResponseItem.js +17 -7
- package/dist/serialization/resources/agents/resources/sources/client/get.js +17 -7
- package/dist/serialization/resources/agents/resources/sources/client/index.js +17 -7
- package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.d.ts +1 -1
- package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.js +18 -8
- package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateVersionRequest.js +17 -7
- package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.js +17 -7
- package/dist/serialization/resources/agents/resources/templates/types/TemplatesMigrateResponse.js +17 -7
- package/dist/serialization/resources/agents/resources/tools/client/index.js +17 -7
- package/dist/serialization/resources/agents/resources/tools/client/list.js +17 -7
- package/dist/serialization/resources/agents/types/AgentsSearchRequestCombinator.js +17 -7
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItem.js +17 -7
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemName.js +17 -7
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.js +17 -7
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.js +17 -7
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.js +17 -7
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.js +17 -7
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemVersion.js +17 -7
- package/dist/serialization/resources/agents/types/CreateAgentRequestToolRulesItem.js +17 -7
- package/dist/serialization/resources/agents/types/UpdateAgentToolRulesItem.js +17 -7
- package/dist/serialization/resources/blocks/client/index.js +17 -7
- package/dist/serialization/resources/blocks/client/list.js +17 -7
- package/dist/serialization/resources/index.d.ts +2 -0
- package/dist/serialization/resources/index.js +20 -8
- package/dist/serialization/resources/jobs/client/index.js +17 -7
- package/dist/serialization/resources/jobs/client/list.js +17 -7
- package/dist/serialization/resources/jobs/client/listActive.js +17 -7
- package/dist/serialization/resources/models/client/index.js +17 -7
- package/dist/serialization/resources/models/client/listEmbeddingModels.js +17 -7
- package/dist/serialization/resources/models/client/listLlms.js +17 -7
- package/dist/serialization/resources/providers/client/index.js +17 -7
- package/dist/serialization/resources/providers/client/listProviders.js +17 -7
- package/dist/serialization/resources/providers/client/requests/ProviderCreate.js +17 -7
- package/dist/serialization/resources/providers/client/requests/ProviderUpdate.js +17 -7
- package/dist/serialization/resources/runs/client/getRunMessages.d.ts +11 -0
- package/dist/serialization/resources/runs/client/getRunMessages.js +42 -0
- package/dist/serialization/resources/runs/client/index.d.ts +3 -0
- package/dist/serialization/resources/runs/client/index.js +39 -0
- package/dist/serialization/resources/runs/client/listActiveRuns.d.ts +11 -0
- package/dist/serialization/resources/runs/client/listActiveRuns.js +42 -0
- package/dist/serialization/resources/runs/client/listRuns.d.ts +11 -0
- package/dist/serialization/resources/runs/client/listRuns.js +42 -0
- package/dist/serialization/resources/runs/index.d.ts +1 -0
- package/dist/serialization/resources/runs/index.js +17 -0
- package/dist/serialization/resources/sources/client/getByName.js +17 -7
- package/dist/serialization/resources/sources/client/index.js +17 -7
- package/dist/serialization/resources/sources/client/list.js +17 -7
- package/dist/serialization/resources/sources/client/requests/SourceCreate.js +17 -7
- package/dist/serialization/resources/sources/client/requests/SourceUpdate.js +17 -7
- package/dist/serialization/resources/sources/resources/files/client/index.js +17 -7
- package/dist/serialization/resources/sources/resources/files/client/list.js +17 -7
- package/dist/serialization/resources/sources/resources/index.js +17 -7
- package/dist/serialization/resources/sources/resources/passages/client/index.js +17 -7
- package/dist/serialization/resources/sources/resources/passages/client/list.js +17 -7
- package/dist/serialization/resources/tag/client/index.d.ts +1 -0
- package/dist/serialization/resources/tag/client/index.js +37 -0
- package/dist/serialization/resources/tag/client/listTags.d.ts +9 -0
- package/dist/serialization/resources/tag/client/listTags.js +41 -0
- package/dist/serialization/resources/tag/index.d.ts +1 -0
- package/dist/serialization/resources/tag/index.js +17 -0
- package/dist/serialization/resources/tools/client/addBaseTool.js +17 -7
- package/dist/serialization/resources/tools/client/getByName.js +17 -7
- package/dist/serialization/resources/tools/client/index.js +17 -7
- package/dist/serialization/resources/tools/client/list.js +17 -7
- package/dist/serialization/resources/tools/client/listComposioActionsByApp.js +17 -7
- package/dist/serialization/resources/tools/client/listComposioApps.js +17 -7
- package/dist/serialization/resources/tools/client/requests/ToolRunFromSource.d.ts +1 -1
- package/dist/serialization/resources/tools/client/requests/ToolRunFromSource.js +18 -8
- package/dist/serialization/resources/tools/client/requests/ToolUpdate.d.ts +0 -1
- package/dist/serialization/resources/tools/client/requests/ToolUpdate.js +17 -8
- package/dist/serialization/types/ActionModel.js +17 -7
- package/dist/serialization/types/ActionParametersModel.js +17 -7
- package/dist/serialization/types/ActionResponseModel.js +17 -7
- package/dist/serialization/types/AgentEnvironmentVariable.js +17 -7
- package/dist/serialization/types/AgentState.js +17 -7
- package/dist/serialization/types/AgentStateToolRulesItem.js +17 -7
- package/dist/serialization/types/AgentType.js +17 -7
- package/dist/serialization/types/AppAuthScheme.js +17 -7
- package/dist/serialization/types/AppAuthSchemeAuthMode.js +17 -7
- package/dist/serialization/types/AppModel.js +17 -7
- package/dist/serialization/types/ArchivalMemorySummary.js +17 -7
- package/dist/serialization/types/AssistantFile.js +17 -7
- package/dist/serialization/types/AssistantMessageInput.js +17 -7
- package/dist/serialization/types/AssistantMessageOutput.js +17 -7
- package/dist/serialization/types/AuthRequest.js +17 -7
- package/dist/serialization/types/AuthResponse.js +17 -7
- package/dist/serialization/types/AuthSchemeField.js +17 -7
- package/dist/serialization/types/Block.js +17 -7
- package/dist/serialization/types/BlockUpdate.js +17 -7
- package/dist/serialization/types/ChatCompletionRequest.js +17 -7
- package/dist/serialization/types/ChatCompletionRequestFunctionCall.js +17 -7
- package/dist/serialization/types/ChatCompletionRequestMessagesItem.js +17 -7
- package/dist/serialization/types/ChatCompletionRequestStop.js +17 -7
- package/dist/serialization/types/ChatCompletionRequestToolChoice.js +17 -7
- package/dist/serialization/types/ChatCompletionResponse.js +17 -7
- package/dist/serialization/types/ChildToolRule.js +17 -7
- package/dist/serialization/types/Choice.js +17 -7
- package/dist/serialization/types/ConditionalToolRule.js +17 -7
- package/dist/serialization/types/ConflictErrorBody.js +17 -7
- package/dist/serialization/types/ContextWindowOverview.js +17 -7
- package/dist/serialization/types/CreateAssistantFileRequest.js +17 -7
- package/dist/serialization/types/CreateAssistantRequest.js +17 -7
- package/dist/serialization/types/CreateBlock.js +17 -7
- package/dist/serialization/types/DeleteAssistantFileResponse.js +17 -7
- package/dist/serialization/types/DeleteAssistantResponse.js +17 -7
- package/dist/serialization/types/E2BSandboxConfig.js +17 -7
- package/dist/serialization/types/EmbeddingConfig.js +17 -7
- package/dist/serialization/types/EmbeddingConfigEmbeddingEndpointType.js +17 -7
- package/dist/serialization/types/FileMetadata.js +17 -7
- package/dist/serialization/types/FunctionCallInput.js +17 -7
- package/dist/serialization/types/FunctionCallOutput.js +17 -7
- package/dist/serialization/types/FunctionSchema.js +17 -7
- package/dist/serialization/types/Health.js +17 -7
- package/dist/serialization/types/HttpValidationError.js +17 -7
- package/dist/serialization/types/InitToolRule.js +17 -7
- package/dist/serialization/types/InternalServerErrorBody.js +17 -7
- package/dist/serialization/types/Job.d.ts +2 -0
- package/dist/serialization/types/Job.js +19 -7
- package/dist/serialization/types/JobStatus.js +17 -7
- package/dist/serialization/types/JobType.d.ts +10 -0
- package/dist/serialization/types/JobType.js +44 -0
- package/dist/serialization/types/LettaRequest.js +17 -7
- package/dist/serialization/types/LettaResponse.js +17 -7
- package/dist/serialization/types/LettaResponseMessagesItem.js +17 -7
- package/dist/serialization/types/LettaSchemasLettaMessageToolCall.js +17 -7
- package/dist/serialization/types/LettaSchemasMessageMessage.js +17 -7
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionRequestTool.js +17 -7
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionRequestToolCall.js +17 -7
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionRequestToolCallFunction.js +17 -7
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionResponseMessage.js +17 -7
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionResponseToolCall.js +17 -7
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallFunction.js +17 -7
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallInput.js +17 -7
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallOutput.js +17 -7
- package/dist/serialization/types/LettaSchemasToolTool.d.ts +0 -1
- package/dist/serialization/types/LettaSchemasToolTool.js +17 -8
- package/dist/serialization/types/LettaUsageStatistics.js +17 -7
- package/dist/serialization/types/LlmConfig.js +17 -7
- package/dist/serialization/types/LlmConfigModelEndpointType.js +17 -7
- package/dist/serialization/types/LocalSandboxConfig.js +17 -7
- package/dist/serialization/types/LogProbToken.js +17 -7
- package/dist/serialization/types/Memory.js +17 -7
- package/dist/serialization/types/MessageContentLogProb.js +17 -7
- package/dist/serialization/types/MessageCreate.js +17 -7
- package/dist/serialization/types/MessageCreateRole.js +17 -7
- package/dist/serialization/types/MessageRole.js +17 -7
- package/dist/serialization/types/NotFoundErrorBody.js +17 -7
- package/dist/serialization/types/NotFoundErrorBodyMessage.js +17 -7
- package/dist/serialization/types/OpenAiAssistant.js +17 -7
- package/dist/serialization/types/Organization.js +17 -7
- package/dist/serialization/types/OrganizationCreate.js +17 -7
- package/dist/serialization/types/Passage.js +17 -7
- package/dist/serialization/types/Provider.js +17 -7
- package/dist/serialization/types/ReasoningMessage.js +17 -7
- package/dist/serialization/types/RecallMemorySummary.js +17 -7
- package/dist/serialization/types/ResponseFormat.js +17 -7
- package/dist/serialization/types/Run.d.ts +22 -0
- package/dist/serialization/types/Run.js +53 -0
- package/dist/serialization/types/SandboxConfig.js +17 -7
- package/dist/serialization/types/SandboxConfigCreate.js +17 -7
- package/dist/serialization/types/SandboxConfigCreateConfig.js +17 -7
- package/dist/serialization/types/SandboxConfigUpdate.js +17 -7
- package/dist/serialization/types/SandboxConfigUpdateConfig.js +17 -7
- package/dist/serialization/types/SandboxEnvironmentVariable.js +17 -7
- package/dist/serialization/types/SandboxEnvironmentVariableCreate.js +17 -7
- package/dist/serialization/types/SandboxEnvironmentVariableUpdate.js +17 -7
- package/dist/serialization/types/SandboxType.js +17 -7
- package/dist/serialization/types/Source.js +17 -7
- package/dist/serialization/types/SystemMessageInput.js +17 -7
- package/dist/serialization/types/SystemMessageOutput.js +17 -7
- package/dist/serialization/types/TerminalToolRule.js +17 -7
- package/dist/serialization/types/ToolCallDelta.js +17 -7
- package/dist/serialization/types/ToolCallFunctionOutput.js +17 -7
- package/dist/serialization/types/ToolCallMessage.js +17 -7
- package/dist/serialization/types/ToolCallMessageToolCall.js +17 -7
- package/dist/serialization/types/ToolCreate.d.ts +0 -1
- package/dist/serialization/types/ToolCreate.js +17 -8
- package/dist/serialization/types/ToolFunctionChoice.js +17 -7
- package/dist/serialization/types/ToolInput.js +17 -7
- package/dist/serialization/types/ToolMessage.js +17 -7
- package/dist/serialization/types/ToolReturnMessage.js +17 -7
- package/dist/serialization/types/ToolReturnMessageStatus.js +17 -7
- package/dist/serialization/types/ToolRuleType.js +17 -7
- package/dist/serialization/types/ToolType.js +17 -7
- package/dist/serialization/types/UsageStatistics.js +17 -7
- package/dist/serialization/types/User.js +17 -7
- package/dist/serialization/types/UserCreate.js +17 -7
- package/dist/serialization/types/UserMessageInput.js +17 -7
- package/dist/serialization/types/UserMessageInputContent.js +17 -7
- package/dist/serialization/types/UserMessageOutput.js +17 -7
- package/dist/serialization/types/UserUpdate.js +17 -7
- package/dist/serialization/types/ValidationError.js +17 -7
- package/dist/serialization/types/ValidationErrorLocItem.js +17 -7
- package/dist/serialization/types/index.d.ts +2 -0
- package/dist/serialization/types/index.js +2 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/environments.d.ts +1 -1
- package/index.d.ts +1 -0
- package/index.js +19 -8
- package/{jest.config.js → jest.config.mjs} +4 -1
- package/package.json +17 -16
- package/reference.md +524 -9
- package/scripts/rename-to-esm-files.js +115 -0
- package/serialization/resources/agents/client/index.js +17 -7
- package/serialization/resources/agents/client/list.js +17 -7
- package/serialization/resources/agents/client/requests/AgentsSearchRequest.js +17 -7
- package/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +3 -2
- package/serialization/resources/agents/client/requests/CreateAgentRequest.js +20 -9
- package/serialization/resources/agents/client/requests/UpdateAgent.js +17 -7
- package/serialization/resources/agents/resources/archivalMemory/client/create.js +17 -7
- package/serialization/resources/agents/resources/archivalMemory/client/index.js +17 -7
- package/serialization/resources/agents/resources/archivalMemory/client/list.js +17 -7
- package/serialization/resources/agents/resources/archivalMemory/client/requests/CreateArchivalMemory.js +17 -7
- package/serialization/resources/agents/resources/coreMemory/client/getBlocks.js +17 -7
- package/serialization/resources/agents/resources/coreMemory/client/index.js +17 -7
- package/serialization/resources/agents/resources/coreMemory/client/listInContext.js +17 -7
- package/serialization/resources/agents/resources/index.js +17 -7
- package/serialization/resources/agents/resources/memoryVariables/types/MemoryVariablesGetResponse.js +17 -7
- package/serialization/resources/agents/resources/messages/client/requests/LettaStreamingRequest.js +17 -7
- package/serialization/resources/agents/resources/messages/client/requests/MessageUpdate.js +17 -7
- package/serialization/resources/agents/resources/messages/types/LettaStreamingResponse.js +17 -7
- package/serialization/resources/agents/resources/messages/types/MessagesListResponse.js +17 -7
- package/serialization/resources/agents/resources/messages/types/MessagesListResponseItem.js +17 -7
- package/serialization/resources/agents/resources/sources/client/get.js +17 -7
- package/serialization/resources/agents/resources/sources/client/index.js +17 -7
- package/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.d.ts +1 -1
- package/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.js +18 -8
- package/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateVersionRequest.js +17 -7
- package/serialization/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.js +17 -7
- package/serialization/resources/agents/resources/templates/types/TemplatesMigrateResponse.js +17 -7
- package/serialization/resources/agents/resources/tools/client/index.js +17 -7
- package/serialization/resources/agents/resources/tools/client/list.js +17 -7
- package/serialization/resources/agents/types/AgentsSearchRequestCombinator.js +17 -7
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItem.js +17 -7
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemName.js +17 -7
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.js +17 -7
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.js +17 -7
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.js +17 -7
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.js +17 -7
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemVersion.js +17 -7
- package/serialization/resources/agents/types/CreateAgentRequestToolRulesItem.js +17 -7
- package/serialization/resources/agents/types/UpdateAgentToolRulesItem.js +17 -7
- package/serialization/resources/blocks/client/index.js +17 -7
- package/serialization/resources/blocks/client/list.js +17 -7
- package/serialization/resources/index.d.ts +2 -0
- package/serialization/resources/index.js +20 -8
- package/serialization/resources/jobs/client/index.js +17 -7
- package/serialization/resources/jobs/client/list.js +17 -7
- package/serialization/resources/jobs/client/listActive.js +17 -7
- package/serialization/resources/models/client/index.js +17 -7
- package/serialization/resources/models/client/listEmbeddingModels.js +17 -7
- package/serialization/resources/models/client/listLlms.js +17 -7
- package/serialization/resources/providers/client/index.js +17 -7
- package/serialization/resources/providers/client/listProviders.js +17 -7
- package/serialization/resources/providers/client/requests/ProviderCreate.js +17 -7
- package/serialization/resources/providers/client/requests/ProviderUpdate.js +17 -7
- package/serialization/resources/runs/client/getRunMessages.d.ts +11 -0
- package/serialization/resources/runs/client/getRunMessages.js +42 -0
- package/serialization/resources/runs/client/index.d.ts +3 -0
- package/serialization/resources/runs/client/index.js +39 -0
- package/serialization/resources/runs/client/listActiveRuns.d.ts +11 -0
- package/serialization/resources/runs/client/listActiveRuns.js +42 -0
- package/serialization/resources/runs/client/listRuns.d.ts +11 -0
- package/serialization/resources/runs/client/listRuns.js +42 -0
- package/serialization/resources/runs/index.d.ts +1 -0
- package/serialization/resources/runs/index.js +17 -0
- package/serialization/resources/sources/client/getByName.js +17 -7
- package/serialization/resources/sources/client/index.js +17 -7
- package/serialization/resources/sources/client/list.js +17 -7
- package/serialization/resources/sources/client/requests/SourceCreate.js +17 -7
- package/serialization/resources/sources/client/requests/SourceUpdate.js +17 -7
- package/serialization/resources/sources/resources/files/client/index.js +17 -7
- package/serialization/resources/sources/resources/files/client/list.js +17 -7
- package/serialization/resources/sources/resources/index.js +17 -7
- package/serialization/resources/sources/resources/passages/client/index.js +17 -7
- package/serialization/resources/sources/resources/passages/client/list.js +17 -7
- package/serialization/resources/tag/client/index.d.ts +1 -0
- package/serialization/resources/tag/client/index.js +37 -0
- package/serialization/resources/tag/client/listTags.d.ts +9 -0
- package/serialization/resources/tag/client/listTags.js +41 -0
- package/serialization/resources/tag/index.d.ts +1 -0
- package/serialization/resources/tag/index.js +17 -0
- package/serialization/resources/tools/client/addBaseTool.js +17 -7
- package/serialization/resources/tools/client/getByName.js +17 -7
- package/serialization/resources/tools/client/index.js +17 -7
- package/serialization/resources/tools/client/list.js +17 -7
- package/serialization/resources/tools/client/listComposioActionsByApp.js +17 -7
- package/serialization/resources/tools/client/listComposioApps.js +17 -7
- package/serialization/resources/tools/client/requests/ToolRunFromSource.d.ts +1 -1
- package/serialization/resources/tools/client/requests/ToolRunFromSource.js +18 -8
- package/serialization/resources/tools/client/requests/ToolUpdate.d.ts +0 -1
- package/serialization/resources/tools/client/requests/ToolUpdate.js +17 -8
- package/serialization/types/ActionModel.js +17 -7
- package/serialization/types/ActionParametersModel.js +17 -7
- package/serialization/types/ActionResponseModel.js +17 -7
- package/serialization/types/AgentEnvironmentVariable.js +17 -7
- package/serialization/types/AgentState.js +17 -7
- package/serialization/types/AgentStateToolRulesItem.js +17 -7
- package/serialization/types/AgentType.js +17 -7
- package/serialization/types/AppAuthScheme.js +17 -7
- package/serialization/types/AppAuthSchemeAuthMode.js +17 -7
- package/serialization/types/AppModel.js +17 -7
- package/serialization/types/ArchivalMemorySummary.js +17 -7
- package/serialization/types/AssistantFile.js +17 -7
- package/serialization/types/AssistantMessageInput.js +17 -7
- package/serialization/types/AssistantMessageOutput.js +17 -7
- package/serialization/types/AuthRequest.js +17 -7
- package/serialization/types/AuthResponse.js +17 -7
- package/serialization/types/AuthSchemeField.js +17 -7
- package/serialization/types/Block.js +17 -7
- package/serialization/types/BlockUpdate.js +17 -7
- package/serialization/types/ChatCompletionRequest.js +17 -7
- package/serialization/types/ChatCompletionRequestFunctionCall.js +17 -7
- package/serialization/types/ChatCompletionRequestMessagesItem.js +17 -7
- package/serialization/types/ChatCompletionRequestStop.js +17 -7
- package/serialization/types/ChatCompletionRequestToolChoice.js +17 -7
- package/serialization/types/ChatCompletionResponse.js +17 -7
- package/serialization/types/ChildToolRule.js +17 -7
- package/serialization/types/Choice.js +17 -7
- package/serialization/types/ConditionalToolRule.js +17 -7
- package/serialization/types/ConflictErrorBody.js +17 -7
- package/serialization/types/ContextWindowOverview.js +17 -7
- package/serialization/types/CreateAssistantFileRequest.js +17 -7
- package/serialization/types/CreateAssistantRequest.js +17 -7
- package/serialization/types/CreateBlock.js +17 -7
- package/serialization/types/DeleteAssistantFileResponse.js +17 -7
- package/serialization/types/DeleteAssistantResponse.js +17 -7
- package/serialization/types/E2BSandboxConfig.js +17 -7
- package/serialization/types/EmbeddingConfig.js +17 -7
- package/serialization/types/EmbeddingConfigEmbeddingEndpointType.js +17 -7
- package/serialization/types/FileMetadata.js +17 -7
- package/serialization/types/FunctionCallInput.js +17 -7
- package/serialization/types/FunctionCallOutput.js +17 -7
- package/serialization/types/FunctionSchema.js +17 -7
- package/serialization/types/Health.js +17 -7
- package/serialization/types/HttpValidationError.js +17 -7
- package/serialization/types/InitToolRule.js +17 -7
- package/serialization/types/InternalServerErrorBody.js +17 -7
- package/serialization/types/Job.d.ts +2 -0
- package/serialization/types/Job.js +19 -7
- package/serialization/types/JobStatus.js +17 -7
- package/serialization/types/JobType.d.ts +10 -0
- package/serialization/types/JobType.js +44 -0
- package/serialization/types/LettaRequest.js +17 -7
- package/serialization/types/LettaResponse.js +17 -7
- package/serialization/types/LettaResponseMessagesItem.js +17 -7
- package/serialization/types/LettaSchemasLettaMessageToolCall.js +17 -7
- package/serialization/types/LettaSchemasMessageMessage.js +17 -7
- package/serialization/types/LettaSchemasOpenaiChatCompletionRequestTool.js +17 -7
- package/serialization/types/LettaSchemasOpenaiChatCompletionRequestToolCall.js +17 -7
- package/serialization/types/LettaSchemasOpenaiChatCompletionRequestToolCallFunction.js +17 -7
- package/serialization/types/LettaSchemasOpenaiChatCompletionResponseMessage.js +17 -7
- package/serialization/types/LettaSchemasOpenaiChatCompletionResponseToolCall.js +17 -7
- package/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallFunction.js +17 -7
- package/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallInput.js +17 -7
- package/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallOutput.js +17 -7
- package/serialization/types/LettaSchemasToolTool.d.ts +0 -1
- package/serialization/types/LettaSchemasToolTool.js +17 -8
- package/serialization/types/LettaUsageStatistics.js +17 -7
- package/serialization/types/LlmConfig.js +17 -7
- package/serialization/types/LlmConfigModelEndpointType.js +17 -7
- package/serialization/types/LocalSandboxConfig.js +17 -7
- package/serialization/types/LogProbToken.js +17 -7
- package/serialization/types/Memory.js +17 -7
- package/serialization/types/MessageContentLogProb.js +17 -7
- package/serialization/types/MessageCreate.js +17 -7
- package/serialization/types/MessageCreateRole.js +17 -7
- package/serialization/types/MessageRole.js +17 -7
- package/serialization/types/NotFoundErrorBody.js +17 -7
- package/serialization/types/NotFoundErrorBodyMessage.js +17 -7
- package/serialization/types/OpenAiAssistant.js +17 -7
- package/serialization/types/Organization.js +17 -7
- package/serialization/types/OrganizationCreate.js +17 -7
- package/serialization/types/Passage.js +17 -7
- package/serialization/types/Provider.js +17 -7
- package/serialization/types/ReasoningMessage.js +17 -7
- package/serialization/types/RecallMemorySummary.js +17 -7
- package/serialization/types/ResponseFormat.js +17 -7
- package/serialization/types/Run.d.ts +22 -0
- package/serialization/types/Run.js +53 -0
- package/serialization/types/SandboxConfig.js +17 -7
- package/serialization/types/SandboxConfigCreate.js +17 -7
- package/serialization/types/SandboxConfigCreateConfig.js +17 -7
- package/serialization/types/SandboxConfigUpdate.js +17 -7
- package/serialization/types/SandboxConfigUpdateConfig.js +17 -7
- package/serialization/types/SandboxEnvironmentVariable.js +17 -7
- package/serialization/types/SandboxEnvironmentVariableCreate.js +17 -7
- package/serialization/types/SandboxEnvironmentVariableUpdate.js +17 -7
- package/serialization/types/SandboxType.js +17 -7
- package/serialization/types/Source.js +17 -7
- package/serialization/types/SystemMessageInput.js +17 -7
- package/serialization/types/SystemMessageOutput.js +17 -7
- package/serialization/types/TerminalToolRule.js +17 -7
- package/serialization/types/ToolCallDelta.js +17 -7
- package/serialization/types/ToolCallFunctionOutput.js +17 -7
- package/serialization/types/ToolCallMessage.js +17 -7
- package/serialization/types/ToolCallMessageToolCall.js +17 -7
- package/serialization/types/ToolCreate.d.ts +0 -1
- package/serialization/types/ToolCreate.js +17 -8
- package/serialization/types/ToolFunctionChoice.js +17 -7
- package/serialization/types/ToolInput.js +17 -7
- package/serialization/types/ToolMessage.js +17 -7
- package/serialization/types/ToolReturnMessage.js +17 -7
- package/serialization/types/ToolReturnMessageStatus.js +17 -7
- package/serialization/types/ToolRuleType.js +17 -7
- package/serialization/types/ToolType.js +17 -7
- package/serialization/types/UsageStatistics.js +17 -7
- package/serialization/types/User.js +17 -7
- package/serialization/types/UserCreate.js +17 -7
- package/serialization/types/UserMessageInput.js +17 -7
- package/serialization/types/UserMessageInputContent.js +17 -7
- package/serialization/types/UserMessageOutput.js +17 -7
- package/serialization/types/UserUpdate.js +17 -7
- package/serialization/types/ValidationError.js +17 -7
- package/serialization/types/ValidationErrorLocItem.js +17 -7
- package/serialization/types/index.d.ts +2 -0
- package/serialization/types/index.js +2 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
39
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
40
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -71,12 +81,12 @@ class Sources {
|
|
|
71
81
|
* await client.sources.get("source_id")
|
|
72
82
|
*/
|
|
73
83
|
get(sourceId, requestOptions) {
|
|
74
|
-
var _a, _b;
|
|
75
84
|
return __awaiter(this, void 0, void 0, function* () {
|
|
85
|
+
var _a, _b, _c;
|
|
76
86
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
77
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
87
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}`),
|
|
78
88
|
method: "GET",
|
|
79
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
89
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.9", "User-Agent": "@letta-ai/letta-client/0.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
80
90
|
contentType: "application/json",
|
|
81
91
|
requestType: "json",
|
|
82
92
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -136,12 +146,12 @@ class Sources {
|
|
|
136
146
|
* await client.sources.delete("source_id")
|
|
137
147
|
*/
|
|
138
148
|
delete(sourceId, requestOptions) {
|
|
139
|
-
var _a, _b;
|
|
140
149
|
return __awaiter(this, void 0, void 0, function* () {
|
|
150
|
+
var _a, _b, _c;
|
|
141
151
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
142
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
152
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}`),
|
|
143
153
|
method: "DELETE",
|
|
144
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
154
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.9", "User-Agent": "@letta-ai/letta-client/0.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
145
155
|
contentType: "application/json",
|
|
146
156
|
requestType: "json",
|
|
147
157
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -195,13 +205,13 @@ class Sources {
|
|
|
195
205
|
* @example
|
|
196
206
|
* await client.sources.update("source_id")
|
|
197
207
|
*/
|
|
198
|
-
update(
|
|
199
|
-
|
|
200
|
-
|
|
208
|
+
update(sourceId_1) {
|
|
209
|
+
return __awaiter(this, arguments, void 0, function* (sourceId, request = {}, requestOptions) {
|
|
210
|
+
var _a, _b, _c;
|
|
201
211
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
202
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
212
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}`),
|
|
203
213
|
method: "PATCH",
|
|
204
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
214
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.9", "User-Agent": "@letta-ai/letta-client/0.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
205
215
|
contentType: "application/json",
|
|
206
216
|
requestType: "json",
|
|
207
217
|
body: serializers.SourceUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -262,12 +272,12 @@ class Sources {
|
|
|
262
272
|
* await client.sources.getByName("source_name")
|
|
263
273
|
*/
|
|
264
274
|
getByName(sourceName, requestOptions) {
|
|
265
|
-
var _a, _b;
|
|
266
275
|
return __awaiter(this, void 0, void 0, function* () {
|
|
276
|
+
var _a, _b, _c;
|
|
267
277
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
268
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
278
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/sources/name/${encodeURIComponent(sourceName)}`),
|
|
269
279
|
method: "GET",
|
|
270
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
280
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.9", "User-Agent": "@letta-ai/letta-client/0.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
271
281
|
contentType: "application/json",
|
|
272
282
|
requestType: "json",
|
|
273
283
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -326,12 +336,12 @@ class Sources {
|
|
|
326
336
|
* await client.sources.list()
|
|
327
337
|
*/
|
|
328
338
|
list(requestOptions) {
|
|
329
|
-
var _a, _b;
|
|
330
339
|
return __awaiter(this, void 0, void 0, function* () {
|
|
340
|
+
var _a, _b, _c;
|
|
331
341
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
332
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
342
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/sources/"),
|
|
333
343
|
method: "GET",
|
|
334
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
344
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.9", "User-Agent": "@letta-ai/letta-client/0.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
335
345
|
contentType: "application/json",
|
|
336
346
|
requestType: "json",
|
|
337
347
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -393,12 +403,12 @@ class Sources {
|
|
|
393
403
|
* })
|
|
394
404
|
*/
|
|
395
405
|
create(request, requestOptions) {
|
|
396
|
-
var _a, _b;
|
|
397
406
|
return __awaiter(this, void 0, void 0, function* () {
|
|
407
|
+
var _a, _b, _c;
|
|
398
408
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
399
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
409
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/sources/"),
|
|
400
410
|
method: "POST",
|
|
401
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
411
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.9", "User-Agent": "@letta-ai/letta-client/0.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
402
412
|
contentType: "application/json",
|
|
403
413
|
requestType: "json",
|
|
404
414
|
body: serializers.SourceCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -462,15 +472,15 @@ class Sources {
|
|
|
462
472
|
* })
|
|
463
473
|
*/
|
|
464
474
|
attach(sourceId, request, requestOptions) {
|
|
465
|
-
var _a, _b;
|
|
466
475
|
return __awaiter(this, void 0, void 0, function* () {
|
|
476
|
+
var _a, _b, _c;
|
|
467
477
|
const { agentId } = request;
|
|
468
478
|
const _queryParams = {};
|
|
469
479
|
_queryParams["agent_id"] = agentId;
|
|
470
480
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
471
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
481
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/attach`),
|
|
472
482
|
method: "POST",
|
|
473
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
483
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.9", "User-Agent": "@letta-ai/letta-client/0.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
474
484
|
contentType: "application/json",
|
|
475
485
|
queryParameters: _queryParams,
|
|
476
486
|
requestType: "json",
|
|
@@ -534,15 +544,15 @@ class Sources {
|
|
|
534
544
|
* })
|
|
535
545
|
*/
|
|
536
546
|
detach(sourceId, request, requestOptions) {
|
|
537
|
-
var _a, _b;
|
|
538
547
|
return __awaiter(this, void 0, void 0, function* () {
|
|
548
|
+
var _a, _b, _c;
|
|
539
549
|
const { agentId } = request;
|
|
540
550
|
const _queryParams = {};
|
|
541
551
|
_queryParams["agent_id"] = agentId;
|
|
542
552
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
543
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
553
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/detach`),
|
|
544
554
|
method: "POST",
|
|
545
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
555
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.9", "User-Agent": "@letta-ai/letta-client/0.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
546
556
|
contentType: "application/json",
|
|
547
557
|
queryParameters: _queryParams,
|
|
548
558
|
requestType: "json",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
/// <reference types="node" />
|
|
5
4
|
import * as environments from "../../../../../../environments";
|
|
6
5
|
import * as core from "../../../../../../core";
|
|
7
6
|
import * as Letta from "../../../../../index";
|
|
@@ -10,6 +9,8 @@ import { Blob } from "buffer";
|
|
|
10
9
|
export declare namespace Files {
|
|
11
10
|
interface Options {
|
|
12
11
|
environment?: core.Supplier<environments.LettaEnvironment | string>;
|
|
12
|
+
/** Specify a custom URL to connect the client to. */
|
|
13
|
+
baseUrl?: core.Supplier<string>;
|
|
13
14
|
token?: core.Supplier<string | undefined>;
|
|
14
15
|
fetcher?: core.FetchFunction;
|
|
15
16
|
}
|
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
39
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
40
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -62,15 +72,15 @@ class Files {
|
|
|
62
72
|
* await client.sources.files.upload(fs.createReadStream("/path/to/your/file"), "source_id")
|
|
63
73
|
*/
|
|
64
74
|
upload(file, sourceId, requestOptions) {
|
|
65
|
-
var _a, _b;
|
|
66
75
|
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
+
var _a, _b, _c;
|
|
67
77
|
const _request = yield core.newFormData();
|
|
68
78
|
yield _request.appendFile("file", file);
|
|
69
79
|
const _maybeEncodedRequest = yield _request.getRequest();
|
|
70
80
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
71
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
81
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/upload`),
|
|
72
82
|
method: "POST",
|
|
73
|
-
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
83
|
+
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.9", "User-Agent": "@letta-ai/letta-client/0.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
74
84
|
requestType: "file",
|
|
75
85
|
duplex: _maybeEncodedRequest.duplex,
|
|
76
86
|
body: _maybeEncodedRequest.body,
|
|
@@ -131,9 +141,9 @@ class Files {
|
|
|
131
141
|
* @example
|
|
132
142
|
* await client.sources.files.list("source_id")
|
|
133
143
|
*/
|
|
134
|
-
list(
|
|
135
|
-
|
|
136
|
-
|
|
144
|
+
list(sourceId_1) {
|
|
145
|
+
return __awaiter(this, arguments, void 0, function* (sourceId, request = {}, requestOptions) {
|
|
146
|
+
var _a, _b, _c;
|
|
137
147
|
const { limit, cursor } = request;
|
|
138
148
|
const _queryParams = {};
|
|
139
149
|
if (limit != null) {
|
|
@@ -143,9 +153,9 @@ class Files {
|
|
|
143
153
|
_queryParams["cursor"] = cursor;
|
|
144
154
|
}
|
|
145
155
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
146
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
156
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/files`),
|
|
147
157
|
method: "GET",
|
|
148
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
158
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.9", "User-Agent": "@letta-ai/letta-client/0.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
149
159
|
contentType: "application/json",
|
|
150
160
|
queryParameters: _queryParams,
|
|
151
161
|
requestType: "json",
|
|
@@ -207,12 +217,12 @@ class Files {
|
|
|
207
217
|
* await client.sources.files.delete("source_id", "file_id")
|
|
208
218
|
*/
|
|
209
219
|
delete(sourceId, fileId, requestOptions) {
|
|
210
|
-
var _a, _b;
|
|
211
220
|
return __awaiter(this, void 0, void 0, function* () {
|
|
221
|
+
var _a, _b, _c;
|
|
212
222
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
213
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
223
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/${encodeURIComponent(fileId)}`),
|
|
214
224
|
method: "DELETE",
|
|
215
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
225
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.9", "User-Agent": "@letta-ai/letta-client/0.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
216
226
|
contentType: "application/json",
|
|
217
227
|
requestType: "json",
|
|
218
228
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
37
|
};
|
|
@@ -7,6 +7,8 @@ import * as Letta from "../../../../../index";
|
|
|
7
7
|
export declare namespace Passages {
|
|
8
8
|
interface Options {
|
|
9
9
|
environment?: core.Supplier<environments.LettaEnvironment | string>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
10
12
|
token?: core.Supplier<string | undefined>;
|
|
11
13
|
fetcher?: core.FetchFunction;
|
|
12
14
|
}
|
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
39
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
40
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -61,12 +71,12 @@ class Passages {
|
|
|
61
71
|
* await client.sources.passages.list("source_id")
|
|
62
72
|
*/
|
|
63
73
|
list(sourceId, requestOptions) {
|
|
64
|
-
var _a, _b;
|
|
65
74
|
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
+
var _a, _b, _c;
|
|
66
76
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
67
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
77
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/passages`),
|
|
68
78
|
method: "GET",
|
|
69
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
79
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.9", "User-Agent": "@letta-ai/letta-client/0.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
70
80
|
contentType: "application/json",
|
|
71
81
|
requestType: "json",
|
|
72
82
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../environments";
|
|
5
|
+
import * as core from "../../../../core";
|
|
6
|
+
import * as Letta from "../../../index";
|
|
7
|
+
export declare namespace Tag {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.LettaEnvironment | string>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
12
|
+
token?: core.Supplier<string | undefined>;
|
|
13
|
+
fetcher?: core.FetchFunction;
|
|
14
|
+
}
|
|
15
|
+
interface RequestOptions {
|
|
16
|
+
/** The maximum time to wait for a response in seconds. */
|
|
17
|
+
timeoutInSeconds?: number;
|
|
18
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
19
|
+
maxRetries?: number;
|
|
20
|
+
/** A hook to abort the request. */
|
|
21
|
+
abortSignal?: AbortSignal;
|
|
22
|
+
/** Additional headers to include in the request. */
|
|
23
|
+
headers?: Record<string, string>;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export declare class Tag {
|
|
27
|
+
protected readonly _options: Tag.Options;
|
|
28
|
+
constructor(_options?: Tag.Options);
|
|
29
|
+
/**
|
|
30
|
+
* Get a list of all tags in the database
|
|
31
|
+
*
|
|
32
|
+
* @param {Letta.ListTagsRequest} request
|
|
33
|
+
* @param {Tag.RequestOptions} requestOptions - Request-specific configuration.
|
|
34
|
+
*
|
|
35
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* await client.tag.listTags()
|
|
39
|
+
*/
|
|
40
|
+
listTags(request?: Letta.ListTagsRequest, requestOptions?: Tag.RequestOptions): Promise<string[]>;
|
|
41
|
+
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
42
|
+
Authorization: string;
|
|
43
|
+
}>;
|
|
44
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
39
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
40
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
41
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
42
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
43
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
44
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
48
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
49
|
+
};
|
|
50
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
|
+
exports.Tag = void 0;
|
|
52
|
+
const environments = __importStar(require("../../../../environments"));
|
|
53
|
+
const core = __importStar(require("../../../../core"));
|
|
54
|
+
const Letta = __importStar(require("../../../index"));
|
|
55
|
+
const url_join_1 = __importDefault(require("url-join"));
|
|
56
|
+
const serializers = __importStar(require("../../../../serialization/index"));
|
|
57
|
+
const errors = __importStar(require("../../../../errors/index"));
|
|
58
|
+
class Tag {
|
|
59
|
+
constructor(_options = {}) {
|
|
60
|
+
this._options = _options;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Get a list of all tags in the database
|
|
64
|
+
*
|
|
65
|
+
* @param {Letta.ListTagsRequest} request
|
|
66
|
+
* @param {Tag.RequestOptions} requestOptions - Request-specific configuration.
|
|
67
|
+
*
|
|
68
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* await client.tag.listTags()
|
|
72
|
+
*/
|
|
73
|
+
listTags() {
|
|
74
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
75
|
+
var _a, _b, _c;
|
|
76
|
+
const { cursor, limit, queryText } = request;
|
|
77
|
+
const _queryParams = {};
|
|
78
|
+
if (cursor != null) {
|
|
79
|
+
_queryParams["cursor"] = cursor;
|
|
80
|
+
}
|
|
81
|
+
if (limit != null) {
|
|
82
|
+
_queryParams["limit"] = limit.toString();
|
|
83
|
+
}
|
|
84
|
+
if (queryText != null) {
|
|
85
|
+
_queryParams["query_text"] = queryText;
|
|
86
|
+
}
|
|
87
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
88
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/tags/"),
|
|
89
|
+
method: "GET",
|
|
90
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.9", "User-Agent": "@letta-ai/letta-client/0.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
91
|
+
contentType: "application/json",
|
|
92
|
+
queryParameters: _queryParams,
|
|
93
|
+
requestType: "json",
|
|
94
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
95
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
96
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
97
|
+
});
|
|
98
|
+
if (_response.ok) {
|
|
99
|
+
return serializers.tag.listTags.Response.parseOrThrow(_response.body, {
|
|
100
|
+
unrecognizedObjectKeys: "passthrough",
|
|
101
|
+
allowUnrecognizedUnionMembers: true,
|
|
102
|
+
allowUnrecognizedEnumValues: true,
|
|
103
|
+
skipValidation: true,
|
|
104
|
+
breadcrumbsPrefix: ["response"],
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
if (_response.error.reason === "status-code") {
|
|
108
|
+
switch (_response.error.statusCode) {
|
|
109
|
+
case 422:
|
|
110
|
+
throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
111
|
+
unrecognizedObjectKeys: "passthrough",
|
|
112
|
+
allowUnrecognizedUnionMembers: true,
|
|
113
|
+
allowUnrecognizedEnumValues: true,
|
|
114
|
+
skipValidation: true,
|
|
115
|
+
breadcrumbsPrefix: ["response"],
|
|
116
|
+
}));
|
|
117
|
+
default:
|
|
118
|
+
throw new errors.LettaError({
|
|
119
|
+
statusCode: _response.error.statusCode,
|
|
120
|
+
body: _response.error.body,
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
switch (_response.error.reason) {
|
|
125
|
+
case "non-json":
|
|
126
|
+
throw new errors.LettaError({
|
|
127
|
+
statusCode: _response.error.statusCode,
|
|
128
|
+
body: _response.error.rawBody,
|
|
129
|
+
});
|
|
130
|
+
case "timeout":
|
|
131
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/tags/.");
|
|
132
|
+
case "unknown":
|
|
133
|
+
throw new errors.LettaError({
|
|
134
|
+
message: _response.error.errorMessage,
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
_getCustomAuthorizationHeaders() {
|
|
140
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
141
|
+
const tokenValue = yield core.Supplier.get(this._options.token);
|
|
142
|
+
return { Authorization: `Bearer ${tokenValue}` };
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
exports.Tag = Tag;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type ListTagsRequest } from "./ListTagsRequest";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client";
|