@letta-ai/letta-client 0.1.170 → 0.1.173
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/README.md +16 -3
- package/api/errors/BadRequestError.d.ts +2 -1
- package/api/errors/BadRequestError.js +2 -1
- package/api/errors/ConflictError.d.ts +2 -1
- package/api/errors/ConflictError.js +2 -1
- package/api/errors/InternalServerError.d.ts +2 -1
- package/api/errors/InternalServerError.js +2 -1
- package/api/errors/NotFoundError.d.ts +2 -1
- package/api/errors/NotFoundError.js +2 -1
- package/api/errors/PaymentRequiredError.d.ts +2 -1
- package/api/errors/PaymentRequiredError.js +2 -1
- package/api/errors/UnprocessableEntityError.d.ts +2 -1
- package/api/errors/UnprocessableEntityError.js +2 -1
- package/api/resources/agents/client/Client.d.ts +20 -10
- package/api/resources/agents/client/Client.js +166 -82
- package/api/resources/agents/client/requests/AgentsListRequest.d.ts +1 -1
- package/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -0
- package/api/resources/agents/client/requests/UpdateAgent.d.ts +2 -0
- package/api/resources/agents/resources/blocks/client/Client.d.ts +10 -5
- package/api/resources/agents/resources/blocks/client/Client.js +90 -45
- package/api/resources/agents/resources/context/client/Client.d.ts +2 -1
- package/api/resources/agents/resources/context/client/Client.js +18 -9
- package/api/resources/agents/resources/coreMemory/client/Client.d.ts +2 -1
- package/api/resources/agents/resources/coreMemory/client/Client.js +18 -9
- package/api/resources/agents/resources/files/client/Client.d.ts +6 -3
- package/api/resources/agents/resources/files/client/Client.js +45 -21
- package/api/resources/agents/resources/folders/client/Client.d.ts +6 -3
- package/api/resources/agents/resources/folders/client/Client.js +54 -27
- package/api/resources/agents/resources/groups/client/Client.d.ts +2 -1
- package/api/resources/agents/resources/groups/client/Client.js +19 -10
- package/api/resources/agents/resources/memoryVariables/client/Client.d.ts +2 -1
- package/api/resources/agents/resources/memoryVariables/client/Client.js +18 -9
- package/api/resources/agents/resources/messages/client/Client.d.ts +16 -8
- package/api/resources/agents/resources/messages/client/Client.js +155 -83
- package/api/resources/agents/resources/passages/client/Client.d.ts +8 -4
- package/api/resources/agents/resources/passages/client/Client.js +64 -31
- package/api/resources/agents/resources/passages/client/requests/PassageUpdate.d.ts +2 -2
- package/api/resources/agents/resources/sources/client/Client.d.ts +6 -3
- package/api/resources/agents/resources/sources/client/Client.js +54 -27
- package/api/resources/agents/resources/templates/client/Client.d.ts +6 -3
- package/api/resources/agents/resources/templates/client/Client.js +54 -27
- package/api/resources/agents/resources/tools/client/Client.d.ts +6 -3
- package/api/resources/agents/resources/tools/client/Client.js +54 -27
- package/api/resources/batches/client/Client.d.ts +8 -4
- package/api/resources/batches/client/Client.js +63 -30
- package/api/resources/blocks/client/Client.d.ts +12 -6
- package/api/resources/blocks/client/Client.js +100 -49
- package/api/resources/blocks/resources/agents/client/Client.d.ts +2 -1
- package/api/resources/blocks/resources/agents/client/Client.js +19 -10
- package/api/resources/clientSideAccessTokens/client/Client.d.ts +6 -3
- package/api/resources/clientSideAccessTokens/client/Client.js +46 -22
- package/api/resources/embeddingModels/client/Client.d.ts +2 -1
- package/api/resources/embeddingModels/client/Client.js +18 -9
- package/api/resources/folders/client/Client.d.ts +18 -9
- package/api/resources/folders/client/Client.js +154 -76
- package/api/resources/folders/resources/files/client/Client.d.ts +6 -3
- package/api/resources/folders/resources/files/client/Client.js +48 -24
- package/api/resources/folders/resources/passages/client/Client.d.ts +2 -1
- package/api/resources/folders/resources/passages/client/Client.js +19 -10
- package/api/resources/groups/client/Client.d.ts +12 -6
- package/api/resources/groups/client/Client.js +105 -52
- package/api/resources/groups/resources/messages/client/Client.d.ts +10 -5
- package/api/resources/groups/resources/messages/client/Client.js +91 -49
- package/api/resources/health/client/Client.d.ts +2 -1
- package/api/resources/health/client/Client.js +17 -8
- package/api/resources/identities/client/Client.d.ts +14 -7
- package/api/resources/identities/client/Client.js +123 -61
- package/api/resources/identities/resources/properties/client/Client.d.ts +2 -1
- package/api/resources/identities/resources/properties/client/Client.js +9 -3
- package/api/resources/jobs/client/Client.d.ts +10 -5
- package/api/resources/jobs/client/Client.js +92 -47
- package/api/resources/messages/client/Client.d.ts +2 -1
- package/api/resources/messages/client/Client.js +19 -10
- package/api/resources/models/client/Client.d.ts +2 -1
- package/api/resources/models/client/Client.js +27 -14
- package/api/resources/projects/client/Client.d.ts +2 -1
- package/api/resources/projects/client/Client.js +18 -9
- package/api/resources/providers/client/Client.d.ts +10 -5
- package/api/resources/providers/client/Client.js +77 -36
- package/api/resources/runs/client/Client.d.ts +8 -4
- package/api/resources/runs/client/Client.js +74 -38
- package/api/resources/runs/resources/messages/client/Client.d.ts +2 -1
- package/api/resources/runs/resources/messages/client/Client.js +21 -12
- package/api/resources/runs/resources/steps/client/Client.d.ts +2 -1
- package/api/resources/runs/resources/steps/client/Client.js +19 -10
- package/api/resources/runs/resources/usage/client/Client.d.ts +2 -1
- package/api/resources/runs/resources/usage/client/Client.js +18 -9
- package/api/resources/sources/client/Client.d.ts +20 -10
- package/api/resources/sources/client/Client.js +173 -86
- package/api/resources/sources/resources/files/client/Client.d.ts +6 -3
- package/api/resources/sources/resources/files/client/Client.js +48 -24
- package/api/resources/sources/resources/passages/client/Client.d.ts +2 -1
- package/api/resources/sources/resources/passages/client/Client.js +19 -10
- package/api/resources/steps/client/Client.d.ts +4 -2
- package/api/resources/steps/client/Client.js +41 -21
- package/api/resources/steps/resources/feedback/client/Client.d.ts +2 -1
- package/api/resources/steps/resources/feedback/client/Client.js +23 -12
- package/api/resources/tags/client/Client.d.ts +2 -1
- package/api/resources/tags/client/Client.js +19 -10
- package/api/resources/telemetry/client/Client.d.ts +2 -1
- package/api/resources/telemetry/client/Client.js +18 -9
- package/api/resources/templates/client/Client.d.ts +2 -1
- package/api/resources/templates/client/Client.js +18 -9
- package/api/resources/templates/resources/agents/client/Client.d.ts +2 -1
- package/api/resources/templates/resources/agents/client/Client.js +19 -10
- package/api/resources/tools/client/Client.d.ts +40 -20
- package/api/resources/tools/client/Client.js +356 -182
- package/api/resources/tools/client/requests/ToolRunFromSource.d.ts +2 -0
- package/api/resources/tools/client/requests/ToolUpdate.d.ts +2 -0
- package/api/resources/voice/client/Client.d.ts +2 -1
- package/api/resources/voice/client/Client.js +9 -3
- package/api/types/AgentState.d.ts +2 -0
- package/api/types/EmbeddingConfig.d.ts +1 -11
- package/api/types/LettaStreamingRequest.d.ts +2 -0
- package/api/types/LlmConfig.d.ts +1 -11
- package/api/types/ModalSandboxConfig.d.ts +4 -0
- package/api/types/ModalSandboxConfigLanguage.d.ts +8 -0
- package/api/types/ModalSandboxConfigLanguage.js +10 -0
- package/api/types/NpmRequirement.d.ts +9 -0
- package/api/types/NpmRequirement.js +5 -0
- package/api/types/Passage.d.ts +4 -4
- package/api/types/Tool.d.ts +2 -0
- package/api/types/ToolCreate.d.ts +2 -0
- package/api/types/ToolType.d.ts +2 -1
- package/api/types/ToolType.js +1 -0
- package/api/types/index.d.ts +2 -0
- package/api/types/index.js +2 -0
- package/core/fetcher/APIResponse.d.ts +10 -0
- package/core/fetcher/Fetcher.d.ts +1 -1
- package/core/fetcher/Fetcher.js +11 -3
- package/core/fetcher/Headers.d.ts +2 -0
- package/core/fetcher/Headers.js +84 -0
- package/core/fetcher/HttpResponsePromise.d.ts +58 -0
- package/core/fetcher/HttpResponsePromise.js +103 -0
- package/core/fetcher/RawResponse.d.ts +29 -0
- package/core/fetcher/RawResponse.js +44 -0
- package/core/fetcher/createRequestUrl.d.ts +1 -1
- package/core/fetcher/getRequestBody.js +2 -1
- package/core/fetcher/index.d.ts +3 -0
- package/core/fetcher/index.js +7 -1
- package/core/fetcher/requestWithRetries.js +1 -1
- package/core/form-data-utils/FormDataWrapper.d.ts +3 -0
- package/core/form-data-utils/FormDataWrapper.js +53 -10
- package/core/form-data-utils/encodeAsFormParameter.d.ts +4 -0
- package/core/form-data-utils/encodeAsFormParameter.js +18 -0
- package/core/form-data-utils/index.d.ts +1 -0
- package/core/form-data-utils/index.js +3 -0
- package/core/json.d.ts +15 -0
- package/core/json.js +24 -0
- package/core/schemas/Schema.d.ts +2 -0
- package/core/schemas/Schema.js +2 -0
- package/core/schemas/builders/bigint/bigint.d.ts +1 -1
- package/core/schemas/builders/bigint/bigint.js +21 -17
- package/core/schemas/builders/object/object.js +1 -0
- package/core/schemas/builders/record/record.js +1 -2
- package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +64 -0
- package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +1 -1
- package/dist/api/errors/BadRequestError.d.ts +2 -1
- package/dist/api/errors/BadRequestError.js +2 -1
- package/dist/api/errors/ConflictError.d.ts +2 -1
- package/dist/api/errors/ConflictError.js +2 -1
- package/dist/api/errors/InternalServerError.d.ts +2 -1
- package/dist/api/errors/InternalServerError.js +2 -1
- package/dist/api/errors/NotFoundError.d.ts +2 -1
- package/dist/api/errors/NotFoundError.js +2 -1
- package/dist/api/errors/PaymentRequiredError.d.ts +2 -1
- package/dist/api/errors/PaymentRequiredError.js +2 -1
- package/dist/api/errors/UnprocessableEntityError.d.ts +2 -1
- package/dist/api/errors/UnprocessableEntityError.js +2 -1
- package/dist/api/resources/agents/client/Client.d.ts +20 -10
- package/dist/api/resources/agents/client/Client.js +166 -82
- package/dist/api/resources/agents/client/requests/AgentsListRequest.d.ts +1 -1
- package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -0
- package/dist/api/resources/agents/client/requests/UpdateAgent.d.ts +2 -0
- package/dist/api/resources/agents/resources/blocks/client/Client.d.ts +10 -5
- package/dist/api/resources/agents/resources/blocks/client/Client.js +90 -45
- package/dist/api/resources/agents/resources/context/client/Client.d.ts +2 -1
- package/dist/api/resources/agents/resources/context/client/Client.js +18 -9
- package/dist/api/resources/agents/resources/coreMemory/client/Client.d.ts +2 -1
- package/dist/api/resources/agents/resources/coreMemory/client/Client.js +18 -9
- package/dist/api/resources/agents/resources/files/client/Client.d.ts +6 -3
- package/dist/api/resources/agents/resources/files/client/Client.js +45 -21
- package/dist/api/resources/agents/resources/folders/client/Client.d.ts +6 -3
- package/dist/api/resources/agents/resources/folders/client/Client.js +54 -27
- package/dist/api/resources/agents/resources/groups/client/Client.d.ts +2 -1
- package/dist/api/resources/agents/resources/groups/client/Client.js +19 -10
- package/dist/api/resources/agents/resources/memoryVariables/client/Client.d.ts +2 -1
- package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +18 -9
- package/dist/api/resources/agents/resources/messages/client/Client.d.ts +16 -8
- package/dist/api/resources/agents/resources/messages/client/Client.js +155 -83
- package/dist/api/resources/agents/resources/passages/client/Client.d.ts +8 -4
- package/dist/api/resources/agents/resources/passages/client/Client.js +64 -31
- package/dist/api/resources/agents/resources/passages/client/requests/PassageUpdate.d.ts +2 -2
- package/dist/api/resources/agents/resources/sources/client/Client.d.ts +6 -3
- package/dist/api/resources/agents/resources/sources/client/Client.js +54 -27
- package/dist/api/resources/agents/resources/templates/client/Client.d.ts +6 -3
- package/dist/api/resources/agents/resources/templates/client/Client.js +54 -27
- package/dist/api/resources/agents/resources/tools/client/Client.d.ts +6 -3
- package/dist/api/resources/agents/resources/tools/client/Client.js +54 -27
- package/dist/api/resources/batches/client/Client.d.ts +8 -4
- package/dist/api/resources/batches/client/Client.js +63 -30
- package/dist/api/resources/blocks/client/Client.d.ts +12 -6
- package/dist/api/resources/blocks/client/Client.js +100 -49
- package/dist/api/resources/blocks/resources/agents/client/Client.d.ts +2 -1
- package/dist/api/resources/blocks/resources/agents/client/Client.js +19 -10
- package/dist/api/resources/clientSideAccessTokens/client/Client.d.ts +6 -3
- package/dist/api/resources/clientSideAccessTokens/client/Client.js +46 -22
- package/dist/api/resources/embeddingModels/client/Client.d.ts +2 -1
- package/dist/api/resources/embeddingModels/client/Client.js +18 -9
- package/dist/api/resources/folders/client/Client.d.ts +18 -9
- package/dist/api/resources/folders/client/Client.js +154 -76
- package/dist/api/resources/folders/resources/files/client/Client.d.ts +6 -3
- package/dist/api/resources/folders/resources/files/client/Client.js +48 -24
- package/dist/api/resources/folders/resources/passages/client/Client.d.ts +2 -1
- package/dist/api/resources/folders/resources/passages/client/Client.js +19 -10
- package/dist/api/resources/groups/client/Client.d.ts +12 -6
- package/dist/api/resources/groups/client/Client.js +105 -52
- package/dist/api/resources/groups/resources/messages/client/Client.d.ts +10 -5
- package/dist/api/resources/groups/resources/messages/client/Client.js +91 -49
- package/dist/api/resources/health/client/Client.d.ts +2 -1
- package/dist/api/resources/health/client/Client.js +17 -8
- package/dist/api/resources/identities/client/Client.d.ts +14 -7
- package/dist/api/resources/identities/client/Client.js +123 -61
- package/dist/api/resources/identities/resources/properties/client/Client.d.ts +2 -1
- package/dist/api/resources/identities/resources/properties/client/Client.js +9 -3
- package/dist/api/resources/jobs/client/Client.d.ts +10 -5
- package/dist/api/resources/jobs/client/Client.js +92 -47
- package/dist/api/resources/messages/client/Client.d.ts +2 -1
- package/dist/api/resources/messages/client/Client.js +19 -10
- package/dist/api/resources/models/client/Client.d.ts +2 -1
- package/dist/api/resources/models/client/Client.js +27 -14
- package/dist/api/resources/projects/client/Client.d.ts +2 -1
- package/dist/api/resources/projects/client/Client.js +18 -9
- package/dist/api/resources/providers/client/Client.d.ts +10 -5
- package/dist/api/resources/providers/client/Client.js +77 -36
- package/dist/api/resources/runs/client/Client.d.ts +8 -4
- package/dist/api/resources/runs/client/Client.js +74 -38
- package/dist/api/resources/runs/resources/messages/client/Client.d.ts +2 -1
- package/dist/api/resources/runs/resources/messages/client/Client.js +21 -12
- package/dist/api/resources/runs/resources/steps/client/Client.d.ts +2 -1
- package/dist/api/resources/runs/resources/steps/client/Client.js +19 -10
- package/dist/api/resources/runs/resources/usage/client/Client.d.ts +2 -1
- package/dist/api/resources/runs/resources/usage/client/Client.js +18 -9
- package/dist/api/resources/sources/client/Client.d.ts +20 -10
- package/dist/api/resources/sources/client/Client.js +173 -86
- package/dist/api/resources/sources/resources/files/client/Client.d.ts +6 -3
- package/dist/api/resources/sources/resources/files/client/Client.js +48 -24
- package/dist/api/resources/sources/resources/passages/client/Client.d.ts +2 -1
- package/dist/api/resources/sources/resources/passages/client/Client.js +19 -10
- package/dist/api/resources/steps/client/Client.d.ts +4 -2
- package/dist/api/resources/steps/client/Client.js +41 -21
- package/dist/api/resources/steps/resources/feedback/client/Client.d.ts +2 -1
- package/dist/api/resources/steps/resources/feedback/client/Client.js +23 -12
- package/dist/api/resources/tags/client/Client.d.ts +2 -1
- package/dist/api/resources/tags/client/Client.js +19 -10
- package/dist/api/resources/telemetry/client/Client.d.ts +2 -1
- package/dist/api/resources/telemetry/client/Client.js +18 -9
- package/dist/api/resources/templates/client/Client.d.ts +2 -1
- package/dist/api/resources/templates/client/Client.js +18 -9
- package/dist/api/resources/templates/resources/agents/client/Client.d.ts +2 -1
- package/dist/api/resources/templates/resources/agents/client/Client.js +19 -10
- package/dist/api/resources/tools/client/Client.d.ts +40 -20
- package/dist/api/resources/tools/client/Client.js +356 -182
- package/dist/api/resources/tools/client/requests/ToolRunFromSource.d.ts +2 -0
- package/dist/api/resources/tools/client/requests/ToolUpdate.d.ts +2 -0
- package/dist/api/resources/voice/client/Client.d.ts +2 -1
- package/dist/api/resources/voice/client/Client.js +9 -3
- package/dist/api/types/AgentState.d.ts +2 -0
- package/dist/api/types/EmbeddingConfig.d.ts +1 -11
- package/dist/api/types/LettaStreamingRequest.d.ts +2 -0
- package/dist/api/types/LlmConfig.d.ts +1 -11
- package/dist/api/types/ModalSandboxConfig.d.ts +4 -0
- package/dist/api/types/ModalSandboxConfigLanguage.d.ts +8 -0
- package/dist/api/types/ModalSandboxConfigLanguage.js +10 -0
- package/dist/api/types/NpmRequirement.d.ts +9 -0
- package/dist/api/types/NpmRequirement.js +5 -0
- package/dist/api/types/Passage.d.ts +4 -4
- package/dist/api/types/Tool.d.ts +2 -0
- package/dist/api/types/ToolCreate.d.ts +2 -0
- package/dist/api/types/ToolType.d.ts +2 -1
- package/dist/api/types/ToolType.js +1 -0
- package/dist/api/types/index.d.ts +2 -0
- package/dist/api/types/index.js +2 -0
- package/dist/core/fetcher/APIResponse.d.ts +10 -0
- package/dist/core/fetcher/Fetcher.d.ts +1 -1
- package/dist/core/fetcher/Fetcher.js +11 -3
- package/dist/core/fetcher/Headers.d.ts +2 -0
- package/dist/core/fetcher/Headers.js +84 -0
- package/dist/core/fetcher/HttpResponsePromise.d.ts +58 -0
- package/dist/core/fetcher/HttpResponsePromise.js +103 -0
- package/dist/core/fetcher/RawResponse.d.ts +29 -0
- package/dist/core/fetcher/RawResponse.js +44 -0
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -1
- package/dist/core/fetcher/getRequestBody.js +2 -1
- package/dist/core/fetcher/index.d.ts +3 -0
- package/dist/core/fetcher/index.js +7 -1
- package/dist/core/fetcher/requestWithRetries.js +1 -1
- package/dist/core/form-data-utils/FormDataWrapper.d.ts +3 -0
- package/dist/core/form-data-utils/FormDataWrapper.js +53 -10
- package/dist/core/form-data-utils/encodeAsFormParameter.d.ts +4 -0
- package/dist/core/form-data-utils/encodeAsFormParameter.js +18 -0
- package/dist/core/form-data-utils/index.d.ts +1 -0
- package/dist/core/form-data-utils/index.js +3 -0
- package/dist/core/json.d.ts +15 -0
- package/dist/core/json.js +24 -0
- package/dist/core/schemas/Schema.d.ts +2 -0
- package/dist/core/schemas/Schema.js +2 -0
- package/dist/core/schemas/builders/bigint/bigint.d.ts +1 -1
- package/dist/core/schemas/builders/bigint/bigint.js +21 -17
- package/dist/core/schemas/builders/object/object.js +1 -0
- package/dist/core/schemas/builders/record/record.js +1 -2
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +64 -0
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +1 -1
- package/dist/errors/LettaError.d.ts +4 -1
- package/dist/errors/LettaError.js +6 -8
- package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -0
- package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.js +1 -0
- package/dist/serialization/resources/agents/client/requests/UpdateAgent.d.ts +1 -0
- package/dist/serialization/resources/agents/client/requests/UpdateAgent.js +1 -0
- package/dist/serialization/resources/agents/resources/passages/client/requests/PassageUpdate.d.ts +1 -1
- package/dist/serialization/resources/agents/resources/passages/client/requests/PassageUpdate.js +1 -1
- package/dist/serialization/resources/tools/client/requests/ToolRunFromSource.d.ts +2 -0
- package/dist/serialization/resources/tools/client/requests/ToolRunFromSource.js +2 -0
- package/dist/serialization/resources/tools/client/requests/ToolUpdate.d.ts +2 -0
- package/dist/serialization/resources/tools/client/requests/ToolUpdate.js +2 -0
- package/dist/serialization/types/AgentState.d.ts +1 -0
- package/dist/serialization/types/AgentState.js +1 -0
- package/dist/serialization/types/LettaStreamingRequest.d.ts +1 -0
- package/dist/serialization/types/LettaStreamingRequest.js +1 -0
- package/dist/serialization/types/ModalSandboxConfig.d.ts +3 -0
- package/dist/serialization/types/ModalSandboxConfig.js +3 -0
- package/dist/serialization/types/ModalSandboxConfigLanguage.d.ts +10 -0
- package/dist/serialization/types/ModalSandboxConfigLanguage.js +41 -0
- package/dist/serialization/types/NpmRequirement.d.ts +13 -0
- package/dist/serialization/types/NpmRequirement.js +44 -0
- package/dist/serialization/types/Passage.d.ts +1 -1
- package/dist/serialization/types/Passage.js +1 -1
- package/dist/serialization/types/Tool.d.ts +2 -0
- package/dist/serialization/types/Tool.js +2 -0
- package/dist/serialization/types/ToolCreate.d.ts +2 -0
- package/dist/serialization/types/ToolCreate.js +2 -0
- package/dist/serialization/types/ToolType.d.ts +1 -1
- package/dist/serialization/types/ToolType.js +1 -0
- package/dist/serialization/types/index.d.ts +2 -0
- package/dist/serialization/types/index.js +2 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/errors/LettaError.d.ts +4 -1
- package/errors/LettaError.js +6 -8
- package/package.json +4 -4
- package/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -0
- package/serialization/resources/agents/client/requests/CreateAgentRequest.js +1 -0
- package/serialization/resources/agents/client/requests/UpdateAgent.d.ts +1 -0
- package/serialization/resources/agents/client/requests/UpdateAgent.js +1 -0
- package/serialization/resources/agents/resources/passages/client/requests/PassageUpdate.d.ts +1 -1
- package/serialization/resources/agents/resources/passages/client/requests/PassageUpdate.js +1 -1
- package/serialization/resources/tools/client/requests/ToolRunFromSource.d.ts +2 -0
- package/serialization/resources/tools/client/requests/ToolRunFromSource.js +2 -0
- package/serialization/resources/tools/client/requests/ToolUpdate.d.ts +2 -0
- package/serialization/resources/tools/client/requests/ToolUpdate.js +2 -0
- package/serialization/types/AgentState.d.ts +1 -0
- package/serialization/types/AgentState.js +1 -0
- package/serialization/types/LettaStreamingRequest.d.ts +1 -0
- package/serialization/types/LettaStreamingRequest.js +1 -0
- package/serialization/types/ModalSandboxConfig.d.ts +3 -0
- package/serialization/types/ModalSandboxConfig.js +3 -0
- package/serialization/types/ModalSandboxConfigLanguage.d.ts +10 -0
- package/serialization/types/ModalSandboxConfigLanguage.js +41 -0
- package/serialization/types/NpmRequirement.d.ts +13 -0
- package/serialization/types/NpmRequirement.js +44 -0
- package/serialization/types/Passage.d.ts +1 -1
- package/serialization/types/Passage.js +1 -1
- package/serialization/types/Tool.d.ts +2 -0
- package/serialization/types/Tool.js +2 -0
- package/serialization/types/ToolCreate.d.ts +2 -0
- package/serialization/types/ToolCreate.js +2 -0
- package/serialization/types/ToolType.d.ts +1 -1
- package/serialization/types/ToolType.js +1 -0
- package/serialization/types/index.d.ts +2 -0
- package/serialization/types/index.js +2 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -52,8 +52,8 @@ exports.Identities = void 0;
|
|
|
52
52
|
const environments = __importStar(require("../../../../environments"));
|
|
53
53
|
const core = __importStar(require("../../../../core"));
|
|
54
54
|
const Letta = __importStar(require("../../../index"));
|
|
55
|
-
const url_join_1 = __importDefault(require("url-join"));
|
|
56
55
|
const serializers = __importStar(require("../../../../serialization/index"));
|
|
56
|
+
const url_join_1 = __importDefault(require("url-join"));
|
|
57
57
|
const errors = __importStar(require("../../../../errors/index"));
|
|
58
58
|
const Client_1 = require("../resources/properties/client/Client");
|
|
59
59
|
class Identities {
|
|
@@ -75,7 +75,10 @@ class Identities {
|
|
|
75
75
|
* @example
|
|
76
76
|
* await client.identities.list()
|
|
77
77
|
*/
|
|
78
|
-
list() {
|
|
78
|
+
list(request = {}, requestOptions) {
|
|
79
|
+
return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
|
|
80
|
+
}
|
|
81
|
+
__list() {
|
|
79
82
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
80
83
|
var _a, _b, _c;
|
|
81
84
|
const { name, projectId, identifierKey, identityType, before, after, limit } = request;
|
|
@@ -90,7 +93,9 @@ class Identities {
|
|
|
90
93
|
_queryParams["identifier_key"] = identifierKey;
|
|
91
94
|
}
|
|
92
95
|
if (identityType != null) {
|
|
93
|
-
_queryParams["identity_type"] = identityType
|
|
96
|
+
_queryParams["identity_type"] = serializers.IdentityType.jsonOrThrow(identityType, {
|
|
97
|
+
unrecognizedObjectKeys: "strip",
|
|
98
|
+
});
|
|
94
99
|
}
|
|
95
100
|
if (before != null) {
|
|
96
101
|
_queryParams["before"] = before;
|
|
@@ -106,7 +111,7 @@ class Identities {
|
|
|
106
111
|
method: "GET",
|
|
107
112
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
108
113
|
? yield core.Supplier.get(this._options.project)
|
|
109
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
114
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.173", "User-Agent": "@letta-ai/letta-client/0.1.173", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
110
115
|
contentType: "application/json",
|
|
111
116
|
queryParameters: _queryParams,
|
|
112
117
|
requestType: "json",
|
|
@@ -115,13 +120,16 @@ class Identities {
|
|
|
115
120
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
116
121
|
});
|
|
117
122
|
if (_response.ok) {
|
|
118
|
-
return
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
return {
|
|
124
|
+
data: serializers.identities.list.Response.parseOrThrow(_response.body, {
|
|
125
|
+
unrecognizedObjectKeys: "passthrough",
|
|
126
|
+
allowUnrecognizedUnionMembers: true,
|
|
127
|
+
allowUnrecognizedEnumValues: true,
|
|
128
|
+
skipValidation: true,
|
|
129
|
+
breadcrumbsPrefix: ["response"],
|
|
130
|
+
}),
|
|
131
|
+
rawResponse: _response.rawResponse,
|
|
132
|
+
};
|
|
125
133
|
}
|
|
126
134
|
if (_response.error.reason === "status-code") {
|
|
127
135
|
switch (_response.error.statusCode) {
|
|
@@ -132,11 +140,12 @@ class Identities {
|
|
|
132
140
|
allowUnrecognizedEnumValues: true,
|
|
133
141
|
skipValidation: true,
|
|
134
142
|
breadcrumbsPrefix: ["response"],
|
|
135
|
-
}));
|
|
143
|
+
}), _response.rawResponse);
|
|
136
144
|
default:
|
|
137
145
|
throw new errors.LettaError({
|
|
138
146
|
statusCode: _response.error.statusCode,
|
|
139
147
|
body: _response.error.body,
|
|
148
|
+
rawResponse: _response.rawResponse,
|
|
140
149
|
});
|
|
141
150
|
}
|
|
142
151
|
}
|
|
@@ -145,12 +154,14 @@ class Identities {
|
|
|
145
154
|
throw new errors.LettaError({
|
|
146
155
|
statusCode: _response.error.statusCode,
|
|
147
156
|
body: _response.error.rawBody,
|
|
157
|
+
rawResponse: _response.rawResponse,
|
|
148
158
|
});
|
|
149
159
|
case "timeout":
|
|
150
160
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/identities/.");
|
|
151
161
|
case "unknown":
|
|
152
162
|
throw new errors.LettaError({
|
|
153
163
|
message: _response.error.errorMessage,
|
|
164
|
+
rawResponse: _response.rawResponse,
|
|
154
165
|
});
|
|
155
166
|
}
|
|
156
167
|
});
|
|
@@ -169,6 +180,9 @@ class Identities {
|
|
|
169
180
|
* })
|
|
170
181
|
*/
|
|
171
182
|
create(request, requestOptions) {
|
|
183
|
+
return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
|
|
184
|
+
}
|
|
185
|
+
__create(request, requestOptions) {
|
|
172
186
|
return __awaiter(this, void 0, void 0, function* () {
|
|
173
187
|
var _a, _b, _c;
|
|
174
188
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -176,7 +190,7 @@ class Identities {
|
|
|
176
190
|
method: "POST",
|
|
177
191
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
178
192
|
? yield core.Supplier.get(this._options.project)
|
|
179
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
193
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.173", "User-Agent": "@letta-ai/letta-client/0.1.173", "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),
|
|
180
194
|
contentType: "application/json",
|
|
181
195
|
requestType: "json",
|
|
182
196
|
body: serializers.IdentityCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -185,13 +199,16 @@ class Identities {
|
|
|
185
199
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
186
200
|
});
|
|
187
201
|
if (_response.ok) {
|
|
188
|
-
return
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
202
|
+
return {
|
|
203
|
+
data: serializers.Identity.parseOrThrow(_response.body, {
|
|
204
|
+
unrecognizedObjectKeys: "passthrough",
|
|
205
|
+
allowUnrecognizedUnionMembers: true,
|
|
206
|
+
allowUnrecognizedEnumValues: true,
|
|
207
|
+
skipValidation: true,
|
|
208
|
+
breadcrumbsPrefix: ["response"],
|
|
209
|
+
}),
|
|
210
|
+
rawResponse: _response.rawResponse,
|
|
211
|
+
};
|
|
195
212
|
}
|
|
196
213
|
if (_response.error.reason === "status-code") {
|
|
197
214
|
switch (_response.error.statusCode) {
|
|
@@ -202,11 +219,12 @@ class Identities {
|
|
|
202
219
|
allowUnrecognizedEnumValues: true,
|
|
203
220
|
skipValidation: true,
|
|
204
221
|
breadcrumbsPrefix: ["response"],
|
|
205
|
-
}));
|
|
222
|
+
}), _response.rawResponse);
|
|
206
223
|
default:
|
|
207
224
|
throw new errors.LettaError({
|
|
208
225
|
statusCode: _response.error.statusCode,
|
|
209
226
|
body: _response.error.body,
|
|
227
|
+
rawResponse: _response.rawResponse,
|
|
210
228
|
});
|
|
211
229
|
}
|
|
212
230
|
}
|
|
@@ -215,12 +233,14 @@ class Identities {
|
|
|
215
233
|
throw new errors.LettaError({
|
|
216
234
|
statusCode: _response.error.statusCode,
|
|
217
235
|
body: _response.error.rawBody,
|
|
236
|
+
rawResponse: _response.rawResponse,
|
|
218
237
|
});
|
|
219
238
|
case "timeout":
|
|
220
239
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/identities/.");
|
|
221
240
|
case "unknown":
|
|
222
241
|
throw new errors.LettaError({
|
|
223
242
|
message: _response.error.errorMessage,
|
|
243
|
+
rawResponse: _response.rawResponse,
|
|
224
244
|
});
|
|
225
245
|
}
|
|
226
246
|
});
|
|
@@ -239,6 +259,9 @@ class Identities {
|
|
|
239
259
|
* })
|
|
240
260
|
*/
|
|
241
261
|
upsert(request, requestOptions) {
|
|
262
|
+
return core.HttpResponsePromise.fromPromise(this.__upsert(request, requestOptions));
|
|
263
|
+
}
|
|
264
|
+
__upsert(request, requestOptions) {
|
|
242
265
|
return __awaiter(this, void 0, void 0, function* () {
|
|
243
266
|
var _a, _b, _c;
|
|
244
267
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -246,7 +269,7 @@ class Identities {
|
|
|
246
269
|
method: "PUT",
|
|
247
270
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
248
271
|
? yield core.Supplier.get(this._options.project)
|
|
249
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
272
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.173", "User-Agent": "@letta-ai/letta-client/0.1.173", "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),
|
|
250
273
|
contentType: "application/json",
|
|
251
274
|
requestType: "json",
|
|
252
275
|
body: serializers.IdentityUpsert.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -255,13 +278,16 @@ class Identities {
|
|
|
255
278
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
256
279
|
});
|
|
257
280
|
if (_response.ok) {
|
|
258
|
-
return
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
281
|
+
return {
|
|
282
|
+
data: serializers.Identity.parseOrThrow(_response.body, {
|
|
283
|
+
unrecognizedObjectKeys: "passthrough",
|
|
284
|
+
allowUnrecognizedUnionMembers: true,
|
|
285
|
+
allowUnrecognizedEnumValues: true,
|
|
286
|
+
skipValidation: true,
|
|
287
|
+
breadcrumbsPrefix: ["response"],
|
|
288
|
+
}),
|
|
289
|
+
rawResponse: _response.rawResponse,
|
|
290
|
+
};
|
|
265
291
|
}
|
|
266
292
|
if (_response.error.reason === "status-code") {
|
|
267
293
|
switch (_response.error.statusCode) {
|
|
@@ -272,11 +298,12 @@ class Identities {
|
|
|
272
298
|
allowUnrecognizedEnumValues: true,
|
|
273
299
|
skipValidation: true,
|
|
274
300
|
breadcrumbsPrefix: ["response"],
|
|
275
|
-
}));
|
|
301
|
+
}), _response.rawResponse);
|
|
276
302
|
default:
|
|
277
303
|
throw new errors.LettaError({
|
|
278
304
|
statusCode: _response.error.statusCode,
|
|
279
305
|
body: _response.error.body,
|
|
306
|
+
rawResponse: _response.rawResponse,
|
|
280
307
|
});
|
|
281
308
|
}
|
|
282
309
|
}
|
|
@@ -285,12 +312,14 @@ class Identities {
|
|
|
285
312
|
throw new errors.LettaError({
|
|
286
313
|
statusCode: _response.error.statusCode,
|
|
287
314
|
body: _response.error.rawBody,
|
|
315
|
+
rawResponse: _response.rawResponse,
|
|
288
316
|
});
|
|
289
317
|
case "timeout":
|
|
290
318
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling PUT /v1/identities/.");
|
|
291
319
|
case "unknown":
|
|
292
320
|
throw new errors.LettaError({
|
|
293
321
|
message: _response.error.errorMessage,
|
|
322
|
+
rawResponse: _response.rawResponse,
|
|
294
323
|
});
|
|
295
324
|
}
|
|
296
325
|
});
|
|
@@ -306,6 +335,9 @@ class Identities {
|
|
|
306
335
|
* await client.identities.count()
|
|
307
336
|
*/
|
|
308
337
|
count(requestOptions) {
|
|
338
|
+
return core.HttpResponsePromise.fromPromise(this.__count(requestOptions));
|
|
339
|
+
}
|
|
340
|
+
__count(requestOptions) {
|
|
309
341
|
return __awaiter(this, void 0, void 0, function* () {
|
|
310
342
|
var _a, _b, _c;
|
|
311
343
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -313,7 +345,7 @@ class Identities {
|
|
|
313
345
|
method: "GET",
|
|
314
346
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
315
347
|
? yield core.Supplier.get(this._options.project)
|
|
316
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
348
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.173", "User-Agent": "@letta-ai/letta-client/0.1.173", "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),
|
|
317
349
|
contentType: "application/json",
|
|
318
350
|
requestType: "json",
|
|
319
351
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -321,13 +353,16 @@ class Identities {
|
|
|
321
353
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
322
354
|
});
|
|
323
355
|
if (_response.ok) {
|
|
324
|
-
return
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
356
|
+
return {
|
|
357
|
+
data: serializers.identities.count.Response.parseOrThrow(_response.body, {
|
|
358
|
+
unrecognizedObjectKeys: "passthrough",
|
|
359
|
+
allowUnrecognizedUnionMembers: true,
|
|
360
|
+
allowUnrecognizedEnumValues: true,
|
|
361
|
+
skipValidation: true,
|
|
362
|
+
breadcrumbsPrefix: ["response"],
|
|
363
|
+
}),
|
|
364
|
+
rawResponse: _response.rawResponse,
|
|
365
|
+
};
|
|
331
366
|
}
|
|
332
367
|
if (_response.error.reason === "status-code") {
|
|
333
368
|
switch (_response.error.statusCode) {
|
|
@@ -338,11 +373,12 @@ class Identities {
|
|
|
338
373
|
allowUnrecognizedEnumValues: true,
|
|
339
374
|
skipValidation: true,
|
|
340
375
|
breadcrumbsPrefix: ["response"],
|
|
341
|
-
}));
|
|
376
|
+
}), _response.rawResponse);
|
|
342
377
|
default:
|
|
343
378
|
throw new errors.LettaError({
|
|
344
379
|
statusCode: _response.error.statusCode,
|
|
345
380
|
body: _response.error.body,
|
|
381
|
+
rawResponse: _response.rawResponse,
|
|
346
382
|
});
|
|
347
383
|
}
|
|
348
384
|
}
|
|
@@ -351,12 +387,14 @@ class Identities {
|
|
|
351
387
|
throw new errors.LettaError({
|
|
352
388
|
statusCode: _response.error.statusCode,
|
|
353
389
|
body: _response.error.rawBody,
|
|
390
|
+
rawResponse: _response.rawResponse,
|
|
354
391
|
});
|
|
355
392
|
case "timeout":
|
|
356
393
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/identities/count.");
|
|
357
394
|
case "unknown":
|
|
358
395
|
throw new errors.LettaError({
|
|
359
396
|
message: _response.error.errorMessage,
|
|
397
|
+
rawResponse: _response.rawResponse,
|
|
360
398
|
});
|
|
361
399
|
}
|
|
362
400
|
});
|
|
@@ -371,6 +409,9 @@ class Identities {
|
|
|
371
409
|
* await client.identities.retrieve("identity_id")
|
|
372
410
|
*/
|
|
373
411
|
retrieve(identityId, requestOptions) {
|
|
412
|
+
return core.HttpResponsePromise.fromPromise(this.__retrieve(identityId, requestOptions));
|
|
413
|
+
}
|
|
414
|
+
__retrieve(identityId, requestOptions) {
|
|
374
415
|
return __awaiter(this, void 0, void 0, function* () {
|
|
375
416
|
var _a, _b, _c;
|
|
376
417
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -378,7 +419,7 @@ class Identities {
|
|
|
378
419
|
method: "GET",
|
|
379
420
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
380
421
|
? yield core.Supplier.get(this._options.project)
|
|
381
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
422
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.173", "User-Agent": "@letta-ai/letta-client/0.1.173", "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),
|
|
382
423
|
contentType: "application/json",
|
|
383
424
|
requestType: "json",
|
|
384
425
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -386,13 +427,16 @@ class Identities {
|
|
|
386
427
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
387
428
|
});
|
|
388
429
|
if (_response.ok) {
|
|
389
|
-
return
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
430
|
+
return {
|
|
431
|
+
data: serializers.Identity.parseOrThrow(_response.body, {
|
|
432
|
+
unrecognizedObjectKeys: "passthrough",
|
|
433
|
+
allowUnrecognizedUnionMembers: true,
|
|
434
|
+
allowUnrecognizedEnumValues: true,
|
|
435
|
+
skipValidation: true,
|
|
436
|
+
breadcrumbsPrefix: ["response"],
|
|
437
|
+
}),
|
|
438
|
+
rawResponse: _response.rawResponse,
|
|
439
|
+
};
|
|
396
440
|
}
|
|
397
441
|
if (_response.error.reason === "status-code") {
|
|
398
442
|
switch (_response.error.statusCode) {
|
|
@@ -403,11 +447,12 @@ class Identities {
|
|
|
403
447
|
allowUnrecognizedEnumValues: true,
|
|
404
448
|
skipValidation: true,
|
|
405
449
|
breadcrumbsPrefix: ["response"],
|
|
406
|
-
}));
|
|
450
|
+
}), _response.rawResponse);
|
|
407
451
|
default:
|
|
408
452
|
throw new errors.LettaError({
|
|
409
453
|
statusCode: _response.error.statusCode,
|
|
410
454
|
body: _response.error.body,
|
|
455
|
+
rawResponse: _response.rawResponse,
|
|
411
456
|
});
|
|
412
457
|
}
|
|
413
458
|
}
|
|
@@ -416,12 +461,14 @@ class Identities {
|
|
|
416
461
|
throw new errors.LettaError({
|
|
417
462
|
statusCode: _response.error.statusCode,
|
|
418
463
|
body: _response.error.rawBody,
|
|
464
|
+
rawResponse: _response.rawResponse,
|
|
419
465
|
});
|
|
420
466
|
case "timeout":
|
|
421
467
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/identities/{identity_id}.");
|
|
422
468
|
case "unknown":
|
|
423
469
|
throw new errors.LettaError({
|
|
424
470
|
message: _response.error.errorMessage,
|
|
471
|
+
rawResponse: _response.rawResponse,
|
|
425
472
|
});
|
|
426
473
|
}
|
|
427
474
|
});
|
|
@@ -438,6 +485,9 @@ class Identities {
|
|
|
438
485
|
* await client.identities.delete("identity_id")
|
|
439
486
|
*/
|
|
440
487
|
delete(identityId, requestOptions) {
|
|
488
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(identityId, requestOptions));
|
|
489
|
+
}
|
|
490
|
+
__delete(identityId, requestOptions) {
|
|
441
491
|
return __awaiter(this, void 0, void 0, function* () {
|
|
442
492
|
var _a, _b, _c;
|
|
443
493
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -445,7 +495,7 @@ class Identities {
|
|
|
445
495
|
method: "DELETE",
|
|
446
496
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
447
497
|
? yield core.Supplier.get(this._options.project)
|
|
448
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
498
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.173", "User-Agent": "@letta-ai/letta-client/0.1.173", "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),
|
|
449
499
|
contentType: "application/json",
|
|
450
500
|
requestType: "json",
|
|
451
501
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -453,7 +503,7 @@ class Identities {
|
|
|
453
503
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
454
504
|
});
|
|
455
505
|
if (_response.ok) {
|
|
456
|
-
return _response.body;
|
|
506
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
457
507
|
}
|
|
458
508
|
if (_response.error.reason === "status-code") {
|
|
459
509
|
switch (_response.error.statusCode) {
|
|
@@ -464,11 +514,12 @@ class Identities {
|
|
|
464
514
|
allowUnrecognizedEnumValues: true,
|
|
465
515
|
skipValidation: true,
|
|
466
516
|
breadcrumbsPrefix: ["response"],
|
|
467
|
-
}));
|
|
517
|
+
}), _response.rawResponse);
|
|
468
518
|
default:
|
|
469
519
|
throw new errors.LettaError({
|
|
470
520
|
statusCode: _response.error.statusCode,
|
|
471
521
|
body: _response.error.body,
|
|
522
|
+
rawResponse: _response.rawResponse,
|
|
472
523
|
});
|
|
473
524
|
}
|
|
474
525
|
}
|
|
@@ -477,12 +528,14 @@ class Identities {
|
|
|
477
528
|
throw new errors.LettaError({
|
|
478
529
|
statusCode: _response.error.statusCode,
|
|
479
530
|
body: _response.error.rawBody,
|
|
531
|
+
rawResponse: _response.rawResponse,
|
|
480
532
|
});
|
|
481
533
|
case "timeout":
|
|
482
534
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling DELETE /v1/identities/{identity_id}.");
|
|
483
535
|
case "unknown":
|
|
484
536
|
throw new errors.LettaError({
|
|
485
537
|
message: _response.error.errorMessage,
|
|
538
|
+
rawResponse: _response.rawResponse,
|
|
486
539
|
});
|
|
487
540
|
}
|
|
488
541
|
});
|
|
@@ -497,7 +550,10 @@ class Identities {
|
|
|
497
550
|
* @example
|
|
498
551
|
* await client.identities.modify("identity_id")
|
|
499
552
|
*/
|
|
500
|
-
modify(
|
|
553
|
+
modify(identityId, request = {}, requestOptions) {
|
|
554
|
+
return core.HttpResponsePromise.fromPromise(this.__modify(identityId, request, requestOptions));
|
|
555
|
+
}
|
|
556
|
+
__modify(identityId_1) {
|
|
501
557
|
return __awaiter(this, arguments, void 0, function* (identityId, request = {}, requestOptions) {
|
|
502
558
|
var _a, _b, _c;
|
|
503
559
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -505,7 +561,7 @@ class Identities {
|
|
|
505
561
|
method: "PATCH",
|
|
506
562
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
507
563
|
? yield core.Supplier.get(this._options.project)
|
|
508
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
564
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.173", "User-Agent": "@letta-ai/letta-client/0.1.173", "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),
|
|
509
565
|
contentType: "application/json",
|
|
510
566
|
requestType: "json",
|
|
511
567
|
body: serializers.IdentityUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -514,13 +570,16 @@ class Identities {
|
|
|
514
570
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
515
571
|
});
|
|
516
572
|
if (_response.ok) {
|
|
517
|
-
return
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
573
|
+
return {
|
|
574
|
+
data: serializers.Identity.parseOrThrow(_response.body, {
|
|
575
|
+
unrecognizedObjectKeys: "passthrough",
|
|
576
|
+
allowUnrecognizedUnionMembers: true,
|
|
577
|
+
allowUnrecognizedEnumValues: true,
|
|
578
|
+
skipValidation: true,
|
|
579
|
+
breadcrumbsPrefix: ["response"],
|
|
580
|
+
}),
|
|
581
|
+
rawResponse: _response.rawResponse,
|
|
582
|
+
};
|
|
524
583
|
}
|
|
525
584
|
if (_response.error.reason === "status-code") {
|
|
526
585
|
switch (_response.error.statusCode) {
|
|
@@ -531,11 +590,12 @@ class Identities {
|
|
|
531
590
|
allowUnrecognizedEnumValues: true,
|
|
532
591
|
skipValidation: true,
|
|
533
592
|
breadcrumbsPrefix: ["response"],
|
|
534
|
-
}));
|
|
593
|
+
}), _response.rawResponse);
|
|
535
594
|
default:
|
|
536
595
|
throw new errors.LettaError({
|
|
537
596
|
statusCode: _response.error.statusCode,
|
|
538
597
|
body: _response.error.body,
|
|
598
|
+
rawResponse: _response.rawResponse,
|
|
539
599
|
});
|
|
540
600
|
}
|
|
541
601
|
}
|
|
@@ -544,12 +604,14 @@ class Identities {
|
|
|
544
604
|
throw new errors.LettaError({
|
|
545
605
|
statusCode: _response.error.statusCode,
|
|
546
606
|
body: _response.error.rawBody,
|
|
607
|
+
rawResponse: _response.rawResponse,
|
|
547
608
|
});
|
|
548
609
|
case "timeout":
|
|
549
610
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/identities/{identity_id}.");
|
|
550
611
|
case "unknown":
|
|
551
612
|
throw new errors.LettaError({
|
|
552
613
|
message: _response.error.errorMessage,
|
|
614
|
+
rawResponse: _response.rawResponse,
|
|
553
615
|
});
|
|
554
616
|
}
|
|
555
617
|
});
|
|
@@ -44,7 +44,8 @@ export declare class Properties {
|
|
|
44
44
|
* type: "string"
|
|
45
45
|
* }])
|
|
46
46
|
*/
|
|
47
|
-
upsert(identityId: string, request: Letta.IdentityProperty[], requestOptions?: Properties.RequestOptions):
|
|
47
|
+
upsert(identityId: string, request: Letta.IdentityProperty[], requestOptions?: Properties.RequestOptions): core.HttpResponsePromise<unknown>;
|
|
48
|
+
private __upsert;
|
|
48
49
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
49
50
|
Authorization: string;
|
|
50
51
|
}>;
|
|
@@ -74,6 +74,9 @@ class Properties {
|
|
|
74
74
|
* }])
|
|
75
75
|
*/
|
|
76
76
|
upsert(identityId, request, requestOptions) {
|
|
77
|
+
return core.HttpResponsePromise.fromPromise(this.__upsert(identityId, request, requestOptions));
|
|
78
|
+
}
|
|
79
|
+
__upsert(identityId, request, requestOptions) {
|
|
77
80
|
return __awaiter(this, void 0, void 0, function* () {
|
|
78
81
|
var _a, _b, _c;
|
|
79
82
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -81,7 +84,7 @@ class Properties {
|
|
|
81
84
|
method: "PUT",
|
|
82
85
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
83
86
|
? yield core.Supplier.get(this._options.project)
|
|
84
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
87
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.173", "User-Agent": "@letta-ai/letta-client/0.1.173", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
85
88
|
contentType: "application/json",
|
|
86
89
|
requestType: "json",
|
|
87
90
|
body: serializers.identities.properties.upsert.Request.jsonOrThrow(request, {
|
|
@@ -92,7 +95,7 @@ class Properties {
|
|
|
92
95
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
93
96
|
});
|
|
94
97
|
if (_response.ok) {
|
|
95
|
-
return _response.body;
|
|
98
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
96
99
|
}
|
|
97
100
|
if (_response.error.reason === "status-code") {
|
|
98
101
|
switch (_response.error.statusCode) {
|
|
@@ -103,11 +106,12 @@ class Properties {
|
|
|
103
106
|
allowUnrecognizedEnumValues: true,
|
|
104
107
|
skipValidation: true,
|
|
105
108
|
breadcrumbsPrefix: ["response"],
|
|
106
|
-
}));
|
|
109
|
+
}), _response.rawResponse);
|
|
107
110
|
default:
|
|
108
111
|
throw new errors.LettaError({
|
|
109
112
|
statusCode: _response.error.statusCode,
|
|
110
113
|
body: _response.error.body,
|
|
114
|
+
rawResponse: _response.rawResponse,
|
|
111
115
|
});
|
|
112
116
|
}
|
|
113
117
|
}
|
|
@@ -116,12 +120,14 @@ class Properties {
|
|
|
116
120
|
throw new errors.LettaError({
|
|
117
121
|
statusCode: _response.error.statusCode,
|
|
118
122
|
body: _response.error.rawBody,
|
|
123
|
+
rawResponse: _response.rawResponse,
|
|
119
124
|
});
|
|
120
125
|
case "timeout":
|
|
121
126
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling PUT /v1/identities/{identity_id}/properties.");
|
|
122
127
|
case "unknown":
|
|
123
128
|
throw new errors.LettaError({
|
|
124
129
|
message: _response.error.errorMessage,
|
|
130
|
+
rawResponse: _response.rawResponse,
|
|
125
131
|
});
|
|
126
132
|
}
|
|
127
133
|
});
|
|
@@ -42,7 +42,8 @@ export declare class Jobs {
|
|
|
42
42
|
* @example
|
|
43
43
|
* await client.jobs.list()
|
|
44
44
|
*/
|
|
45
|
-
list(request?: Letta.JobsListRequest, requestOptions?: Jobs.RequestOptions):
|
|
45
|
+
list(request?: Letta.JobsListRequest, requestOptions?: Jobs.RequestOptions): core.HttpResponsePromise<Letta.Job[]>;
|
|
46
|
+
private __list;
|
|
46
47
|
/**
|
|
47
48
|
* List all active jobs.
|
|
48
49
|
*
|
|
@@ -54,7 +55,8 @@ export declare class Jobs {
|
|
|
54
55
|
* @example
|
|
55
56
|
* await client.jobs.listActive()
|
|
56
57
|
*/
|
|
57
|
-
listActive(request?: Letta.JobsListActiveRequest, requestOptions?: Jobs.RequestOptions):
|
|
58
|
+
listActive(request?: Letta.JobsListActiveRequest, requestOptions?: Jobs.RequestOptions): core.HttpResponsePromise<Letta.Job[]>;
|
|
59
|
+
private __listActive;
|
|
58
60
|
/**
|
|
59
61
|
* Get the status of a job.
|
|
60
62
|
*
|
|
@@ -66,7 +68,8 @@ export declare class Jobs {
|
|
|
66
68
|
* @example
|
|
67
69
|
* await client.jobs.retrieve("job_id")
|
|
68
70
|
*/
|
|
69
|
-
retrieve(jobId: string, requestOptions?: Jobs.RequestOptions):
|
|
71
|
+
retrieve(jobId: string, requestOptions?: Jobs.RequestOptions): core.HttpResponsePromise<Letta.Job>;
|
|
72
|
+
private __retrieve;
|
|
70
73
|
/**
|
|
71
74
|
* Delete a job by its job_id.
|
|
72
75
|
*
|
|
@@ -78,7 +81,8 @@ export declare class Jobs {
|
|
|
78
81
|
* @example
|
|
79
82
|
* await client.jobs.delete("job_id")
|
|
80
83
|
*/
|
|
81
|
-
delete(jobId: string, requestOptions?: Jobs.RequestOptions):
|
|
84
|
+
delete(jobId: string, requestOptions?: Jobs.RequestOptions): core.HttpResponsePromise<Letta.Job>;
|
|
85
|
+
private __delete;
|
|
82
86
|
/**
|
|
83
87
|
* Cancel a job by its job_id.
|
|
84
88
|
*
|
|
@@ -93,7 +97,8 @@ export declare class Jobs {
|
|
|
93
97
|
* @example
|
|
94
98
|
* await client.jobs.cancelJob("job_id")
|
|
95
99
|
*/
|
|
96
|
-
cancelJob(jobId: string, requestOptions?: Jobs.RequestOptions):
|
|
100
|
+
cancelJob(jobId: string, requestOptions?: Jobs.RequestOptions): core.HttpResponsePromise<Letta.Job>;
|
|
101
|
+
private __cancelJob;
|
|
97
102
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
98
103
|
Authorization: string;
|
|
99
104
|
}>;
|