@letta-ai/letta-client 0.1.180 → 0.1.181
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/errors/index.d.ts +1 -2
- package/api/errors/index.js +1 -2
- package/api/resources/agents/client/Client.js +10 -10
- package/api/resources/agents/resources/blocks/client/Client.js +5 -5
- package/api/resources/agents/resources/context/client/Client.js +1 -1
- package/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
- package/api/resources/agents/resources/files/client/Client.js +3 -3
- package/api/resources/agents/resources/folders/client/Client.js +3 -3
- package/api/resources/agents/resources/groups/client/Client.js +1 -1
- package/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
- package/api/resources/agents/resources/messages/client/Client.js +8 -8
- package/api/resources/agents/resources/passages/client/Client.js +4 -4
- package/api/resources/agents/resources/sources/client/Client.js +3 -3
- package/api/resources/agents/resources/templates/client/Client.d.ts +14 -25
- package/api/resources/agents/resources/templates/client/Client.js +59 -131
- package/api/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.d.ts +0 -2
- package/api/resources/agents/resources/templates/client/requests/index.d.ts +0 -2
- package/api/resources/agents/resources/templates/types/index.d.ts +0 -2
- package/api/resources/agents/resources/templates/types/index.js +0 -2
- package/api/resources/agents/resources/tools/client/Client.js +3 -3
- package/api/resources/batches/client/Client.js +4 -4
- package/api/resources/blocks/client/Client.js +6 -6
- package/api/resources/blocks/resources/agents/client/Client.js +1 -1
- package/api/resources/clientSideAccessTokens/client/Client.js +3 -3
- package/api/resources/embeddingModels/client/Client.js +1 -1
- package/api/resources/folders/client/Client.js +9 -9
- package/api/resources/folders/resources/files/client/Client.js +3 -3
- package/api/resources/folders/resources/passages/client/Client.js +1 -1
- package/api/resources/groups/client/Client.js +6 -6
- package/api/resources/groups/resources/messages/client/Client.js +5 -5
- package/api/resources/health/client/Client.js +1 -1
- package/api/resources/identities/client/Client.js +7 -7
- package/api/resources/identities/resources/properties/client/Client.js +1 -1
- package/api/resources/jobs/client/Client.js +5 -5
- package/api/resources/messages/client/Client.js +1 -1
- package/api/resources/models/client/Client.js +1 -1
- package/api/resources/projects/client/Client.js +1 -1
- package/api/resources/providers/client/Client.js +6 -6
- package/api/resources/runs/client/Client.js +4 -4
- package/api/resources/runs/resources/messages/client/Client.js +1 -1
- package/api/resources/runs/resources/steps/client/Client.js +1 -1
- package/api/resources/runs/resources/usage/client/Client.js +1 -1
- package/api/resources/sources/client/Client.js +10 -10
- package/api/resources/sources/resources/files/client/Client.js +3 -3
- package/api/resources/sources/resources/passages/client/Client.js +1 -1
- package/api/resources/steps/client/Client.js +3 -3
- package/api/resources/steps/resources/feedback/client/Client.js +1 -1
- package/api/resources/tags/client/Client.js +1 -1
- package/api/resources/telemetry/client/Client.js +1 -1
- package/api/resources/templates/client/Client.d.ts +107 -0
- package/api/resources/templates/client/Client.js +540 -3
- package/api/resources/templates/client/requests/TemplatesCreateTemplateRequest.d.ts +15 -0
- package/{dist/api/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.d.ts → api/resources/templates/client/requests/TemplatesDeleteTemplateRequest.d.ts} +1 -2
- package/api/resources/templates/client/requests/TemplatesForkTemplateRequest.d.ts +11 -0
- package/api/resources/templates/client/requests/TemplatesListRequest.d.ts +3 -0
- package/api/resources/templates/client/requests/TemplatesListTemplateVersionsRequest.d.ts +11 -0
- package/api/resources/templates/client/requests/TemplatesRenameTemplateRequest.d.ts +13 -0
- package/api/resources/templates/client/requests/TemplatesSaveTemplateVersionRequest.d.ts +17 -0
- package/api/resources/templates/client/requests/index.d.ts +6 -0
- package/api/resources/templates/resources/agents/client/Client.js +1 -1
- package/api/resources/templates/types/TemplatesCreateTemplateResponse.d.ts +15 -0
- package/api/resources/templates/types/TemplatesDeleteTemplateResponse.d.ts +6 -0
- package/api/resources/templates/types/TemplatesForkTemplateResponse.d.ts +15 -0
- package/api/resources/templates/types/TemplatesForkTemplateResponse.js +5 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponse.d.ts +11 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponse.js +5 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItem.d.ts +18 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItem.js +5 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemMemoryVariables.d.ts +8 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemMemoryVariables.js +5 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemMemoryVariablesDataItem.d.ts +8 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemMemoryVariablesDataItem.js +5 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemProperties.d.ts +11 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemProperties.js +5 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItem.d.ts +5 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItem.js +5 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemChildOutputMapping.d.ts +11 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemChildOutputMapping.js +5 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemFive.d.ts +8 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemFive.js +5 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemFour.d.ts +8 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemFour.js +5 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemMaxCountLimit.d.ts +9 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemMaxCountLimit.js +5 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemOne.d.ts +8 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemOne.js +5 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemSeven.d.ts +9 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemSeven.js +5 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemTwo.d.ts +8 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemTwo.js +5 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemZero.d.ts +9 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemZero.js +5 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolVariables.d.ts +8 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolVariables.js +5 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolVariablesDataItem.d.ts +8 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolVariablesDataItem.js +5 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseBlocksItem.d.ts +11 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseBlocksItem.js +5 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseConfiguration.d.ts +12 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseConfiguration.js +5 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseType.d.ts +13 -0
- package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseType.js +15 -0
- package/api/resources/templates/types/TemplatesListResponseTemplatesItem.d.ts +4 -0
- package/api/resources/templates/types/TemplatesListTemplateVersionsResponse.d.ts +9 -0
- package/api/resources/templates/types/TemplatesListTemplateVersionsResponse.js +5 -0
- package/api/resources/templates/types/TemplatesListTemplateVersionsResponseVersionsItem.d.ts +13 -0
- package/api/resources/templates/types/TemplatesListTemplateVersionsResponseVersionsItem.js +5 -0
- package/api/resources/templates/types/TemplatesRenameTemplateResponse.d.ts +6 -0
- package/api/resources/templates/types/TemplatesRenameTemplateResponse.js +5 -0
- package/api/resources/templates/types/TemplatesSaveTemplateVersionResponse.d.ts +15 -0
- package/api/resources/templates/types/TemplatesSaveTemplateVersionResponse.js +5 -0
- package/api/resources/templates/types/index.d.ts +26 -0
- package/api/resources/templates/types/index.js +26 -0
- package/api/resources/tools/client/Client.js +20 -20
- package/api/resources/voice/client/Client.js +1 -1
- package/api/types/ConflictErrorBody.d.ts +1 -1
- package/api/types/NotFoundErrorBody.d.ts +1 -1
- package/api/types/index.d.ts +1 -3
- package/api/types/index.js +1 -3
- package/dist/api/errors/index.d.ts +1 -2
- package/dist/api/errors/index.js +1 -2
- package/dist/api/resources/agents/client/Client.js +10 -10
- package/dist/api/resources/agents/resources/blocks/client/Client.js +5 -5
- package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/files/client/Client.js +3 -3
- package/dist/api/resources/agents/resources/folders/client/Client.js +3 -3
- package/dist/api/resources/agents/resources/groups/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/messages/client/Client.js +8 -8
- package/dist/api/resources/agents/resources/passages/client/Client.js +4 -4
- package/dist/api/resources/agents/resources/sources/client/Client.js +3 -3
- package/dist/api/resources/agents/resources/templates/client/Client.d.ts +14 -25
- package/dist/api/resources/agents/resources/templates/client/Client.js +59 -131
- package/dist/api/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.d.ts +0 -2
- package/dist/api/resources/agents/resources/templates/client/requests/index.d.ts +0 -2
- package/dist/api/resources/agents/resources/templates/types/index.d.ts +0 -2
- package/dist/api/resources/agents/resources/templates/types/index.js +0 -2
- package/dist/api/resources/agents/resources/tools/client/Client.js +3 -3
- package/dist/api/resources/batches/client/Client.js +4 -4
- package/dist/api/resources/blocks/client/Client.js +6 -6
- package/dist/api/resources/blocks/resources/agents/client/Client.js +1 -1
- package/dist/api/resources/clientSideAccessTokens/client/Client.js +3 -3
- package/dist/api/resources/embeddingModels/client/Client.js +1 -1
- package/dist/api/resources/folders/client/Client.js +9 -9
- package/dist/api/resources/folders/resources/files/client/Client.js +3 -3
- package/dist/api/resources/folders/resources/passages/client/Client.js +1 -1
- package/dist/api/resources/groups/client/Client.js +6 -6
- package/dist/api/resources/groups/resources/messages/client/Client.js +5 -5
- package/dist/api/resources/health/client/Client.js +1 -1
- package/dist/api/resources/identities/client/Client.js +7 -7
- package/dist/api/resources/identities/resources/properties/client/Client.js +1 -1
- package/dist/api/resources/jobs/client/Client.js +5 -5
- package/dist/api/resources/messages/client/Client.js +1 -1
- package/dist/api/resources/models/client/Client.js +1 -1
- package/dist/api/resources/projects/client/Client.js +1 -1
- package/dist/api/resources/providers/client/Client.js +6 -6
- package/dist/api/resources/runs/client/Client.js +4 -4
- package/dist/api/resources/runs/resources/messages/client/Client.js +1 -1
- package/dist/api/resources/runs/resources/steps/client/Client.js +1 -1
- package/dist/api/resources/runs/resources/usage/client/Client.js +1 -1
- package/dist/api/resources/sources/client/Client.js +10 -10
- package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
- package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
- package/dist/api/resources/steps/client/Client.js +3 -3
- package/dist/api/resources/steps/resources/feedback/client/Client.js +1 -1
- package/dist/api/resources/tags/client/Client.js +1 -1
- package/dist/api/resources/telemetry/client/Client.js +1 -1
- package/dist/api/resources/templates/client/Client.d.ts +107 -0
- package/dist/api/resources/templates/client/Client.js +540 -3
- package/dist/api/resources/templates/client/requests/TemplatesCreateTemplateRequest.d.ts +15 -0
- package/dist/api/resources/templates/client/requests/TemplatesCreateTemplateRequest.js +5 -0
- package/{api/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.d.ts → dist/api/resources/templates/client/requests/TemplatesDeleteTemplateRequest.d.ts} +1 -2
- package/dist/api/resources/templates/client/requests/TemplatesDeleteTemplateRequest.js +5 -0
- package/dist/api/resources/templates/client/requests/TemplatesForkTemplateRequest.d.ts +11 -0
- package/dist/api/resources/templates/client/requests/TemplatesForkTemplateRequest.js +5 -0
- package/dist/api/resources/templates/client/requests/TemplatesListRequest.d.ts +3 -0
- package/dist/api/resources/templates/client/requests/TemplatesListTemplateVersionsRequest.d.ts +11 -0
- package/dist/api/resources/templates/client/requests/TemplatesListTemplateVersionsRequest.js +5 -0
- package/dist/api/resources/templates/client/requests/TemplatesRenameTemplateRequest.d.ts +13 -0
- package/dist/api/resources/templates/client/requests/TemplatesRenameTemplateRequest.js +5 -0
- package/dist/api/resources/templates/client/requests/TemplatesSaveTemplateVersionRequest.d.ts +17 -0
- package/dist/api/resources/templates/client/requests/TemplatesSaveTemplateVersionRequest.js +5 -0
- package/dist/api/resources/templates/client/requests/index.d.ts +6 -0
- package/dist/api/resources/templates/resources/agents/client/Client.js +1 -1
- package/dist/api/resources/templates/types/TemplatesCreateTemplateResponse.d.ts +15 -0
- package/dist/api/resources/templates/types/TemplatesCreateTemplateResponse.js +5 -0
- package/dist/api/resources/templates/types/TemplatesDeleteTemplateResponse.d.ts +6 -0
- package/dist/api/resources/templates/types/TemplatesDeleteTemplateResponse.js +5 -0
- package/dist/api/resources/templates/types/TemplatesForkTemplateResponse.d.ts +15 -0
- package/dist/api/resources/templates/types/TemplatesForkTemplateResponse.js +5 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponse.d.ts +11 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponse.js +5 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItem.d.ts +18 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItem.js +5 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemMemoryVariables.d.ts +8 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemMemoryVariables.js +5 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemMemoryVariablesDataItem.d.ts +8 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemMemoryVariablesDataItem.js +5 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemProperties.d.ts +11 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemProperties.js +5 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItem.d.ts +5 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItem.js +5 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemChildOutputMapping.d.ts +11 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemChildOutputMapping.js +5 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemFive.d.ts +8 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemFive.js +5 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemFour.d.ts +8 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemFour.js +5 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemMaxCountLimit.d.ts +9 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemMaxCountLimit.js +5 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemOne.d.ts +8 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemOne.js +5 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemSeven.d.ts +9 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemSeven.js +5 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemTwo.d.ts +8 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemTwo.js +5 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemZero.d.ts +9 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemZero.js +5 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolVariables.d.ts +8 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolVariables.js +5 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolVariablesDataItem.d.ts +8 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolVariablesDataItem.js +5 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseBlocksItem.d.ts +11 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseBlocksItem.js +5 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseConfiguration.d.ts +12 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseConfiguration.js +5 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseType.d.ts +13 -0
- package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseType.js +15 -0
- package/dist/api/resources/templates/types/TemplatesListResponseTemplatesItem.d.ts +4 -0
- package/dist/api/resources/templates/types/TemplatesListTemplateVersionsResponse.d.ts +9 -0
- package/dist/api/resources/templates/types/TemplatesListTemplateVersionsResponse.js +5 -0
- package/dist/api/resources/templates/types/TemplatesListTemplateVersionsResponseVersionsItem.d.ts +13 -0
- package/dist/api/resources/templates/types/TemplatesListTemplateVersionsResponseVersionsItem.js +5 -0
- package/dist/api/resources/templates/types/TemplatesRenameTemplateResponse.d.ts +6 -0
- package/dist/api/resources/templates/types/TemplatesRenameTemplateResponse.js +5 -0
- package/dist/api/resources/templates/types/TemplatesSaveTemplateVersionResponse.d.ts +15 -0
- package/dist/api/resources/templates/types/TemplatesSaveTemplateVersionResponse.js +5 -0
- package/dist/api/resources/templates/types/index.d.ts +26 -0
- package/dist/api/resources/templates/types/index.js +26 -0
- package/dist/api/resources/tools/client/Client.js +20 -20
- package/dist/api/resources/voice/client/Client.js +1 -1
- package/dist/api/types/ConflictErrorBody.d.ts +1 -1
- package/dist/api/types/NotFoundErrorBody.d.ts +1 -1
- package/dist/api/types/index.d.ts +1 -3
- package/dist/api/types/index.js +1 -3
- package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.d.ts +0 -1
- package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.js +0 -1
- package/dist/serialization/resources/agents/resources/templates/client/requests/index.d.ts +0 -2
- package/dist/serialization/resources/agents/resources/templates/client/requests/index.js +1 -5
- package/dist/serialization/resources/agents/resources/templates/types/index.d.ts +0 -2
- package/dist/serialization/resources/agents/resources/templates/types/index.js +0 -2
- package/dist/serialization/resources/index.d.ts +1 -0
- package/dist/serialization/resources/index.js +1 -0
- package/dist/serialization/resources/templates/client/index.d.ts +1 -0
- package/dist/serialization/resources/templates/client/index.js +17 -0
- package/dist/serialization/resources/templates/client/requests/TemplatesCreateTemplateRequest.d.ts +13 -0
- package/dist/serialization/resources/templates/client/requests/TemplatesCreateTemplateRequest.js +44 -0
- package/dist/serialization/resources/templates/client/requests/TemplatesDeleteTemplateRequest.d.ts +11 -0
- package/dist/serialization/resources/{agents/resources/templates/types/TemplatesCreateVersionRequestReturnAgentState.js → templates/client/requests/TemplatesDeleteTemplateRequest.js} +3 -3
- package/dist/serialization/resources/templates/client/requests/TemplatesForkTemplateRequest.d.ts +12 -0
- package/dist/serialization/resources/templates/client/requests/TemplatesForkTemplateRequest.js +43 -0
- package/dist/serialization/resources/templates/client/requests/TemplatesRenameTemplateRequest.d.ts +12 -0
- package/dist/serialization/{types/InternalServerErrorBody.js → resources/templates/client/requests/TemplatesRenameTemplateRequest.js} +4 -4
- package/dist/serialization/resources/templates/client/requests/TemplatesSaveTemplateVersionRequest.d.ts +15 -0
- package/dist/serialization/resources/templates/client/requests/TemplatesSaveTemplateVersionRequest.js +46 -0
- package/dist/serialization/resources/templates/client/requests/index.d.ts +5 -0
- package/dist/serialization/resources/templates/client/requests/index.js +13 -0
- package/dist/serialization/resources/templates/index.d.ts +1 -0
- package/dist/serialization/resources/templates/index.js +1 -0
- package/dist/serialization/resources/templates/types/TemplatesCreateTemplateResponse.d.ts +18 -0
- package/dist/serialization/resources/templates/types/TemplatesCreateTemplateResponse.js +49 -0
- package/dist/serialization/resources/templates/types/TemplatesDeleteTemplateResponse.d.ts +12 -0
- package/dist/serialization/resources/{agents/resources/templates/client/requests/TemplatesCreateRequest.js → templates/types/TemplatesDeleteTemplateResponse.js} +4 -4
- package/dist/serialization/resources/templates/types/TemplatesForkTemplateResponse.d.ts +18 -0
- package/dist/serialization/resources/templates/types/TemplatesForkTemplateResponse.js +49 -0
- package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponse.d.ts +20 -0
- package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponse.js +51 -0
- package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItem.d.ts +27 -0
- package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItem.js +58 -0
- package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemMemoryVariables.d.ts +14 -0
- package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemMemoryVariables.js +45 -0
- package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemMemoryVariablesDataItem.d.ts +14 -0
- package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemMemoryVariablesDataItem.js +45 -0
- package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemProperties.d.ts +17 -0
- package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemProperties.js +48 -0
- package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItem.d.ts +18 -0
- package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItem.js +58 -0
- package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemChildOutputMapping.d.ts +17 -0
- package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemChildOutputMapping.js +48 -0
- package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemFive.d.ts +14 -0
- package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemFive.js +45 -0
- package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemFour.d.ts +14 -0
- package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemFour.js +45 -0
- package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemMaxCountLimit.d.ts +15 -0
- package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemMaxCountLimit.js +46 -0
- package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemOne.d.ts +14 -0
- package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemOne.js +45 -0
- package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemSeven.d.ts +15 -0
- package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemSeven.js +46 -0
- package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemTwo.d.ts +14 -0
- package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemTwo.js +45 -0
- package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemZero.d.ts +15 -0
- package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemZero.js +46 -0
- package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolVariables.d.ts +14 -0
- package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolVariables.js +45 -0
- package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolVariablesDataItem.d.ts +14 -0
- package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolVariablesDataItem.js +45 -0
- package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseBlocksItem.d.ts +17 -0
- package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseBlocksItem.js +48 -0
- package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseConfiguration.d.ts +18 -0
- package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseConfiguration.js +49 -0
- package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseType.d.ts +10 -0
- package/dist/serialization/{types/NotFoundErrorBodyMessage.js → resources/templates/types/TemplatesGetTemplateSnapshotResponseType.js} +10 -5
- package/dist/serialization/resources/templates/types/TemplatesListResponseTemplatesItem.d.ts +2 -0
- package/dist/serialization/resources/templates/types/TemplatesListResponseTemplatesItem.js +2 -0
- package/dist/serialization/resources/templates/types/TemplatesListTemplateVersionsResponse.d.ts +15 -0
- package/dist/serialization/resources/templates/types/TemplatesListTemplateVersionsResponse.js +46 -0
- package/dist/serialization/resources/templates/types/TemplatesListTemplateVersionsResponseVersionsItem.d.ts +15 -0
- package/{serialization/resources/agents/resources/templates/client/requests/TemplatesCreateVersionRequest.js → dist/serialization/resources/templates/types/TemplatesListTemplateVersionsResponseVersionsItem.js} +6 -5
- package/dist/serialization/resources/templates/types/TemplatesRenameTemplateResponse.d.ts +12 -0
- package/{serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.js → dist/serialization/resources/templates/types/TemplatesRenameTemplateResponse.js} +4 -4
- package/dist/serialization/resources/templates/types/TemplatesSaveTemplateVersionResponse.d.ts +18 -0
- package/dist/serialization/resources/templates/types/TemplatesSaveTemplateVersionResponse.js +49 -0
- package/dist/serialization/resources/templates/types/index.d.ts +26 -0
- package/dist/serialization/resources/templates/types/index.js +26 -0
- package/dist/serialization/types/ConflictErrorBody.d.ts +1 -1
- package/dist/serialization/types/ConflictErrorBody.js +1 -1
- package/dist/serialization/types/NotFoundErrorBody.d.ts +1 -1
- package/dist/serialization/types/NotFoundErrorBody.js +1 -1
- package/dist/serialization/types/index.d.ts +1 -3
- package/dist/serialization/types/index.js +1 -3
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +555 -30
- package/serialization/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.d.ts +0 -1
- package/serialization/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.js +0 -1
- package/serialization/resources/agents/resources/templates/client/requests/index.d.ts +0 -2
- package/serialization/resources/agents/resources/templates/client/requests/index.js +1 -5
- package/serialization/resources/agents/resources/templates/types/index.d.ts +0 -2
- package/serialization/resources/agents/resources/templates/types/index.js +0 -2
- package/serialization/resources/index.d.ts +1 -0
- package/serialization/resources/index.js +1 -0
- package/serialization/resources/templates/client/index.d.ts +1 -0
- package/serialization/resources/templates/client/index.js +17 -0
- package/serialization/resources/templates/client/requests/TemplatesCreateTemplateRequest.d.ts +13 -0
- package/serialization/resources/templates/client/requests/TemplatesCreateTemplateRequest.js +44 -0
- package/serialization/resources/templates/client/requests/TemplatesDeleteTemplateRequest.d.ts +11 -0
- package/serialization/resources/{agents/resources/templates/types/TemplatesCreateVersionRequestReturnAgentState.js → templates/client/requests/TemplatesDeleteTemplateRequest.js} +3 -3
- package/serialization/resources/templates/client/requests/TemplatesForkTemplateRequest.d.ts +12 -0
- package/serialization/resources/templates/client/requests/TemplatesForkTemplateRequest.js +43 -0
- package/serialization/resources/templates/client/requests/TemplatesRenameTemplateRequest.d.ts +12 -0
- package/{dist/serialization/resources/agents/resources/templates/types/TemplatesCreateResponse.js → serialization/resources/templates/client/requests/TemplatesRenameTemplateRequest.js} +4 -5
- package/serialization/resources/templates/client/requests/TemplatesSaveTemplateVersionRequest.d.ts +15 -0
- package/serialization/resources/templates/client/requests/TemplatesSaveTemplateVersionRequest.js +46 -0
- package/serialization/resources/templates/client/requests/index.d.ts +5 -0
- package/serialization/resources/templates/client/requests/index.js +13 -0
- package/serialization/resources/templates/index.d.ts +1 -0
- package/serialization/resources/templates/index.js +1 -0
- package/serialization/resources/templates/types/TemplatesCreateTemplateResponse.d.ts +18 -0
- package/serialization/resources/templates/types/TemplatesCreateTemplateResponse.js +49 -0
- package/serialization/resources/templates/types/TemplatesDeleteTemplateResponse.d.ts +12 -0
- package/serialization/resources/templates/types/TemplatesDeleteTemplateResponse.js +43 -0
- package/serialization/resources/templates/types/TemplatesForkTemplateResponse.d.ts +18 -0
- package/serialization/resources/templates/types/TemplatesForkTemplateResponse.js +49 -0
- package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponse.d.ts +20 -0
- package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponse.js +51 -0
- package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItem.d.ts +27 -0
- package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItem.js +58 -0
- package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemMemoryVariables.d.ts +14 -0
- package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemMemoryVariables.js +45 -0
- package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemMemoryVariablesDataItem.d.ts +14 -0
- package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemMemoryVariablesDataItem.js +45 -0
- package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemProperties.d.ts +17 -0
- package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemProperties.js +48 -0
- package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItem.d.ts +18 -0
- package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItem.js +58 -0
- package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemChildOutputMapping.d.ts +17 -0
- package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemChildOutputMapping.js +48 -0
- package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemFive.d.ts +14 -0
- package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemFive.js +45 -0
- package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemFour.d.ts +14 -0
- package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemFour.js +45 -0
- package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemMaxCountLimit.d.ts +15 -0
- package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemMaxCountLimit.js +46 -0
- package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemOne.d.ts +14 -0
- package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemOne.js +45 -0
- package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemSeven.d.ts +15 -0
- package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemSeven.js +46 -0
- package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemTwo.d.ts +14 -0
- package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemTwo.js +45 -0
- package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemZero.d.ts +15 -0
- package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItemZero.js +46 -0
- package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolVariables.d.ts +14 -0
- package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolVariables.js +45 -0
- package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolVariablesDataItem.d.ts +14 -0
- package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemToolVariablesDataItem.js +45 -0
- package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseBlocksItem.d.ts +17 -0
- package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseBlocksItem.js +48 -0
- package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseConfiguration.d.ts +18 -0
- package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseConfiguration.js +49 -0
- package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseType.d.ts +10 -0
- package/serialization/{types/NotFoundErrorBodyMessage.js → resources/templates/types/TemplatesGetTemplateSnapshotResponseType.js} +10 -5
- package/serialization/resources/templates/types/TemplatesListResponseTemplatesItem.d.ts +2 -0
- package/serialization/resources/templates/types/TemplatesListResponseTemplatesItem.js +2 -0
- package/serialization/resources/templates/types/TemplatesListTemplateVersionsResponse.d.ts +15 -0
- package/serialization/resources/templates/types/TemplatesListTemplateVersionsResponse.js +46 -0
- package/serialization/resources/templates/types/TemplatesListTemplateVersionsResponseVersionsItem.d.ts +15 -0
- package/{dist/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateVersionRequest.js → serialization/resources/templates/types/TemplatesListTemplateVersionsResponseVersionsItem.js} +6 -5
- package/serialization/resources/templates/types/TemplatesRenameTemplateResponse.d.ts +12 -0
- package/serialization/resources/templates/types/TemplatesRenameTemplateResponse.js +43 -0
- package/serialization/resources/templates/types/TemplatesSaveTemplateVersionResponse.d.ts +18 -0
- package/serialization/resources/templates/types/TemplatesSaveTemplateVersionResponse.js +49 -0
- package/serialization/resources/templates/types/index.d.ts +26 -0
- package/serialization/resources/templates/types/index.js +26 -0
- package/serialization/types/ConflictErrorBody.d.ts +1 -1
- package/serialization/types/ConflictErrorBody.js +1 -1
- package/serialization/types/NotFoundErrorBody.d.ts +1 -1
- package/serialization/types/NotFoundErrorBody.js +1 -1
- package/serialization/types/index.d.ts +1 -3
- package/serialization/types/index.js +1 -3
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/errors/InternalServerError.d.ts +0 -8
- package/api/errors/InternalServerError.js +0 -52
- package/api/resources/agents/resources/templates/client/requests/TemplatesCreateVersionRequest.d.ts +0 -15
- package/api/resources/agents/resources/templates/types/TemplatesCreateResponse.d.ts +0 -7
- package/api/resources/agents/resources/templates/types/TemplatesCreateVersionRequestReturnAgentState.d.ts +0 -7
- package/api/resources/agents/resources/templates/types/TemplatesCreateVersionRequestReturnAgentState.js +0 -9
- package/api/types/InternalServerErrorBody.d.ts +0 -6
- package/api/types/NotFoundErrorBodyMessage.d.ts +0 -8
- package/api/types/NotFoundErrorBodyMessage.js +0 -10
- package/dist/api/errors/InternalServerError.d.ts +0 -8
- package/dist/api/errors/InternalServerError.js +0 -52
- package/dist/api/resources/agents/resources/templates/client/requests/TemplatesCreateVersionRequest.d.ts +0 -15
- package/dist/api/resources/agents/resources/templates/types/TemplatesCreateResponse.d.ts +0 -7
- package/dist/api/resources/agents/resources/templates/types/TemplatesCreateVersionRequestReturnAgentState.d.ts +0 -7
- package/dist/api/resources/agents/resources/templates/types/TemplatesCreateVersionRequestReturnAgentState.js +0 -9
- package/dist/api/types/InternalServerErrorBody.d.ts +0 -6
- package/dist/api/types/NotFoundErrorBodyMessage.d.ts +0 -8
- package/dist/api/types/NotFoundErrorBodyMessage.js +0 -10
- package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.d.ts +0 -12
- package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateVersionRequest.d.ts +0 -14
- package/dist/serialization/resources/agents/resources/templates/types/TemplatesCreateResponse.d.ts +0 -13
- package/dist/serialization/resources/agents/resources/templates/types/TemplatesCreateVersionRequestReturnAgentState.d.ts +0 -10
- package/dist/serialization/types/InternalServerErrorBody.d.ts +0 -12
- package/dist/serialization/types/NotFoundErrorBodyMessage.d.ts +0 -10
- package/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.d.ts +0 -12
- package/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateVersionRequest.d.ts +0 -14
- package/serialization/resources/agents/resources/templates/types/TemplatesCreateResponse.d.ts +0 -13
- package/serialization/resources/agents/resources/templates/types/TemplatesCreateResponse.js +0 -44
- package/serialization/resources/agents/resources/templates/types/TemplatesCreateVersionRequestReturnAgentState.d.ts +0 -10
- package/serialization/types/InternalServerErrorBody.d.ts +0 -12
- package/serialization/types/InternalServerErrorBody.js +0 -43
- package/serialization/types/NotFoundErrorBodyMessage.d.ts +0 -10
- /package/api/resources/{agents/resources/templates/client/requests/TemplatesCreateRequest.js → templates/client/requests/TemplatesCreateTemplateRequest.js} +0 -0
- /package/api/resources/{agents/resources/templates/client/requests/TemplatesCreateVersionRequest.js → templates/client/requests/TemplatesDeleteTemplateRequest.js} +0 -0
- /package/api/resources/{agents/resources/templates/types/TemplatesCreateResponse.js → templates/client/requests/TemplatesForkTemplateRequest.js} +0 -0
- /package/api/{types/InternalServerErrorBody.js → resources/templates/client/requests/TemplatesListTemplateVersionsRequest.js} +0 -0
- /package/{dist/api/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.js → api/resources/templates/client/requests/TemplatesRenameTemplateRequest.js} +0 -0
- /package/{dist/api/resources/agents/resources/templates/client/requests/TemplatesCreateVersionRequest.js → api/resources/templates/client/requests/TemplatesSaveTemplateVersionRequest.js} +0 -0
- /package/{dist/api/resources/agents/resources/templates/types/TemplatesCreateResponse.js → api/resources/templates/types/TemplatesCreateTemplateResponse.js} +0 -0
- /package/{dist/api/types/InternalServerErrorBody.js → api/resources/templates/types/TemplatesDeleteTemplateResponse.js} +0 -0
|
@@ -51,6 +51,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
51
51
|
exports.Templates = void 0;
|
|
52
52
|
const environments = __importStar(require("../../../../environments"));
|
|
53
53
|
const core = __importStar(require("../../../../core"));
|
|
54
|
+
const Letta = __importStar(require("../../../index"));
|
|
54
55
|
const url_join_1 = __importDefault(require("url-join"));
|
|
55
56
|
const serializers = __importStar(require("../../../../serialization/index"));
|
|
56
57
|
const errors = __importStar(require("../../../../errors/index"));
|
|
@@ -78,7 +79,7 @@ class Templates {
|
|
|
78
79
|
__list() {
|
|
79
80
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
80
81
|
var _a, _b, _c;
|
|
81
|
-
const { offset, limit, name, projectId } = request;
|
|
82
|
+
const { offset, limit, templateId, name, search, projectSlug, projectId } = request;
|
|
82
83
|
const _queryParams = {};
|
|
83
84
|
if (offset != null) {
|
|
84
85
|
_queryParams["offset"] = offset;
|
|
@@ -86,18 +87,27 @@ class Templates {
|
|
|
86
87
|
if (limit != null) {
|
|
87
88
|
_queryParams["limit"] = limit;
|
|
88
89
|
}
|
|
90
|
+
if (templateId != null) {
|
|
91
|
+
_queryParams["template_id"] = templateId;
|
|
92
|
+
}
|
|
89
93
|
if (name != null) {
|
|
90
94
|
_queryParams["name"] = name;
|
|
91
95
|
}
|
|
96
|
+
if (search != null) {
|
|
97
|
+
_queryParams["search"] = search;
|
|
98
|
+
}
|
|
99
|
+
if (projectSlug != null) {
|
|
100
|
+
_queryParams["project_slug"] = projectSlug;
|
|
101
|
+
}
|
|
92
102
|
if (projectId != null) {
|
|
93
|
-
_queryParams["
|
|
103
|
+
_queryParams["project_id"] = projectId;
|
|
94
104
|
}
|
|
95
105
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
96
106
|
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/templates"),
|
|
97
107
|
method: "GET",
|
|
98
108
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
99
109
|
? yield core.Supplier.get(this._options.project)
|
|
100
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
110
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.181", "User-Agent": "@letta-ai/letta-client/0.1.181", "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),
|
|
101
111
|
contentType: "application/json",
|
|
102
112
|
queryParameters: _queryParams,
|
|
103
113
|
requestType: "json",
|
|
@@ -141,6 +151,533 @@ class Templates {
|
|
|
141
151
|
}
|
|
142
152
|
});
|
|
143
153
|
}
|
|
154
|
+
/**
|
|
155
|
+
* Saves the current version of the template as a new version
|
|
156
|
+
*
|
|
157
|
+
* @param {string} project - The project slug
|
|
158
|
+
* @param {string} templateName - The template version, formatted as {template-name}, any version appended will be ignored
|
|
159
|
+
* @param {Letta.TemplatesSaveTemplateVersionRequest} request
|
|
160
|
+
* @param {Templates.RequestOptions} requestOptions - Request-specific configuration.
|
|
161
|
+
*
|
|
162
|
+
* @throws {@link Letta.BadRequestError}
|
|
163
|
+
*
|
|
164
|
+
* @example
|
|
165
|
+
* await client.templates.savetemplateversion("project", "template_name")
|
|
166
|
+
*/
|
|
167
|
+
savetemplateversion(project, templateName, request = {}, requestOptions) {
|
|
168
|
+
return core.HttpResponsePromise.fromPromise(this.__savetemplateversion(project, templateName, request, requestOptions));
|
|
169
|
+
}
|
|
170
|
+
__savetemplateversion(project_1, templateName_1) {
|
|
171
|
+
return __awaiter(this, arguments, void 0, function* (project, templateName, request = {}, requestOptions) {
|
|
172
|
+
var _a, _b, _c;
|
|
173
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
174
|
+
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/templates/${encodeURIComponent(project)}/${encodeURIComponent(templateName)}`),
|
|
175
|
+
method: "POST",
|
|
176
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
177
|
+
? yield core.Supplier.get(this._options.project)
|
|
178
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.181", "User-Agent": "@letta-ai/letta-client/0.1.181", "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),
|
|
179
|
+
contentType: "application/json",
|
|
180
|
+
requestType: "json",
|
|
181
|
+
body: serializers.TemplatesSaveTemplateVersionRequest.jsonOrThrow(request, {
|
|
182
|
+
unrecognizedObjectKeys: "strip",
|
|
183
|
+
}),
|
|
184
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
185
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
186
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
187
|
+
});
|
|
188
|
+
if (_response.ok) {
|
|
189
|
+
return {
|
|
190
|
+
data: serializers.TemplatesSaveTemplateVersionResponse.parseOrThrow(_response.body, {
|
|
191
|
+
unrecognizedObjectKeys: "passthrough",
|
|
192
|
+
allowUnrecognizedUnionMembers: true,
|
|
193
|
+
allowUnrecognizedEnumValues: true,
|
|
194
|
+
skipValidation: true,
|
|
195
|
+
breadcrumbsPrefix: ["response"],
|
|
196
|
+
}),
|
|
197
|
+
rawResponse: _response.rawResponse,
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
if (_response.error.reason === "status-code") {
|
|
201
|
+
switch (_response.error.statusCode) {
|
|
202
|
+
case 400:
|
|
203
|
+
throw new Letta.BadRequestError(_response.error.body, _response.rawResponse);
|
|
204
|
+
default:
|
|
205
|
+
throw new errors.LettaError({
|
|
206
|
+
statusCode: _response.error.statusCode,
|
|
207
|
+
body: _response.error.body,
|
|
208
|
+
rawResponse: _response.rawResponse,
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
switch (_response.error.reason) {
|
|
213
|
+
case "non-json":
|
|
214
|
+
throw new errors.LettaError({
|
|
215
|
+
statusCode: _response.error.statusCode,
|
|
216
|
+
body: _response.error.rawBody,
|
|
217
|
+
rawResponse: _response.rawResponse,
|
|
218
|
+
});
|
|
219
|
+
case "timeout":
|
|
220
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/templates/{project}/{template_name}.");
|
|
221
|
+
case "unknown":
|
|
222
|
+
throw new errors.LettaError({
|
|
223
|
+
message: _response.error.errorMessage,
|
|
224
|
+
rawResponse: _response.rawResponse,
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Deletes all versions of a template with the specified name
|
|
231
|
+
*
|
|
232
|
+
* @param {string} project - The project slug
|
|
233
|
+
* @param {string} templateName - The template name (without version)
|
|
234
|
+
* @param {Letta.TemplatesDeleteTemplateRequest} request
|
|
235
|
+
* @param {Templates.RequestOptions} requestOptions - Request-specific configuration.
|
|
236
|
+
*
|
|
237
|
+
* @throws {@link Letta.NotFoundError}
|
|
238
|
+
*
|
|
239
|
+
* @example
|
|
240
|
+
* await client.templates.deletetemplate("project", "template_name")
|
|
241
|
+
*/
|
|
242
|
+
deletetemplate(project, templateName, request = {}, requestOptions) {
|
|
243
|
+
return core.HttpResponsePromise.fromPromise(this.__deletetemplate(project, templateName, request, requestOptions));
|
|
244
|
+
}
|
|
245
|
+
__deletetemplate(project_1, templateName_1) {
|
|
246
|
+
return __awaiter(this, arguments, void 0, function* (project, templateName, request = {}, requestOptions) {
|
|
247
|
+
var _a, _b, _c;
|
|
248
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
249
|
+
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/templates/${encodeURIComponent(project)}/${encodeURIComponent(templateName)}`),
|
|
250
|
+
method: "DELETE",
|
|
251
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
252
|
+
? yield core.Supplier.get(this._options.project)
|
|
253
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.181", "User-Agent": "@letta-ai/letta-client/0.1.181", "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),
|
|
254
|
+
contentType: "application/json",
|
|
255
|
+
requestType: "json",
|
|
256
|
+
body: serializers.TemplatesDeleteTemplateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
257
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
258
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
259
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
260
|
+
});
|
|
261
|
+
if (_response.ok) {
|
|
262
|
+
return {
|
|
263
|
+
data: serializers.TemplatesDeleteTemplateResponse.parseOrThrow(_response.body, {
|
|
264
|
+
unrecognizedObjectKeys: "passthrough",
|
|
265
|
+
allowUnrecognizedUnionMembers: true,
|
|
266
|
+
allowUnrecognizedEnumValues: true,
|
|
267
|
+
skipValidation: true,
|
|
268
|
+
breadcrumbsPrefix: ["response"],
|
|
269
|
+
}),
|
|
270
|
+
rawResponse: _response.rawResponse,
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
if (_response.error.reason === "status-code") {
|
|
274
|
+
switch (_response.error.statusCode) {
|
|
275
|
+
case 404:
|
|
276
|
+
throw new Letta.NotFoundError(_response.error.body, _response.rawResponse);
|
|
277
|
+
default:
|
|
278
|
+
throw new errors.LettaError({
|
|
279
|
+
statusCode: _response.error.statusCode,
|
|
280
|
+
body: _response.error.body,
|
|
281
|
+
rawResponse: _response.rawResponse,
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
switch (_response.error.reason) {
|
|
286
|
+
case "non-json":
|
|
287
|
+
throw new errors.LettaError({
|
|
288
|
+
statusCode: _response.error.statusCode,
|
|
289
|
+
body: _response.error.rawBody,
|
|
290
|
+
rawResponse: _response.rawResponse,
|
|
291
|
+
});
|
|
292
|
+
case "timeout":
|
|
293
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling DELETE /v1/templates/{project}/{template_name}.");
|
|
294
|
+
case "unknown":
|
|
295
|
+
throw new errors.LettaError({
|
|
296
|
+
message: _response.error.errorMessage,
|
|
297
|
+
rawResponse: _response.rawResponse,
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Get a snapshot of the template version, this will return the template state at a specific version
|
|
304
|
+
*
|
|
305
|
+
* @param {string} project - The project slug
|
|
306
|
+
* @param {string} templateVersion - The template version, formatted as {template-name}:{version-number} or {template-name}:latest
|
|
307
|
+
* @param {Templates.RequestOptions} requestOptions - Request-specific configuration.
|
|
308
|
+
*
|
|
309
|
+
* @example
|
|
310
|
+
* await client.templates.gettemplatesnapshot("project", "template_version")
|
|
311
|
+
*/
|
|
312
|
+
gettemplatesnapshot(project, templateVersion, requestOptions) {
|
|
313
|
+
return core.HttpResponsePromise.fromPromise(this.__gettemplatesnapshot(project, templateVersion, requestOptions));
|
|
314
|
+
}
|
|
315
|
+
__gettemplatesnapshot(project, templateVersion, requestOptions) {
|
|
316
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
317
|
+
var _a, _b, _c;
|
|
318
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
319
|
+
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/templates/${encodeURIComponent(project)}/${encodeURIComponent(templateVersion)}/snapshot`),
|
|
320
|
+
method: "GET",
|
|
321
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
322
|
+
? yield core.Supplier.get(this._options.project)
|
|
323
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.181", "User-Agent": "@letta-ai/letta-client/0.1.181", "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),
|
|
324
|
+
contentType: "application/json",
|
|
325
|
+
requestType: "json",
|
|
326
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
327
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
328
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
329
|
+
});
|
|
330
|
+
if (_response.ok) {
|
|
331
|
+
return {
|
|
332
|
+
data: serializers.TemplatesGetTemplateSnapshotResponse.parseOrThrow(_response.body, {
|
|
333
|
+
unrecognizedObjectKeys: "passthrough",
|
|
334
|
+
allowUnrecognizedUnionMembers: true,
|
|
335
|
+
allowUnrecognizedEnumValues: true,
|
|
336
|
+
skipValidation: true,
|
|
337
|
+
breadcrumbsPrefix: ["response"],
|
|
338
|
+
}),
|
|
339
|
+
rawResponse: _response.rawResponse,
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
if (_response.error.reason === "status-code") {
|
|
343
|
+
throw new errors.LettaError({
|
|
344
|
+
statusCode: _response.error.statusCode,
|
|
345
|
+
body: _response.error.body,
|
|
346
|
+
rawResponse: _response.rawResponse,
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
switch (_response.error.reason) {
|
|
350
|
+
case "non-json":
|
|
351
|
+
throw new errors.LettaError({
|
|
352
|
+
statusCode: _response.error.statusCode,
|
|
353
|
+
body: _response.error.rawBody,
|
|
354
|
+
rawResponse: _response.rawResponse,
|
|
355
|
+
});
|
|
356
|
+
case "timeout":
|
|
357
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/templates/{project}/{template_version}/snapshot.");
|
|
358
|
+
case "unknown":
|
|
359
|
+
throw new errors.LettaError({
|
|
360
|
+
message: _response.error.errorMessage,
|
|
361
|
+
rawResponse: _response.rawResponse,
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Forks a template version into a new template
|
|
368
|
+
*
|
|
369
|
+
* @param {string} project - The project slug
|
|
370
|
+
* @param {string} templateVersion - The template version, formatted as {template-name}:{version-number} or {template-name}:latest
|
|
371
|
+
* @param {Letta.TemplatesForkTemplateRequest} request
|
|
372
|
+
* @param {Templates.RequestOptions} requestOptions - Request-specific configuration.
|
|
373
|
+
*
|
|
374
|
+
* @throws {@link Letta.BadRequestError}
|
|
375
|
+
*
|
|
376
|
+
* @example
|
|
377
|
+
* await client.templates.forktemplate("project", "template_version")
|
|
378
|
+
*/
|
|
379
|
+
forktemplate(project, templateVersion, request = {}, requestOptions) {
|
|
380
|
+
return core.HttpResponsePromise.fromPromise(this.__forktemplate(project, templateVersion, request, requestOptions));
|
|
381
|
+
}
|
|
382
|
+
__forktemplate(project_1, templateVersion_1) {
|
|
383
|
+
return __awaiter(this, arguments, void 0, function* (project, templateVersion, request = {}, requestOptions) {
|
|
384
|
+
var _a, _b, _c;
|
|
385
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
386
|
+
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/templates/${encodeURIComponent(project)}/${encodeURIComponent(templateVersion)}/fork`),
|
|
387
|
+
method: "POST",
|
|
388
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
389
|
+
? yield core.Supplier.get(this._options.project)
|
|
390
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.181", "User-Agent": "@letta-ai/letta-client/0.1.181", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
391
|
+
contentType: "application/json",
|
|
392
|
+
requestType: "json",
|
|
393
|
+
body: serializers.TemplatesForkTemplateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
394
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
395
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
396
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
397
|
+
});
|
|
398
|
+
if (_response.ok) {
|
|
399
|
+
return {
|
|
400
|
+
data: serializers.TemplatesForkTemplateResponse.parseOrThrow(_response.body, {
|
|
401
|
+
unrecognizedObjectKeys: "passthrough",
|
|
402
|
+
allowUnrecognizedUnionMembers: true,
|
|
403
|
+
allowUnrecognizedEnumValues: true,
|
|
404
|
+
skipValidation: true,
|
|
405
|
+
breadcrumbsPrefix: ["response"],
|
|
406
|
+
}),
|
|
407
|
+
rawResponse: _response.rawResponse,
|
|
408
|
+
};
|
|
409
|
+
}
|
|
410
|
+
if (_response.error.reason === "status-code") {
|
|
411
|
+
switch (_response.error.statusCode) {
|
|
412
|
+
case 400:
|
|
413
|
+
throw new Letta.BadRequestError(_response.error.body, _response.rawResponse);
|
|
414
|
+
default:
|
|
415
|
+
throw new errors.LettaError({
|
|
416
|
+
statusCode: _response.error.statusCode,
|
|
417
|
+
body: _response.error.body,
|
|
418
|
+
rawResponse: _response.rawResponse,
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
switch (_response.error.reason) {
|
|
423
|
+
case "non-json":
|
|
424
|
+
throw new errors.LettaError({
|
|
425
|
+
statusCode: _response.error.statusCode,
|
|
426
|
+
body: _response.error.rawBody,
|
|
427
|
+
rawResponse: _response.rawResponse,
|
|
428
|
+
});
|
|
429
|
+
case "timeout":
|
|
430
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/templates/{project}/{template_version}/fork.");
|
|
431
|
+
case "unknown":
|
|
432
|
+
throw new errors.LettaError({
|
|
433
|
+
message: _response.error.errorMessage,
|
|
434
|
+
rawResponse: _response.rawResponse,
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* Creates a new template from an existing agent
|
|
441
|
+
*
|
|
442
|
+
* @param {string} project - The project slug
|
|
443
|
+
* @param {Letta.TemplatesCreateTemplateRequest} request
|
|
444
|
+
* @param {Templates.RequestOptions} requestOptions - Request-specific configuration.
|
|
445
|
+
*
|
|
446
|
+
* @throws {@link Letta.BadRequestError}
|
|
447
|
+
*
|
|
448
|
+
* @example
|
|
449
|
+
* await client.templates.createtemplate("project", {
|
|
450
|
+
* agentId: "agent_id"
|
|
451
|
+
* })
|
|
452
|
+
*/
|
|
453
|
+
createtemplate(project, request, requestOptions) {
|
|
454
|
+
return core.HttpResponsePromise.fromPromise(this.__createtemplate(project, request, requestOptions));
|
|
455
|
+
}
|
|
456
|
+
__createtemplate(project, request, requestOptions) {
|
|
457
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
458
|
+
var _a, _b, _c;
|
|
459
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
460
|
+
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/templates/${encodeURIComponent(project)}`),
|
|
461
|
+
method: "POST",
|
|
462
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
463
|
+
? yield core.Supplier.get(this._options.project)
|
|
464
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.181", "User-Agent": "@letta-ai/letta-client/0.1.181", "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),
|
|
465
|
+
contentType: "application/json",
|
|
466
|
+
requestType: "json",
|
|
467
|
+
body: Object.assign(Object.assign({}, serializers.TemplatesCreateTemplateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" })), { type: "agent" }),
|
|
468
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
469
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
470
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
471
|
+
});
|
|
472
|
+
if (_response.ok) {
|
|
473
|
+
return {
|
|
474
|
+
data: serializers.TemplatesCreateTemplateResponse.parseOrThrow(_response.body, {
|
|
475
|
+
unrecognizedObjectKeys: "passthrough",
|
|
476
|
+
allowUnrecognizedUnionMembers: true,
|
|
477
|
+
allowUnrecognizedEnumValues: true,
|
|
478
|
+
skipValidation: true,
|
|
479
|
+
breadcrumbsPrefix: ["response"],
|
|
480
|
+
}),
|
|
481
|
+
rawResponse: _response.rawResponse,
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
if (_response.error.reason === "status-code") {
|
|
485
|
+
switch (_response.error.statusCode) {
|
|
486
|
+
case 400:
|
|
487
|
+
throw new Letta.BadRequestError(_response.error.body, _response.rawResponse);
|
|
488
|
+
default:
|
|
489
|
+
throw new errors.LettaError({
|
|
490
|
+
statusCode: _response.error.statusCode,
|
|
491
|
+
body: _response.error.body,
|
|
492
|
+
rawResponse: _response.rawResponse,
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
switch (_response.error.reason) {
|
|
497
|
+
case "non-json":
|
|
498
|
+
throw new errors.LettaError({
|
|
499
|
+
statusCode: _response.error.statusCode,
|
|
500
|
+
body: _response.error.rawBody,
|
|
501
|
+
rawResponse: _response.rawResponse,
|
|
502
|
+
});
|
|
503
|
+
case "timeout":
|
|
504
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/templates/{project}.");
|
|
505
|
+
case "unknown":
|
|
506
|
+
throw new errors.LettaError({
|
|
507
|
+
message: _response.error.errorMessage,
|
|
508
|
+
rawResponse: _response.rawResponse,
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
});
|
|
512
|
+
}
|
|
513
|
+
/**
|
|
514
|
+
* Renames all versions of a template with the specified name. Versions are automatically stripped from the current template name if accidentally included.
|
|
515
|
+
*
|
|
516
|
+
* @param {string} project - The project slug
|
|
517
|
+
* @param {string} templateName - The current template name (version will be automatically stripped if included)
|
|
518
|
+
* @param {Letta.TemplatesRenameTemplateRequest} request
|
|
519
|
+
* @param {Templates.RequestOptions} requestOptions - Request-specific configuration.
|
|
520
|
+
*
|
|
521
|
+
* @throws {@link Letta.BadRequestError}
|
|
522
|
+
* @throws {@link Letta.NotFoundError}
|
|
523
|
+
* @throws {@link Letta.ConflictError}
|
|
524
|
+
*
|
|
525
|
+
* @example
|
|
526
|
+
* await client.templates.renametemplate("project", "template_name", {
|
|
527
|
+
* newName: "new_name"
|
|
528
|
+
* })
|
|
529
|
+
*/
|
|
530
|
+
renametemplate(project, templateName, request, requestOptions) {
|
|
531
|
+
return core.HttpResponsePromise.fromPromise(this.__renametemplate(project, templateName, request, requestOptions));
|
|
532
|
+
}
|
|
533
|
+
__renametemplate(project, templateName, request, requestOptions) {
|
|
534
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
535
|
+
var _a, _b, _c;
|
|
536
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
537
|
+
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/templates/${encodeURIComponent(project)}/${encodeURIComponent(templateName)}/name`),
|
|
538
|
+
method: "PATCH",
|
|
539
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
540
|
+
? yield core.Supplier.get(this._options.project)
|
|
541
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.181", "User-Agent": "@letta-ai/letta-client/0.1.181", "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),
|
|
542
|
+
contentType: "application/json",
|
|
543
|
+
requestType: "json",
|
|
544
|
+
body: serializers.TemplatesRenameTemplateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
545
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
546
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
547
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
548
|
+
});
|
|
549
|
+
if (_response.ok) {
|
|
550
|
+
return {
|
|
551
|
+
data: serializers.TemplatesRenameTemplateResponse.parseOrThrow(_response.body, {
|
|
552
|
+
unrecognizedObjectKeys: "passthrough",
|
|
553
|
+
allowUnrecognizedUnionMembers: true,
|
|
554
|
+
allowUnrecognizedEnumValues: true,
|
|
555
|
+
skipValidation: true,
|
|
556
|
+
breadcrumbsPrefix: ["response"],
|
|
557
|
+
}),
|
|
558
|
+
rawResponse: _response.rawResponse,
|
|
559
|
+
};
|
|
560
|
+
}
|
|
561
|
+
if (_response.error.reason === "status-code") {
|
|
562
|
+
switch (_response.error.statusCode) {
|
|
563
|
+
case 400:
|
|
564
|
+
throw new Letta.BadRequestError(_response.error.body, _response.rawResponse);
|
|
565
|
+
case 404:
|
|
566
|
+
throw new Letta.NotFoundError(_response.error.body, _response.rawResponse);
|
|
567
|
+
case 409:
|
|
568
|
+
throw new Letta.ConflictError(serializers.ConflictErrorBody.parseOrThrow(_response.error.body, {
|
|
569
|
+
unrecognizedObjectKeys: "passthrough",
|
|
570
|
+
allowUnrecognizedUnionMembers: true,
|
|
571
|
+
allowUnrecognizedEnumValues: true,
|
|
572
|
+
skipValidation: true,
|
|
573
|
+
breadcrumbsPrefix: ["response"],
|
|
574
|
+
}), _response.rawResponse);
|
|
575
|
+
default:
|
|
576
|
+
throw new errors.LettaError({
|
|
577
|
+
statusCode: _response.error.statusCode,
|
|
578
|
+
body: _response.error.body,
|
|
579
|
+
rawResponse: _response.rawResponse,
|
|
580
|
+
});
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
switch (_response.error.reason) {
|
|
584
|
+
case "non-json":
|
|
585
|
+
throw new errors.LettaError({
|
|
586
|
+
statusCode: _response.error.statusCode,
|
|
587
|
+
body: _response.error.rawBody,
|
|
588
|
+
rawResponse: _response.rawResponse,
|
|
589
|
+
});
|
|
590
|
+
case "timeout":
|
|
591
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/templates/{project}/{template_name}/name.");
|
|
592
|
+
case "unknown":
|
|
593
|
+
throw new errors.LettaError({
|
|
594
|
+
message: _response.error.errorMessage,
|
|
595
|
+
rawResponse: _response.rawResponse,
|
|
596
|
+
});
|
|
597
|
+
}
|
|
598
|
+
});
|
|
599
|
+
}
|
|
600
|
+
/**
|
|
601
|
+
* List all versions of a specific template
|
|
602
|
+
*
|
|
603
|
+
* @param {string} projectSlug - The project slug
|
|
604
|
+
* @param {string} name - The template name (without version)
|
|
605
|
+
* @param {Letta.TemplatesListTemplateVersionsRequest} request
|
|
606
|
+
* @param {Templates.RequestOptions} requestOptions - Request-specific configuration.
|
|
607
|
+
*
|
|
608
|
+
* @throws {@link Letta.NotFoundError}
|
|
609
|
+
*
|
|
610
|
+
* @example
|
|
611
|
+
* await client.templates.listtemplateversions("project_slug", "name")
|
|
612
|
+
*/
|
|
613
|
+
listtemplateversions(projectSlug, name, request = {}, requestOptions) {
|
|
614
|
+
return core.HttpResponsePromise.fromPromise(this.__listtemplateversions(projectSlug, name, request, requestOptions));
|
|
615
|
+
}
|
|
616
|
+
__listtemplateversions(projectSlug_1, name_1) {
|
|
617
|
+
return __awaiter(this, arguments, void 0, function* (projectSlug, name, request = {}, requestOptions) {
|
|
618
|
+
var _a, _b, _c;
|
|
619
|
+
const { offset, limit } = request;
|
|
620
|
+
const _queryParams = {};
|
|
621
|
+
if (offset != null) {
|
|
622
|
+
_queryParams["offset"] = offset;
|
|
623
|
+
}
|
|
624
|
+
if (limit != null) {
|
|
625
|
+
_queryParams["limit"] = limit;
|
|
626
|
+
}
|
|
627
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
628
|
+
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/templates/${encodeURIComponent(projectSlug)}/${encodeURIComponent(name)}/versions`),
|
|
629
|
+
method: "GET",
|
|
630
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
631
|
+
? yield core.Supplier.get(this._options.project)
|
|
632
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.181", "User-Agent": "@letta-ai/letta-client/0.1.181", "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),
|
|
633
|
+
contentType: "application/json",
|
|
634
|
+
queryParameters: _queryParams,
|
|
635
|
+
requestType: "json",
|
|
636
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
637
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
638
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
639
|
+
});
|
|
640
|
+
if (_response.ok) {
|
|
641
|
+
return {
|
|
642
|
+
data: serializers.TemplatesListTemplateVersionsResponse.parseOrThrow(_response.body, {
|
|
643
|
+
unrecognizedObjectKeys: "passthrough",
|
|
644
|
+
allowUnrecognizedUnionMembers: true,
|
|
645
|
+
allowUnrecognizedEnumValues: true,
|
|
646
|
+
skipValidation: true,
|
|
647
|
+
breadcrumbsPrefix: ["response"],
|
|
648
|
+
}),
|
|
649
|
+
rawResponse: _response.rawResponse,
|
|
650
|
+
};
|
|
651
|
+
}
|
|
652
|
+
if (_response.error.reason === "status-code") {
|
|
653
|
+
switch (_response.error.statusCode) {
|
|
654
|
+
case 404:
|
|
655
|
+
throw new Letta.NotFoundError(_response.error.body, _response.rawResponse);
|
|
656
|
+
default:
|
|
657
|
+
throw new errors.LettaError({
|
|
658
|
+
statusCode: _response.error.statusCode,
|
|
659
|
+
body: _response.error.body,
|
|
660
|
+
rawResponse: _response.rawResponse,
|
|
661
|
+
});
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
switch (_response.error.reason) {
|
|
665
|
+
case "non-json":
|
|
666
|
+
throw new errors.LettaError({
|
|
667
|
+
statusCode: _response.error.statusCode,
|
|
668
|
+
body: _response.error.rawBody,
|
|
669
|
+
rawResponse: _response.rawResponse,
|
|
670
|
+
});
|
|
671
|
+
case "timeout":
|
|
672
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/templates/{project_slug}/{name}/versions.");
|
|
673
|
+
case "unknown":
|
|
674
|
+
throw new errors.LettaError({
|
|
675
|
+
message: _response.error.errorMessage,
|
|
676
|
+
rawResponse: _response.rawResponse,
|
|
677
|
+
});
|
|
678
|
+
}
|
|
679
|
+
});
|
|
680
|
+
}
|
|
144
681
|
_getCustomAuthorizationHeaders() {
|
|
145
682
|
return __awaiter(this, void 0, void 0, function* () {
|
|
146
683
|
const tokenValue = yield core.Supplier.get(this._options.token);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* agentId: "agent_id"
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export interface TemplatesCreateTemplateRequest {
|
|
11
|
+
/** The ID of the agent to use as a template, can be from any project */
|
|
12
|
+
agentId: string;
|
|
13
|
+
/** Optional custom name for the template. If not provided, a random name will be generated. */
|
|
14
|
+
name?: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {}
|
|
7
|
+
*/
|
|
8
|
+
export interface TemplatesForkTemplateRequest {
|
|
9
|
+
/** Optional custom name for the forked template. If not provided, a random name will be generated. */
|
|
10
|
+
name?: string;
|
|
11
|
+
}
|