@inkeep/agents-manage-mcp 0.39.4 → 0.40.0
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/.vscode/settings.json +5 -0
- package/README.md +38 -139
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +27 -16
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7775 -6996
- package/dist/index.js.map +1 -1
- package/manifest.json +61 -6
- package/package.json +12 -12
- package/scripts/fetch-openapi.mjs +22 -40
- package/scripts/generate.mjs +33 -66
- package/src/core.ts +3 -1
- package/src/funcs/agentArtifactComponentRelationsAssociateArtifactComponentWithAgent.ts +94 -78
- package/src/funcs/agentArtifactComponentRelationsCheckArtifactComponentAgentAssociation.ts +98 -81
- package/src/funcs/agentArtifactComponentRelationsGetAgentsUsingArtifactComponent.ts +94 -78
- package/src/funcs/agentArtifactComponentRelationsGetArtifactComponentsForAgent.ts +91 -76
- package/src/funcs/agentArtifactComponentRelationsRemoveArtifactComponentFromAgent.ts +96 -80
- package/src/funcs/agentDataComponentRelationsAssociateDataComponentWithAgent.ts +92 -77
- package/src/funcs/agentDataComponentRelationsCheckDataComponentAgentAssociation.ts +95 -79
- package/src/funcs/agentDataComponentRelationsGetAgentsUsingDataComponent.ts +91 -76
- package/src/funcs/agentDataComponentRelationsGetDataComponentsForAgent.ts +91 -76
- package/src/funcs/agentDataComponentRelationsRemoveDataComponentFromAgent.ts +93 -78
- package/src/funcs/agentGetFullAgentDefinition.ts +89 -74
- package/src/funcs/agentGetRelatedAgentInfos.ts +91 -76
- package/src/funcs/agentsCreateAgent.ts +88 -73
- package/src/funcs/agentsDeleteAgent.ts +74 -58
- package/src/funcs/agentsGetAgent.ts +90 -73
- package/src/funcs/agentsListAgents.ts +89 -74
- package/src/funcs/agentsUpdateAgent.ts +92 -75
- package/src/funcs/apiKeysCreateAPIKey.ts +88 -73
- package/src/funcs/apiKeysDeleteAPIKey.ts +74 -58
- package/src/funcs/apiKeysGetAPIKeyById.ts +90 -73
- package/src/funcs/apiKeysListAPIKeys.ts +90 -75
- package/src/funcs/apiKeysUpdateAPIKey.ts +92 -75
- package/src/funcs/artifactComponentCreateArtifactComponent.ts +89 -74
- package/src/funcs/artifactComponentDeleteArtifactComponent.ts +74 -60
- package/src/funcs/artifactComponentGetArtifactComponentById.ts +89 -74
- package/src/funcs/artifactComponentListArtifactComponents.ts +90 -75
- package/src/funcs/artifactComponentUpdateArtifactComponent.ts +91 -76
- package/src/funcs/cliGetApiCliMe.ts +144 -0
- package/src/funcs/contextConfigCreateContextConfig.ts +91 -76
- package/src/funcs/contextConfigDeleteContextConfig.ts +87 -73
- package/src/funcs/contextConfigGetContextConfigById.ts +91 -76
- package/src/funcs/contextConfigListContextConfigs.ts +92 -77
- package/src/funcs/contextConfigUpdateContextConfig.ts +93 -78
- package/src/funcs/conversationsGetConversation.ts +92 -77
- package/src/funcs/credentialCreateCredential.ts +90 -73
- package/src/funcs/credentialDeleteCredential.ts +73 -59
- package/src/funcs/credentialGetCredentialById.ts +89 -74
- package/src/funcs/credentialListCredentials.ts +91 -74
- package/src/funcs/credentialStoreCreateCredentialInStore.ts +91 -76
- package/src/funcs/credentialStoreListCredentialStores.ts +87 -72
- package/src/funcs/credentialUpdateCredential.ts +91 -76
- package/src/funcs/dataComponentCreateDataComponent.ts +90 -73
- package/src/funcs/dataComponentDeleteDataComponent.ts +74 -60
- package/src/funcs/dataComponentGetDataComponentById.ts +89 -74
- package/src/funcs/dataComponentListDataComponents.ts +91 -74
- package/src/funcs/dataComponentUpdateDataComponent.ts +91 -76
- package/src/funcs/externalAgentsCreateExternalAgent.ts +90 -73
- package/src/funcs/externalAgentsDeleteExternalAgent.ts +74 -60
- package/src/funcs/externalAgentsGetExternalAgentById.ts +89 -74
- package/src/funcs/externalAgentsListExternalAgents.ts +91 -74
- package/src/funcs/externalAgentsUpdateExternalAgent.ts +91 -76
- package/src/funcs/fullAgentCreateFullAgent.ts +89 -74
- package/src/funcs/fullAgentDeleteFullAgent.ts +86 -70
- package/src/funcs/fullAgentGetFullAgent.ts +90 -73
- package/src/funcs/fullAgentUpdateFullAgent.ts +92 -75
- package/src/funcs/fullProjectCreateFullProject.ts +87 -72
- package/src/funcs/fullProjectDeleteFullProject.ts +82 -68
- package/src/funcs/fullProjectGetFullProject.ts +86 -71
- package/src/funcs/fullProjectUpdateFullProject.ts +88 -73
- package/src/funcs/functionToolsCreateFunctionTool.ts +91 -76
- package/src/funcs/functionToolsDeleteFunctionTool.ts +87 -73
- package/src/funcs/functionToolsGetFunctionTool.ts +91 -76
- package/src/funcs/functionToolsListFunctionTools.ts +92 -77
- package/src/funcs/functionToolsUpdateFunctionTool.ts +93 -78
- package/src/funcs/functionsCreateFunction.ts +90 -73
- package/src/funcs/functionsDeleteFunction.ts +86 -70
- package/src/funcs/functionsGetFunction.ts +90 -73
- package/src/funcs/functionsListFunctions.ts +91 -74
- package/src/funcs/functionsUpdateFunction.ts +92 -75
- package/src/funcs/health.ts +61 -45
- package/src/funcs/invitationsGetApiInvitationsPending.ts +60 -52
- package/src/funcs/mcpCatalogListMCPCatalog.ts +88 -71
- package/src/funcs/oAuthInitiateOauthLoginPublic.ts +74 -62
- package/src/funcs/oAuthOauthCallback.ts +73 -61
- package/src/funcs/playgroundCreatePlaygroundToken.ts +75 -62
- package/src/funcs/projectsCreateProject.ts +87 -72
- package/src/funcs/projectsDeleteProject.ts +86 -71
- package/src/funcs/projectsGetProjectById.ts +86 -71
- package/src/funcs/projectsListProjects.ts +87 -72
- package/src/funcs/projectsUpdateProject.ts +88 -73
- package/src/funcs/subAgentCreateSubagent.ts +91 -76
- package/src/funcs/subAgentDeleteSubagent.ts +77 -61
- package/src/funcs/subAgentExternalAgentRelationsCreateSubAgentExternalAgentRelation.ts +95 -79
- package/src/funcs/subAgentExternalAgentRelationsDeleteSubAgentExternalAgentRelation.ts +80 -65
- package/src/funcs/subAgentExternalAgentRelationsGetSubAgentExternalAgentRelationById.ts +95 -79
- package/src/funcs/subAgentExternalAgentRelationsListSubAgentExternalAgentRelations.ts +96 -80
- package/src/funcs/subAgentExternalAgentRelationsUpdateSubAgentExternalAgentRelation.ts +97 -81
- package/src/funcs/subAgentGetSubagentById.ts +91 -76
- package/src/funcs/subAgentListSubagents.ts +92 -77
- package/src/funcs/subAgentRelationsCreateSubAgentRelation.ts +91 -76
- package/src/funcs/subAgentRelationsDeleteSubAgentRelation.ts +76 -62
- package/src/funcs/subAgentRelationsGetSubAgentRelationById.ts +91 -76
- package/src/funcs/subAgentRelationsListSubAgentRelations.ts +96 -81
- package/src/funcs/subAgentRelationsUpdateSubAgentRelation.ts +93 -78
- package/src/funcs/subAgentTeamAgentRelationsCreateSubAgentTeamAgentRelation.ts +93 -78
- package/src/funcs/subAgentTeamAgentRelationsDeleteSubAgentTeamAgentRelation.ts +78 -64
- package/src/funcs/subAgentTeamAgentRelationsGetSubAgentTeamAgentRelationById.ts +93 -78
- package/src/funcs/subAgentTeamAgentRelationsListSubAgentTeamAgentRelations.ts +94 -79
- package/src/funcs/subAgentTeamAgentRelationsUpdateSubAgentTeamAgentRelation.ts +95 -80
- package/src/funcs/subAgentToolRelationsCreateSubagentToolRelation.ts +91 -76
- package/src/funcs/subAgentToolRelationsDeleteSubagentToolRelation.ts +76 -62
- package/src/funcs/subAgentToolRelationsGetSubagentToolRelation.ts +91 -76
- package/src/funcs/subAgentToolRelationsGetSubagentsForTool.ts +94 -79
- package/src/funcs/subAgentToolRelationsListSubagentToolRelations.ts +94 -79
- package/src/funcs/subAgentToolRelationsUpdateSubagentToolRelation.ts +93 -78
- package/src/funcs/subAgentUpdateSubagent.ts +93 -78
- package/src/funcs/thirdPartyMCPServersGetOauthRedirectUrl.ts +209 -0
- package/src/funcs/thirdPartyMCPServersGetThirdPartyMCPServer.ts +89 -74
- package/src/funcs/toolsCreateTool.ts +88 -73
- package/src/funcs/toolsDeleteTool.ts +97 -58
- package/src/funcs/toolsGetTool.ts +90 -73
- package/src/funcs/toolsGetUserCredentialForTool.ts +211 -0
- package/src/funcs/toolsListTools.ts +90 -75
- package/src/funcs/toolsUpdateTool.ts +92 -75
- package/src/funcs/userOrganizationsGetApiUsersUserIdOrganizations.ts +62 -52
- package/src/funcs/userOrganizationsPostApiUsersUserIdOrganizations.ts +64 -54
- package/src/hooks/hooks.ts +25 -14
- package/src/hooks/registration.ts +5 -4
- package/src/hooks/types.ts +18 -8
- package/src/index.ts +2 -1
- package/src/lib/base64.ts +8 -3
- package/src/lib/config.ts +19 -11
- package/src/lib/dlv.ts +3 -2
- package/src/lib/encodings.ts +118 -87
- package/src/lib/env.ts +17 -7
- package/src/lib/files.ts +29 -28
- package/src/lib/http.ts +66 -46
- package/src/lib/is-plain-object.ts +2 -1
- package/src/lib/logger.ts +1 -0
- package/src/lib/matchers.ts +111 -94
- package/src/lib/primitives.ts +14 -8
- package/src/lib/result.ts +4 -1
- package/src/lib/retries.ts +26 -18
- package/src/lib/schemas.ts +20 -26
- package/src/lib/sdks.ts +115 -85
- package/src/lib/security.ts +90 -46
- package/src/lib/url.ts +10 -5
- package/src/mcp-server/cli/start/command.ts +54 -41
- package/src/mcp-server/cli/start/impl.ts +52 -38
- package/src/mcp-server/cli.ts +2 -1
- package/src/mcp-server/console-logger.ts +27 -12
- package/src/mcp-server/extensions.ts +11 -6
- package/src/mcp-server/mcp-server.ts +8 -7
- package/src/mcp-server/prompts.ts +64 -51
- package/src/mcp-server/resources.ts +54 -35
- package/src/mcp-server/scopes.ts +1 -0
- package/src/mcp-server/server.ts +25 -6
- package/src/mcp-server/shared.ts +35 -24
- package/src/mcp-server/tools/agentArtifactComponentRelationsAssociateArtifactComponentWithAgent.ts +34 -33
- package/src/mcp-server/tools/agentArtifactComponentRelationsCheckArtifactComponentAgentAssociation.ts +34 -33
- package/src/mcp-server/tools/agentArtifactComponentRelationsGetAgentsUsingArtifactComponent.ts +34 -32
- package/src/mcp-server/tools/agentArtifactComponentRelationsGetArtifactComponentsForAgent.ts +34 -32
- package/src/mcp-server/tools/agentArtifactComponentRelationsRemoveArtifactComponentFromAgent.ts +34 -32
- package/src/mcp-server/tools/agentDataComponentRelationsAssociateDataComponentWithAgent.ts +33 -32
- package/src/mcp-server/tools/agentDataComponentRelationsCheckDataComponentAgentAssociation.ts +34 -32
- package/src/mcp-server/tools/agentDataComponentRelationsGetAgentsUsingDataComponent.ts +33 -32
- package/src/mcp-server/tools/agentDataComponentRelationsGetDataComponentsForAgent.ts +33 -32
- package/src/mcp-server/tools/agentDataComponentRelationsRemoveDataComponentFromAgent.ts +33 -32
- package/src/mcp-server/tools/agentGetFullAgentDefinition.ts +16 -13
- package/src/mcp-server/tools/agentGetRelatedAgentInfos.ts +16 -13
- package/src/mcp-server/tools/agentsCreateAgent.ts +16 -13
- package/src/mcp-server/tools/agentsDeleteAgent.ts +16 -13
- package/src/mcp-server/tools/agentsGetAgent.ts +16 -13
- package/src/mcp-server/tools/agentsListAgents.ts +16 -13
- package/src/mcp-server/tools/agentsUpdateAgent.ts +16 -13
- package/src/mcp-server/tools/apiKeysCreateAPIKey.ts +16 -13
- package/src/mcp-server/tools/apiKeysDeleteAPIKey.ts +16 -13
- package/src/mcp-server/tools/apiKeysGetAPIKeyById.ts +16 -13
- package/src/mcp-server/tools/apiKeysListAPIKeys.ts +16 -13
- package/src/mcp-server/tools/apiKeysUpdateAPIKey.ts +16 -13
- package/src/mcp-server/tools/artifactComponentCreateArtifactComponent.ts +19 -14
- package/src/mcp-server/tools/artifactComponentDeleteArtifactComponent.ts +19 -14
- package/src/mcp-server/tools/artifactComponentGetArtifactComponentById.ts +15 -12
- package/src/mcp-server/tools/artifactComponentListArtifactComponents.ts +19 -14
- package/src/mcp-server/tools/artifactComponentUpdateArtifactComponent.ts +19 -14
- package/src/mcp-server/tools/cliGetApiCliMe.ts +38 -0
- package/src/mcp-server/tools/contextConfigCreateContextConfig.ts +19 -14
- package/src/mcp-server/tools/contextConfigDeleteContextConfig.ts +19 -14
- package/src/mcp-server/tools/contextConfigGetContextConfigById.ts +19 -14
- package/src/mcp-server/tools/contextConfigListContextConfigs.ts +32 -28
- package/src/mcp-server/tools/contextConfigUpdateContextConfig.ts +19 -14
- package/src/mcp-server/tools/conversationsGetConversation.ts +16 -13
- package/src/mcp-server/tools/credentialCreateCredential.ts +16 -13
- package/src/mcp-server/tools/credentialDeleteCredential.ts +16 -13
- package/src/mcp-server/tools/credentialGetCredentialById.ts +16 -13
- package/src/mcp-server/tools/credentialListCredentials.ts +16 -13
- package/src/mcp-server/tools/credentialStoreCreateCredentialInStore.ts +19 -14
- package/src/mcp-server/tools/credentialStoreListCredentialStores.ts +19 -14
- package/src/mcp-server/tools/credentialUpdateCredential.ts +16 -13
- package/src/mcp-server/tools/dataComponentCreateDataComponent.ts +19 -14
- package/src/mcp-server/tools/dataComponentDeleteDataComponent.ts +19 -14
- package/src/mcp-server/tools/dataComponentGetDataComponentById.ts +19 -14
- package/src/mcp-server/tools/dataComponentListDataComponents.ts +32 -28
- package/src/mcp-server/tools/dataComponentUpdateDataComponent.ts +19 -14
- package/src/mcp-server/tools/externalAgentsCreateExternalAgent.ts +19 -14
- package/src/mcp-server/tools/externalAgentsDeleteExternalAgent.ts +19 -14
- package/src/mcp-server/tools/externalAgentsGetExternalAgentById.ts +19 -14
- package/src/mcp-server/tools/externalAgentsListExternalAgents.ts +19 -14
- package/src/mcp-server/tools/externalAgentsUpdateExternalAgent.ts +19 -14
- package/src/mcp-server/tools/fullAgentCreateFullAgent.ts +16 -13
- package/src/mcp-server/tools/fullAgentDeleteFullAgent.ts +16 -13
- package/src/mcp-server/tools/fullAgentGetFullAgent.ts +16 -13
- package/src/mcp-server/tools/fullAgentUpdateFullAgent.ts +16 -13
- package/src/mcp-server/tools/fullProjectCreateFullProject.ts +16 -13
- package/src/mcp-server/tools/fullProjectDeleteFullProject.ts +16 -13
- package/src/mcp-server/tools/fullProjectGetFullProject.ts +16 -13
- package/src/mcp-server/tools/fullProjectUpdateFullProject.ts +16 -13
- package/src/mcp-server/tools/functionToolsCreateFunctionTool.ts +32 -28
- package/src/mcp-server/tools/functionToolsDeleteFunctionTool.ts +32 -28
- package/src/mcp-server/tools/functionToolsGetFunctionTool.ts +16 -13
- package/src/mcp-server/tools/functionToolsListFunctionTools.ts +32 -28
- package/src/mcp-server/tools/functionToolsUpdateFunctionTool.ts +32 -28
- package/src/mcp-server/tools/functionsCreateFunction.ts +16 -13
- package/src/mcp-server/tools/functionsDeleteFunction.ts +16 -13
- package/src/mcp-server/tools/functionsGetFunction.ts +16 -13
- package/src/mcp-server/tools/functionsListFunctions.ts +16 -13
- package/src/mcp-server/tools/functionsUpdateFunction.ts +16 -13
- package/src/mcp-server/tools/health.ts +14 -12
- package/src/mcp-server/tools/invitationsGetApiInvitationsPending.ts +19 -14
- package/src/mcp-server/tools/mcpCatalogListMCPCatalog.ts +16 -13
- package/src/mcp-server/tools/oAuthInitiateOauthLoginPublic.ts +16 -13
- package/src/mcp-server/tools/oAuthOauthCallback.ts +16 -13
- package/src/mcp-server/tools/projectsCreateProject.ts +16 -13
- package/src/mcp-server/tools/projectsDeleteProject.ts +16 -13
- package/src/mcp-server/tools/projectsGetProjectById.ts +16 -13
- package/src/mcp-server/tools/projectsListProjects.ts +16 -13
- package/src/mcp-server/tools/projectsUpdateProject.ts +16 -13
- package/src/mcp-server/tools/subAgentCreateSubagent.ts +16 -13
- package/src/mcp-server/tools/subAgentDeleteSubagent.ts +16 -13
- package/src/mcp-server/tools/subAgentExternalAgentRelationsCreateSubAgentExternalAgentRelation.ts +34 -33
- package/src/mcp-server/tools/subAgentExternalAgentRelationsDeleteSubAgentExternalAgentRelation.ts +34 -33
- package/src/mcp-server/tools/subAgentExternalAgentRelationsGetSubAgentExternalAgentRelationById.ts +34 -33
- package/src/mcp-server/tools/subAgentExternalAgentRelationsListSubAgentExternalAgentRelations.ts +34 -31
- package/src/mcp-server/tools/subAgentExternalAgentRelationsUpdateSubAgentExternalAgentRelation.ts +34 -33
- package/src/mcp-server/tools/subAgentGetSubagentById.ts +16 -13
- package/src/mcp-server/tools/subAgentListSubagents.ts +16 -13
- package/src/mcp-server/tools/subAgentRelationsCreateSubAgentRelation.ts +19 -14
- package/src/mcp-server/tools/subAgentRelationsDeleteSubAgentRelation.ts +19 -14
- package/src/mcp-server/tools/subAgentRelationsGetSubAgentRelationById.ts +19 -14
- package/src/mcp-server/tools/subAgentRelationsListSubAgentRelations.ts +19 -14
- package/src/mcp-server/tools/subAgentRelationsUpdateSubAgentRelation.ts +19 -14
- package/src/mcp-server/tools/subAgentTeamAgentRelationsCreateSubAgentTeamAgentRelation.ts +33 -32
- package/src/mcp-server/tools/subAgentTeamAgentRelationsDeleteSubAgentTeamAgentRelation.ts +33 -32
- package/src/mcp-server/tools/subAgentTeamAgentRelationsGetSubAgentTeamAgentRelationById.ts +34 -32
- package/src/mcp-server/tools/subAgentTeamAgentRelationsListSubAgentTeamAgentRelations.ts +33 -32
- package/src/mcp-server/tools/subAgentTeamAgentRelationsUpdateSubAgentTeamAgentRelation.ts +33 -32
- package/src/mcp-server/tools/subAgentToolRelationsCreateSubagentToolRelation.ts +33 -30
- package/src/mcp-server/tools/subAgentToolRelationsDeleteSubagentToolRelation.ts +33 -30
- package/src/mcp-server/tools/subAgentToolRelationsGetSubagentToolRelation.ts +20 -16
- package/src/mcp-server/tools/subAgentToolRelationsGetSubagentsForTool.ts +19 -14
- package/src/mcp-server/tools/subAgentToolRelationsListSubagentToolRelations.ts +33 -30
- package/src/mcp-server/tools/subAgentToolRelationsUpdateSubagentToolRelation.ts +33 -30
- package/src/mcp-server/tools/subAgentUpdateSubagent.ts +16 -13
- package/src/mcp-server/tools/thirdPartyMCPServersGetOauthRedirectUrl.ts +47 -0
- package/src/mcp-server/tools/thirdPartyMCPServersGetThirdPartyMCPServer.ts +15 -12
- package/src/mcp-server/tools/toolsCreateTool.ts +16 -13
- package/src/mcp-server/tools/toolsDeleteTool.ts +16 -13
- package/src/mcp-server/tools/toolsGetTool.ts +16 -13
- package/src/mcp-server/tools/toolsGetUserCredentialForTool.ts +43 -0
- package/src/mcp-server/tools/toolsListTools.ts +16 -13
- package/src/mcp-server/tools/toolsUpdateTool.ts +16 -13
- package/src/mcp-server/tools/userOrganizationsGetApiUsersUserIdOrganizations.ts +33 -30
- package/src/mcp-server/tools/userOrganizationsPostApiUsersUserIdOrganizations.ts +33 -30
- package/src/mcp-server/tools.ts +111 -79
- package/src/models/agent.ts +3 -2
- package/src/models/agentcreate.ts +3 -2
- package/src/models/agentlistresponse.ts +6 -5
- package/src/models/agentresponse.ts +4 -3
- package/src/models/agentstopwhen.ts +3 -2
- package/src/models/agentupdate.ts +3 -2
- package/src/models/agentwithincontextofproject.ts +30 -21
- package/src/models/agentwithincontextofprojectresponse.ts +5 -6
- package/src/models/apikey.ts +3 -2
- package/src/models/apikeycreate.ts +3 -2
- package/src/models/apikeylistresponse.ts +6 -5
- package/src/models/apikeyresponse.ts +4 -3
- package/src/models/apikeyupdate.ts +3 -2
- package/src/models/artifactcomponent.ts +6 -5
- package/src/models/artifactcomponentarrayresponse.ts +7 -5
- package/src/models/artifactcomponentcreate.ts +5 -6
- package/src/models/artifactcomponentlistresponse.ts +8 -6
- package/src/models/artifactcomponentresponse.ts +7 -5
- package/src/models/artifactcomponentupdate.ts +5 -6
- package/src/models/associateartifactcomponentwithagentop.ts +36 -32
- package/src/models/associatedatacomponentwithagentop.ts +28 -25
- package/src/models/badrequest.ts +28 -16
- package/src/models/candelegatetoexternalagent.ts +4 -5
- package/src/models/candelegatetoteamagent.ts +4 -5
- package/src/models/canuseitem.ts +9 -10
- package/src/models/checkartifactcomponentagentassociationop.ts +33 -31
- package/src/models/checkdatacomponentagentassociationop.ts +22 -19
- package/src/models/componentassociation.ts +7 -9
- package/src/models/componentassociationlistresponse.ts +5 -6
- package/src/models/contextconfig.ts +5 -6
- package/src/models/contextconfigcreate.ts +15 -13
- package/src/models/contextconfiglistresponse.ts +5 -6
- package/src/models/contextconfigresponse.ts +7 -9
- package/src/models/contextconfigupdate.ts +15 -13
- package/src/models/conversationwithformattedmessagesresponse.ts +5 -8
- package/src/models/createagentop.ts +23 -16
- package/src/models/createapikeyop.ts +41 -40
- package/src/models/createartifactcomponentop.ts +23 -20
- package/src/models/createcontextconfigop.ts +26 -20
- package/src/models/createcredentialinstoreop.ts +26 -22
- package/src/models/createcredentialinstorerequest.ts +4 -5
- package/src/models/createcredentialinstoreresponse.ts +4 -7
- package/src/models/createcredentialop.ts +23 -20
- package/src/models/createdatacomponentop.ts +25 -19
- package/src/models/createexternalagentop.ts +25 -19
- package/src/models/createfullagentop.ts +29 -23
- package/src/models/createfullprojectop.ts +25 -21
- package/src/models/createfunctionop.ts +27 -22
- package/src/models/createfunctiontoolop.ts +26 -20
- package/src/models/createplaygroundtokenop.ts +17 -30
- package/src/models/createprojectop.ts +39 -35
- package/src/models/createsubagentexternalagentrelationop.ts +30 -24
- package/src/models/createsubagentop.ts +28 -23
- package/src/models/createsubagentrelationop.ts +24 -21
- package/src/models/createsubagentteamagentrelationop.ts +30 -24
- package/src/models/createsubagenttoolrelationop.ts +26 -22
- package/src/models/createtoolop.ts +26 -16
- package/src/models/credentialreference.ts +35 -14
- package/src/models/credentialreferencecreate.ts +25 -7
- package/src/models/credentialreferencelistresponse.ts +8 -6
- package/src/models/credentialreferenceresponse.ts +7 -5
- package/src/models/credentialreferenceupdate.ts +25 -7
- package/src/models/credentialstore.ts +20 -10
- package/src/models/credentialstorelistresponse.ts +7 -5
- package/src/models/datacomponent.ts +5 -4
- package/src/models/datacomponentarrayresponse.ts +4 -5
- package/src/models/datacomponentcreate.ts +6 -5
- package/src/models/datacomponentlistresponse.ts +5 -6
- package/src/models/datacomponentresponse.ts +7 -9
- package/src/models/datacomponentupdate.ts +6 -5
- package/src/models/deleteagentop.ts +11 -10
- package/src/models/deleteapikeyop.ts +15 -17
- package/src/models/deleteartifactcomponentop.ts +9 -12
- package/src/models/deletecontextconfigop.ts +21 -18
- package/src/models/deletecredentialop.ts +9 -12
- package/src/models/deletedatacomponentop.ts +9 -12
- package/src/models/deleteexternalagentop.ts +9 -12
- package/src/models/deletefullagentop.ts +20 -17
- package/src/models/deletefullprojectop.ts +19 -16
- package/src/models/deletefunctionop.ts +22 -20
- package/src/models/deletefunctiontoolop.ts +21 -18
- package/src/models/deleteprojectop.ts +33 -32
- package/src/models/deletesubagentexternalagentrelationop.ts +11 -14
- package/src/models/deletesubagentop.ts +12 -16
- package/src/models/deletesubagentrelationop.ts +10 -13
- package/src/models/deletesubagentteamagentrelationop.ts +11 -14
- package/src/models/deletesubagenttoolrelationop.ts +10 -13
- package/src/models/deletetoolop.ts +34 -12
- package/src/models/errorresponse.ts +3 -2
- package/src/models/errors/apierror.ts +5 -4
- package/src/models/errors/httpclienterrors.ts +8 -7
- package/src/models/errors/sdkvalidationerror.ts +7 -58
- package/src/models/existsresponse.ts +3 -2
- package/src/models/externalagent.ts +5 -4
- package/src/models/externalagentcreate.ts +6 -5
- package/src/models/externalagentlistresponse.ts +5 -6
- package/src/models/externalagentresponse.ts +7 -9
- package/src/models/externalagentupdate.ts +6 -5
- package/src/models/forbidden.ts +28 -16
- package/src/models/fullagentagentinsert.ts +50 -39
- package/src/models/fullprojectdefinition.ts +52 -38
- package/src/models/fullprojectdefinitionresponse.ts +5 -6
- package/src/models/function.ts +3 -2
- package/src/models/functioncreate.ts +3 -2
- package/src/models/functionlistresponse.ts +9 -11
- package/src/models/functionresponse.ts +7 -5
- package/src/models/functiontool.ts +3 -2
- package/src/models/functiontoolcreate.ts +4 -3
- package/src/models/functiontoollistresponse.ts +5 -6
- package/src/models/functiontoolresponse.ts +7 -9
- package/src/models/functiontoolupdate.ts +4 -3
- package/src/models/functionupdate.ts +3 -2
- package/src/models/getagentop.ts +25 -18
- package/src/models/getagentsusingartifactcomponentop.ts +27 -21
- package/src/models/getagentsusingdatacomponentop.ts +27 -21
- package/src/models/getapiclimeop.ts +58 -0
- package/src/models/getapiinvitationspendingop.ts +10 -16
- package/src/models/getapikeybyidop.ts +34 -33
- package/src/models/getapiusersuseridorganizationsop.ts +13 -17
- package/src/models/getartifactcomponentbyidop.ts +22 -19
- package/src/models/getartifactcomponentsforagentop.ts +25 -21
- package/src/models/getcontextconfigbyidop.ts +23 -20
- package/src/models/getconversationop.ts +25 -20
- package/src/models/getcredentialbyidop.ts +22 -19
- package/src/models/getdatacomponentbyidop.ts +22 -19
- package/src/models/getdatacomponentsforagentop.ts +23 -20
- package/src/models/getexternalagentbyidop.ts +22 -19
- package/src/models/getfullagentdefinitionop.ts +27 -21
- package/src/models/getfullagentop.ts +38 -31
- package/src/models/getfullprojectop.ts +25 -22
- package/src/models/getfunctionop.ts +26 -16
- package/src/models/getfunctiontoolop.ts +23 -20
- package/src/models/getoauthredirecturlop.ts +111 -0
- package/src/models/getprojectbyidop.ts +25 -20
- package/src/models/getrelatedagentinfosop.ts +25 -21
- package/src/models/getsubagentbyidop.ts +25 -19
- package/src/models/getsubagentexternalagentrelationbyidop.ts +29 -23
- package/src/models/getsubagentrelationbyidop.ts +23 -20
- package/src/models/getsubagentsfortoolop.ts +27 -21
- package/src/models/getsubagentteamagentrelationbyidop.ts +29 -23
- package/src/models/getsubagenttoolrelationop.ts +25 -21
- package/src/models/getthirdpartymcpserverop.ts +43 -22
- package/src/models/gettoolop.ts +34 -25
- package/src/models/getusercredentialfortoolop.ts +64 -0
- package/src/models/healthop.ts +4 -3
- package/src/models/initiateoauthloginpublicop.ts +11 -13
- package/src/models/internalservererror.ts +34 -20
- package/src/models/listagentsop.ts +25 -15
- package/src/models/listapikeysop.ts +26 -16
- package/src/models/listartifactcomponentsop.ts +23 -19
- package/src/models/listcontextconfigsop.ts +22 -19
- package/src/models/listcredentialsop.ts +23 -19
- package/src/models/listcredentialstoresop.ts +21 -18
- package/src/models/listdatacomponentsop.ts +21 -18
- package/src/models/listexternalagentsop.ts +21 -18
- package/src/models/listfunctionsop.ts +36 -35
- package/src/models/listfunctiontoolsop.ts +22 -19
- package/src/models/listmcpcatalogop.ts +23 -21
- package/src/models/listprojectsop.ts +34 -27
- package/src/models/listsubagentexternalagentrelationsop.ts +26 -21
- package/src/models/listsubagentrelationsop.ts +24 -20
- package/src/models/listsubagentsop.ts +37 -36
- package/src/models/listsubagentteamagentrelationsop.ts +28 -22
- package/src/models/listsubagenttoolrelationsop.ts +27 -21
- package/src/models/listtoolsop.ts +41 -18
- package/src/models/mcpcataloglistresponse.ts +19 -13
- package/src/models/mcptool.ts +54 -25
- package/src/models/mcptoollistresponse.ts +6 -5
- package/src/models/mcptoolresponse.ts +6 -6
- package/src/models/model.ts +4 -3
- package/src/models/modelsettings.ts +4 -3
- package/src/models/notfound.ts +28 -16
- package/src/models/oauthcallbackop.ts +20 -22
- package/src/models/pagination.ts +3 -2
- package/src/models/postapiusersuseridorganizationsop.ts +18 -25
- package/src/models/project.ts +7 -6
- package/src/models/projectcreate.ts +7 -6
- package/src/models/projectlistresponse.ts +6 -5
- package/src/models/projectmodel.ts +4 -3
- package/src/models/projectresponse.ts +6 -6
- package/src/models/projectupdate.ts +7 -6
- package/src/models/relatedagentinfo.ts +8 -6
- package/src/models/relatedagentinfolistresponse.ts +8 -6
- package/src/models/removeartifactcomponentfromagentop.ts +25 -19
- package/src/models/removedatacomponentfromagentop.ts +25 -19
- package/src/models/removedresponse.ts +6 -6
- package/src/models/security.ts +9 -12
- package/src/models/statuscomponent.ts +17 -11
- package/src/models/statusupdate.ts +7 -3
- package/src/models/stopwhen.ts +3 -2
- package/src/models/subagent.ts +7 -6
- package/src/models/subagentartifactcomponentresponse.ts +4 -7
- package/src/models/subagentcreate.ts +8 -7
- package/src/models/subagentdatacomponentresponse.ts +4 -7
- package/src/models/subagentexternalagentrelation.ts +3 -4
- package/src/models/subagentexternalagentrelationcreate.ts +4 -5
- package/src/models/subagentexternalagentrelationlistresponse.ts +6 -7
- package/src/models/subagentexternalagentrelationresponse.ts +5 -6
- package/src/models/subagentexternalagentrelationupdate.ts +4 -5
- package/src/models/subagentlistresponse.ts +9 -11
- package/src/models/subagentrelation.ts +6 -4
- package/src/models/subagentrelationcreate.ts +15 -8
- package/src/models/subagentrelationlistresponse.ts +8 -6
- package/src/models/subagentrelationresponse.ts +7 -5
- package/src/models/subagentrelationupdate.ts +15 -8
- package/src/models/subagentresponse.ts +7 -5
- package/src/models/subagentteamagentrelation.ts +3 -4
- package/src/models/subagentteamagentrelationcreate.ts +4 -5
- package/src/models/subagentteamagentrelationlistresponse.ts +6 -7
- package/src/models/subagentteamagentrelationresponse.ts +5 -6
- package/src/models/subagentteamagentrelationupdate.ts +4 -5
- package/src/models/subagenttoolrelation.ts +13 -15
- package/src/models/subagenttoolrelationcreate.ts +13 -13
- package/src/models/subagenttoolrelationlistresponse.ts +6 -7
- package/src/models/subagenttoolrelationresponse.ts +5 -6
- package/src/models/subagenttoolrelationupdate.ts +13 -13
- package/src/models/subagentupdate.ts +8 -7
- package/src/models/teamagent.ts +3 -2
- package/src/models/thirdpartymcpserverresponse.ts +19 -13
- package/src/models/toolcreate.ts +43 -24
- package/src/models/toolupdate.ts +43 -24
- package/src/models/unauthorized.ts +26 -13
- package/src/models/unprocessableentity.ts +34 -20
- package/src/models/updateagentop.ts +24 -17
- package/src/models/updateapikeyop.ts +34 -30
- package/src/models/updateartifactcomponentop.ts +24 -21
- package/src/models/updatecontextconfigop.ts +27 -21
- package/src/models/updatecredentialop.ts +24 -21
- package/src/models/updatedatacomponentop.ts +26 -20
- package/src/models/updateexternalagentop.ts +26 -20
- package/src/models/updatefullagentop.ts +29 -23
- package/src/models/updatefullprojectop.ts +25 -21
- package/src/models/updatefunctionop.ts +28 -23
- package/src/models/updatefunctiontoolop.ts +27 -21
- package/src/models/updateprojectop.ts +38 -34
- package/src/models/updatesubagentexternalagentrelationop.ts +31 -25
- package/src/models/updatesubagentop.ts +29 -24
- package/src/models/updatesubagentrelationop.ts +25 -22
- package/src/models/updatesubagentteamagentrelationop.ts +31 -25
- package/src/models/updatesubagenttoolrelationop.ts +27 -23
- package/src/models/updatetoolop.ts +27 -17
- package/src/types/async.ts +24 -9
- package/src/types/bigint.ts +88 -0
- package/src/types/blobs.ts +5 -4
- package/src/types/enums.ts +2 -1
- package/src/types/fp.ts +4 -1
- package/src/types/rfcdate.ts +8 -5
- package/src/types/streams.ts +8 -5
- package/src/zod-int.ts +9 -0
- package/tsconfig.json +3 -2
- package/openapi.json +0 -17114
- package/scripts/watch-and-fetch.mjs +0 -72
- package/src/hooks/auth-hook.ts +0 -32
- package/src/http-server.ts +0 -34
|
@@ -1,35 +1,37 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 86c3bfd65992
|
|
3
4
|
*/
|
|
4
5
|
|
|
5
|
-
import
|
|
6
|
-
import { encodeJSON, encodeSimple } from
|
|
7
|
-
import * as M from
|
|
8
|
-
import { compactMap } from
|
|
9
|
-
import { safeParse } from
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
6
|
+
import { InkeepAgentsManageCore } from "../core.js";
|
|
7
|
+
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
12
14
|
import {
|
|
13
|
-
|
|
15
|
+
CreateProjectRequest,
|
|
14
16
|
CreateProjectRequest$zodSchema,
|
|
15
|
-
|
|
17
|
+
CreateProjectResponse,
|
|
16
18
|
CreateProjectResponse$zodSchema,
|
|
17
|
-
} from
|
|
18
|
-
import
|
|
19
|
-
import
|
|
19
|
+
} from "../models/createprojectop.js";
|
|
20
|
+
import { APIError } from "../models/errors/apierror.js";
|
|
21
|
+
import {
|
|
20
22
|
ConnectionError,
|
|
21
23
|
InvalidRequestError,
|
|
22
24
|
RequestAbortedError,
|
|
23
25
|
RequestTimeoutError,
|
|
24
26
|
UnexpectedClientError,
|
|
25
|
-
} from
|
|
26
|
-
import
|
|
27
|
-
import {
|
|
28
|
-
import
|
|
27
|
+
} from "../models/errors/httpclienterrors.js";
|
|
28
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
29
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
30
|
+
import { Result } from "../types/fp.js";
|
|
29
31
|
|
|
30
32
|
export enum CreateProjectAcceptEnum {
|
|
31
|
-
applicationJsonAccept =
|
|
32
|
-
applicationProblemPlusJsonAccept =
|
|
33
|
+
applicationJsonAccept = "application/json",
|
|
34
|
+
applicationProblemPlusJsonAccept = "application/problem+json",
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
/**
|
|
@@ -39,9 +41,9 @@ export enum CreateProjectAcceptEnum {
|
|
|
39
41
|
* Create a new project
|
|
40
42
|
*/
|
|
41
43
|
export function projectsCreateProject(
|
|
42
|
-
client$:
|
|
44
|
+
client$: InkeepAgentsManageCore,
|
|
43
45
|
request: CreateProjectRequest,
|
|
44
|
-
options?: RequestOptions
|
|
46
|
+
options?: RequestOptions,
|
|
45
47
|
): APIPromise<
|
|
46
48
|
Result<
|
|
47
49
|
CreateProjectResponse,
|
|
@@ -54,13 +56,17 @@ export function projectsCreateProject(
|
|
|
54
56
|
| ConnectionError
|
|
55
57
|
>
|
|
56
58
|
> {
|
|
57
|
-
return new APIPromise($do(
|
|
59
|
+
return new APIPromise($do(
|
|
60
|
+
client$,
|
|
61
|
+
request,
|
|
62
|
+
options,
|
|
63
|
+
));
|
|
58
64
|
}
|
|
59
65
|
|
|
60
66
|
async function $do(
|
|
61
|
-
client$:
|
|
67
|
+
client$: InkeepAgentsManageCore,
|
|
62
68
|
request: CreateProjectRequest,
|
|
63
|
-
options?: RequestOptions & { acceptHeaderOverride?: CreateProjectAcceptEnum }
|
|
69
|
+
options?: RequestOptions & { acceptHeaderOverride?: CreateProjectAcceptEnum },
|
|
64
70
|
): Promise<
|
|
65
71
|
[
|
|
66
72
|
Result<
|
|
@@ -79,55 +85,64 @@ async function $do(
|
|
|
79
85
|
const parsed$ = safeParse(
|
|
80
86
|
request,
|
|
81
87
|
(value$) => CreateProjectRequest$zodSchema.parse(value$),
|
|
82
|
-
|
|
88
|
+
"Input validation failed",
|
|
83
89
|
);
|
|
84
90
|
if (!parsed$.ok) {
|
|
85
|
-
return [parsed$, { status:
|
|
91
|
+
return [parsed$, { status: "invalid" }];
|
|
86
92
|
}
|
|
87
93
|
const payload$ = parsed$.value;
|
|
88
|
-
const body$ = encodeJSON(
|
|
94
|
+
const body$ = encodeJSON("body", payload$.body, { explode: true });
|
|
89
95
|
|
|
90
96
|
const pathParams$ = {
|
|
91
|
-
tenantId: encodeSimple(
|
|
97
|
+
tenantId: encodeSimple("tenantId", payload$.tenantId, {
|
|
92
98
|
explode: false,
|
|
93
|
-
charEncoding:
|
|
99
|
+
charEncoding: "percent",
|
|
94
100
|
}),
|
|
95
101
|
};
|
|
96
|
-
const path$ = pathToFunc(
|
|
97
|
-
|
|
98
|
-
const headers$ = new Headers(
|
|
99
|
-
compactMap({
|
|
100
|
-
'Content-Type': 'application/json',
|
|
101
|
-
Accept: options?.acceptHeaderOverride || 'application/json;q=1, application/problem+json;q=0',
|
|
102
|
-
})
|
|
102
|
+
const path$ = pathToFunc("/tenants/{tenantId}/projects")(
|
|
103
|
+
pathParams$,
|
|
103
104
|
);
|
|
104
105
|
|
|
106
|
+
const headers$ = new Headers(compactMap({
|
|
107
|
+
"Content-Type": "application/json",
|
|
108
|
+
Accept: options?.acceptHeaderOverride
|
|
109
|
+
|| "application/json;q=1, application/problem+json;q=0",
|
|
110
|
+
}));
|
|
111
|
+
const securityInput = await extractSecurity(client$._options.security);
|
|
112
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
113
|
+
|
|
105
114
|
const context = {
|
|
106
115
|
options: client$._options,
|
|
107
|
-
baseURL: options?.serverURL ?? client$._baseURL ??
|
|
108
|
-
operationID:
|
|
116
|
+
baseURL: options?.serverURL ?? client$._baseURL ?? "",
|
|
117
|
+
operationID: "create-project",
|
|
109
118
|
oAuth2Scopes: null,
|
|
110
|
-
resolvedSecurity:
|
|
111
|
-
securitySource:
|
|
112
|
-
retryConfig: options?.retries
|
|
113
|
-
|
|
119
|
+
resolvedSecurity: requestSecurity,
|
|
120
|
+
securitySource: client$._options.security,
|
|
121
|
+
retryConfig: options?.retries
|
|
122
|
+
|| client$._options.retryConfig
|
|
123
|
+
|| { strategy: "none" },
|
|
124
|
+
retryCodes: options?.retryCodes || [
|
|
125
|
+
"429",
|
|
126
|
+
"500",
|
|
127
|
+
"502",
|
|
128
|
+
"503",
|
|
129
|
+
"504",
|
|
130
|
+
],
|
|
114
131
|
};
|
|
115
132
|
|
|
116
|
-
const requestRes = client$._createRequest(
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
options
|
|
128
|
-
);
|
|
133
|
+
const requestRes = client$._createRequest(context, {
|
|
134
|
+
security: requestSecurity,
|
|
135
|
+
method: "POST",
|
|
136
|
+
baseURL: options?.serverURL,
|
|
137
|
+
path: path$,
|
|
138
|
+
headers: headers$,
|
|
139
|
+
body: body$,
|
|
140
|
+
userAgent: client$._options.userAgent,
|
|
141
|
+
timeoutMs: options?.timeoutMs || client$._options.timeoutMs
|
|
142
|
+
|| -1,
|
|
143
|
+
}, options);
|
|
129
144
|
if (!requestRes.ok) {
|
|
130
|
-
return [requestRes, { status:
|
|
145
|
+
return [requestRes, { status: "invalid" }];
|
|
131
146
|
}
|
|
132
147
|
const req$ = requestRes.value;
|
|
133
148
|
|
|
@@ -138,7 +153,7 @@ async function $do(
|
|
|
138
153
|
retryCodes: context.retryCodes,
|
|
139
154
|
});
|
|
140
155
|
if (!doResult.ok) {
|
|
141
|
-
return [doResult, { status:
|
|
156
|
+
return [doResult, { status: "request-error", request: req$ }];
|
|
142
157
|
}
|
|
143
158
|
const response = doResult.value;
|
|
144
159
|
const responseFields$ = {
|
|
@@ -155,33 +170,33 @@ async function $do(
|
|
|
155
170
|
| RequestTimeoutError
|
|
156
171
|
| ConnectionError
|
|
157
172
|
>(
|
|
158
|
-
M.json(201, CreateProjectResponse$zodSchema, { key:
|
|
173
|
+
M.json(201, CreateProjectResponse$zodSchema, { key: "ProjectResponse" }),
|
|
159
174
|
M.json(400, CreateProjectResponse$zodSchema, {
|
|
160
|
-
ctype:
|
|
161
|
-
key:
|
|
175
|
+
ctype: "application/problem+json",
|
|
176
|
+
key: "BadRequest",
|
|
162
177
|
}),
|
|
163
178
|
M.json(401, CreateProjectResponse$zodSchema, {
|
|
164
|
-
ctype:
|
|
165
|
-
key:
|
|
179
|
+
ctype: "application/problem+json",
|
|
180
|
+
key: "Unauthorized",
|
|
166
181
|
}),
|
|
167
182
|
M.json(403, CreateProjectResponse$zodSchema, {
|
|
168
|
-
ctype:
|
|
169
|
-
key:
|
|
183
|
+
ctype: "application/problem+json",
|
|
184
|
+
key: "Forbidden",
|
|
170
185
|
}),
|
|
171
186
|
M.json(404, CreateProjectResponse$zodSchema, {
|
|
172
|
-
ctype:
|
|
173
|
-
key:
|
|
187
|
+
ctype: "application/problem+json",
|
|
188
|
+
key: "NotFound",
|
|
174
189
|
}),
|
|
175
|
-
M.json(409, CreateProjectResponse$zodSchema, { key:
|
|
190
|
+
M.json(409, CreateProjectResponse$zodSchema, { key: "ErrorResponse" }),
|
|
176
191
|
M.json(422, CreateProjectResponse$zodSchema, {
|
|
177
|
-
ctype:
|
|
178
|
-
key:
|
|
192
|
+
ctype: "application/problem+json",
|
|
193
|
+
key: "UnprocessableEntity",
|
|
179
194
|
}),
|
|
180
195
|
M.json(500, CreateProjectResponse$zodSchema, {
|
|
181
|
-
ctype:
|
|
182
|
-
key:
|
|
183
|
-
})
|
|
196
|
+
ctype: "application/problem+json",
|
|
197
|
+
key: "InternalServerError",
|
|
198
|
+
}),
|
|
184
199
|
)(response, req$, { extraFields: responseFields$ });
|
|
185
200
|
|
|
186
|
-
return [result$, { status:
|
|
201
|
+
return [result$, { status: "complete", request: req$, response }];
|
|
187
202
|
}
|
|
@@ -1,35 +1,37 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: ed0a6a56d926
|
|
3
4
|
*/
|
|
4
5
|
|
|
5
|
-
import
|
|
6
|
-
import { encodeSimple } from
|
|
7
|
-
import * as M from
|
|
8
|
-
import { compactMap } from
|
|
9
|
-
import { safeParse } from
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
6
|
+
import { InkeepAgentsManageCore } from "../core.js";
|
|
7
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
12
14
|
import {
|
|
13
|
-
|
|
15
|
+
DeleteProjectRequest,
|
|
14
16
|
DeleteProjectRequest$zodSchema,
|
|
15
|
-
|
|
17
|
+
DeleteProjectResponse,
|
|
16
18
|
DeleteProjectResponse$zodSchema,
|
|
17
|
-
} from
|
|
18
|
-
import
|
|
19
|
-
import
|
|
19
|
+
} from "../models/deleteprojectop.js";
|
|
20
|
+
import { APIError } from "../models/errors/apierror.js";
|
|
21
|
+
import {
|
|
20
22
|
ConnectionError,
|
|
21
23
|
InvalidRequestError,
|
|
22
24
|
RequestAbortedError,
|
|
23
25
|
RequestTimeoutError,
|
|
24
26
|
UnexpectedClientError,
|
|
25
|
-
} from
|
|
26
|
-
import
|
|
27
|
-
import {
|
|
28
|
-
import
|
|
27
|
+
} from "../models/errors/httpclienterrors.js";
|
|
28
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
29
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
30
|
+
import { Result } from "../types/fp.js";
|
|
29
31
|
|
|
30
32
|
export enum DeleteProjectAcceptEnum {
|
|
31
|
-
applicationJsonAccept =
|
|
32
|
-
applicationProblemPlusJsonAccept =
|
|
33
|
+
applicationJsonAccept = "application/json",
|
|
34
|
+
applicationProblemPlusJsonAccept = "application/problem+json",
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
/**
|
|
@@ -39,9 +41,9 @@ export enum DeleteProjectAcceptEnum {
|
|
|
39
41
|
* Delete a project. Will fail if the project has existing resources.
|
|
40
42
|
*/
|
|
41
43
|
export function projectsDeleteProject(
|
|
42
|
-
client$:
|
|
44
|
+
client$: InkeepAgentsManageCore,
|
|
43
45
|
request: DeleteProjectRequest,
|
|
44
|
-
options?: RequestOptions
|
|
46
|
+
options?: RequestOptions,
|
|
45
47
|
): APIPromise<
|
|
46
48
|
Result<
|
|
47
49
|
DeleteProjectResponse,
|
|
@@ -54,13 +56,17 @@ export function projectsDeleteProject(
|
|
|
54
56
|
| ConnectionError
|
|
55
57
|
>
|
|
56
58
|
> {
|
|
57
|
-
return new APIPromise($do(
|
|
59
|
+
return new APIPromise($do(
|
|
60
|
+
client$,
|
|
61
|
+
request,
|
|
62
|
+
options,
|
|
63
|
+
));
|
|
58
64
|
}
|
|
59
65
|
|
|
60
66
|
async function $do(
|
|
61
|
-
client$:
|
|
67
|
+
client$: InkeepAgentsManageCore,
|
|
62
68
|
request: DeleteProjectRequest,
|
|
63
|
-
options?: RequestOptions & { acceptHeaderOverride?: DeleteProjectAcceptEnum }
|
|
69
|
+
options?: RequestOptions & { acceptHeaderOverride?: DeleteProjectAcceptEnum },
|
|
64
70
|
): Promise<
|
|
65
71
|
[
|
|
66
72
|
Result<
|
|
@@ -79,58 +85,67 @@ async function $do(
|
|
|
79
85
|
const parsed$ = safeParse(
|
|
80
86
|
request,
|
|
81
87
|
(value$) => DeleteProjectRequest$zodSchema.parse(value$),
|
|
82
|
-
|
|
88
|
+
"Input validation failed",
|
|
83
89
|
);
|
|
84
90
|
if (!parsed$.ok) {
|
|
85
|
-
return [parsed$, { status:
|
|
91
|
+
return [parsed$, { status: "invalid" }];
|
|
86
92
|
}
|
|
87
93
|
const payload$ = parsed$.value;
|
|
88
94
|
const body$ = null;
|
|
89
95
|
|
|
90
96
|
const pathParams$ = {
|
|
91
|
-
id: encodeSimple(
|
|
97
|
+
id: encodeSimple("id", payload$.id, {
|
|
92
98
|
explode: false,
|
|
93
|
-
charEncoding:
|
|
99
|
+
charEncoding: "percent",
|
|
94
100
|
}),
|
|
95
|
-
tenantId: encodeSimple(
|
|
101
|
+
tenantId: encodeSimple("tenantId", payload$.tenantId, {
|
|
96
102
|
explode: false,
|
|
97
|
-
charEncoding:
|
|
103
|
+
charEncoding: "percent",
|
|
98
104
|
}),
|
|
99
105
|
};
|
|
100
|
-
const path$ = pathToFunc(
|
|
101
|
-
|
|
102
|
-
const headers$ = new Headers(
|
|
103
|
-
compactMap({
|
|
104
|
-
Accept: options?.acceptHeaderOverride || 'application/json;q=1, application/problem+json;q=0',
|
|
105
|
-
})
|
|
106
|
+
const path$ = pathToFunc("/tenants/{tenantId}/projects/{id}")(
|
|
107
|
+
pathParams$,
|
|
106
108
|
);
|
|
107
109
|
|
|
110
|
+
const headers$ = new Headers(compactMap({
|
|
111
|
+
Accept: options?.acceptHeaderOverride
|
|
112
|
+
|| "application/json;q=1, application/problem+json;q=0",
|
|
113
|
+
}));
|
|
114
|
+
const securityInput = await extractSecurity(client$._options.security);
|
|
115
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
116
|
+
|
|
108
117
|
const context = {
|
|
109
118
|
options: client$._options,
|
|
110
|
-
baseURL: options?.serverURL ?? client$._baseURL ??
|
|
111
|
-
operationID:
|
|
119
|
+
baseURL: options?.serverURL ?? client$._baseURL ?? "",
|
|
120
|
+
operationID: "delete-project",
|
|
112
121
|
oAuth2Scopes: null,
|
|
113
|
-
resolvedSecurity:
|
|
114
|
-
securitySource:
|
|
115
|
-
retryConfig: options?.retries
|
|
116
|
-
|
|
122
|
+
resolvedSecurity: requestSecurity,
|
|
123
|
+
securitySource: client$._options.security,
|
|
124
|
+
retryConfig: options?.retries
|
|
125
|
+
|| client$._options.retryConfig
|
|
126
|
+
|| { strategy: "none" },
|
|
127
|
+
retryCodes: options?.retryCodes || [
|
|
128
|
+
"429",
|
|
129
|
+
"500",
|
|
130
|
+
"502",
|
|
131
|
+
"503",
|
|
132
|
+
"504",
|
|
133
|
+
],
|
|
117
134
|
};
|
|
118
135
|
|
|
119
|
-
const requestRes = client$._createRequest(
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
options
|
|
131
|
-
);
|
|
136
|
+
const requestRes = client$._createRequest(context, {
|
|
137
|
+
security: requestSecurity,
|
|
138
|
+
method: "DELETE",
|
|
139
|
+
baseURL: options?.serverURL,
|
|
140
|
+
path: path$,
|
|
141
|
+
headers: headers$,
|
|
142
|
+
body: body$,
|
|
143
|
+
userAgent: client$._options.userAgent,
|
|
144
|
+
timeoutMs: options?.timeoutMs || client$._options.timeoutMs
|
|
145
|
+
|| -1,
|
|
146
|
+
}, options);
|
|
132
147
|
if (!requestRes.ok) {
|
|
133
|
-
return [requestRes, { status:
|
|
148
|
+
return [requestRes, { status: "invalid" }];
|
|
134
149
|
}
|
|
135
150
|
const req$ = requestRes.value;
|
|
136
151
|
|
|
@@ -141,7 +156,7 @@ async function $do(
|
|
|
141
156
|
retryCodes: context.retryCodes,
|
|
142
157
|
});
|
|
143
158
|
if (!doResult.ok) {
|
|
144
|
-
return [doResult, { status:
|
|
159
|
+
return [doResult, { status: "request-error", request: req$ }];
|
|
145
160
|
}
|
|
146
161
|
const response = doResult.value;
|
|
147
162
|
const responseFields$ = {
|
|
@@ -160,31 +175,31 @@ async function $do(
|
|
|
160
175
|
>(
|
|
161
176
|
M.nil(204, DeleteProjectResponse$zodSchema),
|
|
162
177
|
M.json(400, DeleteProjectResponse$zodSchema, {
|
|
163
|
-
ctype:
|
|
164
|
-
key:
|
|
178
|
+
ctype: "application/problem+json",
|
|
179
|
+
key: "BadRequest",
|
|
165
180
|
}),
|
|
166
181
|
M.json(401, DeleteProjectResponse$zodSchema, {
|
|
167
|
-
ctype:
|
|
168
|
-
key:
|
|
182
|
+
ctype: "application/problem+json",
|
|
183
|
+
key: "Unauthorized",
|
|
169
184
|
}),
|
|
170
185
|
M.json(403, DeleteProjectResponse$zodSchema, {
|
|
171
|
-
ctype:
|
|
172
|
-
key:
|
|
186
|
+
ctype: "application/problem+json",
|
|
187
|
+
key: "Forbidden",
|
|
173
188
|
}),
|
|
174
189
|
M.json(404, DeleteProjectResponse$zodSchema, {
|
|
175
|
-
ctype:
|
|
176
|
-
key:
|
|
190
|
+
ctype: "application/problem+json",
|
|
191
|
+
key: "NotFound",
|
|
177
192
|
}),
|
|
178
|
-
M.json(409, DeleteProjectResponse$zodSchema, { key:
|
|
193
|
+
M.json(409, DeleteProjectResponse$zodSchema, { key: "ErrorResponse" }),
|
|
179
194
|
M.json(422, DeleteProjectResponse$zodSchema, {
|
|
180
|
-
ctype:
|
|
181
|
-
key:
|
|
195
|
+
ctype: "application/problem+json",
|
|
196
|
+
key: "UnprocessableEntity",
|
|
182
197
|
}),
|
|
183
198
|
M.json(500, DeleteProjectResponse$zodSchema, {
|
|
184
|
-
ctype:
|
|
185
|
-
key:
|
|
186
|
-
})
|
|
199
|
+
ctype: "application/problem+json",
|
|
200
|
+
key: "InternalServerError",
|
|
201
|
+
}),
|
|
187
202
|
)(response, req$, { extraFields: responseFields$ });
|
|
188
203
|
|
|
189
|
-
return [result$, { status:
|
|
204
|
+
return [result$, { status: "complete", request: req$, response }];
|
|
190
205
|
}
|