From f7b542efbfc2d822109509efd57dcf0a0673d3d2 Mon Sep 17 00:00:00 2001 From: Luke Hagar Date: Fri, 26 Sep 2025 02:33:10 +0000 Subject: [PATCH] initial commit --- .devcontainer/README.md | 30 + .devcontainer/devcontainer.json | 45 + .devcontainer/setup.sh | 30 + .gitattributes | 2 + .gitignore | 30 + .npmignore | 15 + .speakeasy/gen.lock | 2794 ++++++ .speakeasy/gen.yaml | 69 + .speakeasy/out.openapi.yaml | 8526 +++++++++++++++++ .../speakeasy-modifications-overlay.yaml | 2472 +++++ .speakeasy/workflow.lock | 39 + .speakeasy/workflow.yaml | 21 + CONTRIBUTING.md | 26 + FUNCTIONS.md | 87 + README.md | 1054 ++ RUNTIMES.md | 48 + USAGE.md | 18 + docs/lib/utils/retryconfig.md | 24 + docs/models/errort.md | 22 + docs/models/issue.md | 17 + .../adminassignpermissionsrequest.md | 41 + .../admincreateuserinvitationrequest.md | 17 + .../operations/admingetuserbytokenrequest.md | 17 + .../operations/adminremoveuserrequest.md | 17 + .../applicationcleanqueuesrequest.md | 17 + .../operations/applicationcreaterequest.md | 22 + .../operations/applicationdeleterequest.md | 17 + .../operations/applicationdeployrequest.md | 17 + .../applicationmarkrunningrequest.md | 17 + .../operations/applicationonerequest.md | 17 + .../applicationreadappmonitoringrequest.md | 17 + .../applicationreadtraefikconfigrequest.md | 17 + .../operations/applicationredeployrequest.md | 17 + .../applicationrefreshtokenrequest.md | 17 + .../operations/applicationreloadrequest.md | 19 + ...applicationsavebitbucketproviderrequest.md | 27 + .../applicationsavebuildtypebuildtype.md | 15 + .../applicationsavebuildtyperequest.md | 25 + .../applicationsavedockerproviderrequest.md | 20 + .../applicationsaveenvironmentrequest.md | 19 + .../applicationsavegithubproviderrequest.md | 24 + .../applicationsavegitlabproviderrequest.md | 31 + .../applicationsavegitprodiverrequest.md | 21 + .../operations/applicationstartrequest.md | 17 + .../operations/applicationstoprequest.md | 17 + .../applicationupdateapplicationstatus.md | 15 + .../operations/applicationupdatebuildtype.md | 15 + .../operations/applicationupdaterequest.md | 76 + .../operations/applicationupdatesourcetype.md | 15 + .../applicationupdatetraefikconfigrequest.md | 19 + docs/models/operations/apptype.md | 17 + .../models/operations/apptypedockercompose.md | 15 + docs/models/operations/apptypestack.md | 15 + .../operations/authconfirmemailrequest.md | 17 + .../operations/authcreateadminrequest.md | 19 + .../operations/authcreateuserrequest.md | 21 + docs/models/operations/authloginrequest.md | 19 + docs/models/operations/authonerequest.md | 17 + .../operations/authresetpasswordrequest.md | 19 + .../authsendresetpasswordemailrequest.md | 17 + docs/models/operations/authupdaterequest.md | 30 + .../operations/authverify2fasetuprequest.md | 19 + .../operations/authverifylogin2farequest.md | 19 + docs/models/operations/backupcreaterequest.md | 30 + .../backupmanualbackupmariadbrequest.md | 17 + .../backupmanualbackupmongorequest.md | 17 + .../backupmanualbackupmysqlrequest.md | 17 + .../backupmanualbackuppostgresrequest.md | 17 + docs/models/operations/backuponerequest.md | 17 + docs/models/operations/backupremoverequest.md | 17 + docs/models/operations/backupupdaterequest.md | 26 + .../operations/bitbucketcreaterequest.md | 24 + .../bitbucketgetbitbucketbranchesrequest.md | 20 + ...itbucketgetbitbucketrepositoriesrequest.md | 17 + docs/models/operations/bitbucketonerequest.md | 17 + .../bitbuckettestconnectionrequest.md | 19 + .../operations/bitbucketupdaterequest.md | 25 + .../operations/certificatescreaterequest.md | 26 + .../operations/certificatesonerequest.md | 17 + .../operations/certificatesremoverequest.md | 17 + .../operations/clusterremoveworkerrequest.md | 17 + .../operations/composecleanqueuesrequest.md | 17 + .../operations/composecreatecomposetype.md | 15 + .../models/operations/composecreaterequest.md | 23 + .../models/operations/composedeleterequest.md | 17 + .../models/operations/composedeployrequest.md | 17 + .../composedeploytemplaterequest.md | 20 + .../composefetchsourcetyperequest.md | 17 + .../composegetconvertedcomposerequest.md | 17 + .../composegetdefaultcommandrequest.md | 17 + docs/models/operations/composeonerequest.md | 17 + .../composerandomizecomposerequest.md | 18 + .../operations/composeredeployrequest.md | 17 + .../operations/composerefreshtokenrequest.md | 17 + docs/models/operations/composestatus.md | 15 + docs/models/operations/composestoprequest.md | 17 + .../operations/composeupdatecomposetype.md | 15 + .../models/operations/composeupdaterequest.md | 50 + .../operations/composeupdatesourcetype.md | 15 + docs/models/operations/databasetype.md | 15 + .../deploymentallbycomposerequest.md | 17 + .../deploymentallbyserverrequest.md | 17 + .../models/operations/deploymentallrequest.md | 17 + .../operations/destinationcreaterequest.md | 28 + .../operations/destinationonerequest.md | 17 + .../operations/destinationremoverequest.md | 17 + .../destinationtestconnectionrequest.md | 28 + .../operations/destinationupdaterequest.md | 30 + .../operations/dockergetconfigrequest.md | 18 + .../dockergetcontainersbyapplabelrequest.md | 18 + ...ockergetcontainersbyappnamematchrequest.md | 19 + .../operations/dockergetcontainersrequest.md | 15 + .../dockerrestartcontainerrequest.md | 17 + .../domainbyapplicationidrequest.md | 17 + .../operations/domainbycomposeidrequest.md | 17 + .../operations/domaincreatecertificatetype.md | 15 + .../operations/domaincreatedomaintype.md | 15 + docs/models/operations/domaincreaterequest.md | 25 + docs/models/operations/domaindeleterequest.md | 17 + .../operations/domaingeneratedomainrequest.md | 18 + docs/models/operations/domainonerequest.md | 17 + .../operations/domainupdatecertificatetype.md | 15 + .../operations/domainupdatedomaintype.md | 15 + docs/models/operations/domainupdaterequest.md | 25 + docs/models/operations/driveropts.md | 14 + .../githubgetgithubbranchesrequest.md | 20 + .../githubgetgithubrepositoriesrequest.md | 17 + docs/models/operations/githubonerequest.md | 17 + .../operations/githubtestconnectionrequest.md | 17 + docs/models/operations/githubupdaterequest.md | 28 + docs/models/operations/gitlabcreaterequest.md | 28 + .../gitlabgetgitlabbranchesrequest.md | 21 + .../gitlabgetgitlabrepositoriesrequest.md | 17 + docs/models/operations/gitlabonerequest.md | 17 + .../operations/gitlabtestconnectionrequest.md | 16 + docs/models/operations/gitlabupdaterequest.md | 28 + .../operations/gitproviderremoverequest.md | 17 + docs/models/operations/global.md | 14 + docs/models/operations/globaljob.md | 14 + docs/models/operations/healthcheckswarm.md | 19 + .../mariadbchangestatusapplicationstatus.md | 15 + .../operations/mariadbchangestatusrequest.md | 19 + .../models/operations/mariadbcreaterequest.md | 32 + .../models/operations/mariadbdeployrequest.md | 17 + docs/models/operations/mariadbonerequest.md | 17 + .../models/operations/mariadbreloadrequest.md | 19 + .../models/operations/mariadbremoverequest.md | 17 + .../mariadbsaveenvironmentrequest.md | 18 + .../mariadbsaveexternalportrequest.md | 19 + docs/models/operations/mariadbstartrequest.md | 17 + docs/models/operations/mariadbstoprequest.md | 17 + .../mariadbupdateapplicationstatus.md | 15 + .../models/operations/mariadbupdaterequest.md | 35 + docs/models/operations/modeswarm.md | 18 + .../mongochangestatusapplicationstatus.md | 15 + .../operations/mongochangestatusrequest.md | 19 + docs/models/operations/mongocreaterequest.md | 28 + docs/models/operations/mongodeployrequest.md | 17 + docs/models/operations/mongoonerequest.md | 17 + docs/models/operations/mongoreloadrequest.md | 19 + docs/models/operations/mongoremoverequest.md | 17 + .../operations/mongosaveenvironmentrequest.md | 18 + .../mongosaveexternalportrequest.md | 19 + docs/models/operations/mongostartrequest.md | 17 + docs/models/operations/mongostoprequest.md | 17 + .../mongoupdateapplicationstatus.md | 15 + docs/models/operations/mongoupdaterequest.md | 33 + docs/models/operations/mountscreaterequest.md | 26 + .../operations/mountscreateservicetype.md | 15 + docs/models/operations/mountscreatetype.md | 15 + docs/models/operations/mountsonerequest.md | 17 + docs/models/operations/mountsremoverequest.md | 17 + docs/models/operations/mountsupdaterequest.md | 31 + .../operations/mountsupdateservicetype.md | 15 + docs/models/operations/mountsupdatetype.md | 15 + .../mysqlchangestatusapplicationstatus.md | 15 + .../operations/mysqlchangestatusrequest.md | 19 + docs/models/operations/mysqlcreaterequest.md | 32 + docs/models/operations/mysqldeployrequest.md | 17 + docs/models/operations/mysqlonerequest.md | 17 + docs/models/operations/mysqlreloadrequest.md | 19 + docs/models/operations/mysqlremoverequest.md | 17 + .../operations/mysqlsaveenvironmentrequest.md | 18 + .../mysqlsaveexternalportrequest.md | 19 + docs/models/operations/mysqlstartrequest.md | 17 + docs/models/operations/mysqlstoprequest.md | 17 + .../mysqlupdateapplicationstatus.md | 15 + docs/models/operations/mysqlupdaterequest.md | 35 + docs/models/operations/networkswarm.md | 17 + .../notificationcreatediscordrequest.md | 29 + .../notificationcreateemailrequest.md | 39 + .../notificationcreateslackrequest.md | 31 + .../notificationcreatetelegramrequest.md | 31 + .../operations/notificationonerequest.md | 17 + .../operations/notificationremoverequest.md | 17 + ...otificationtestdiscordconnectionrequest.md | 17 + .../notificationtestemailconnectionrequest.md | 29 + .../notificationtestslackconnectionrequest.md | 19 + ...tificationtesttelegramconnectionrequest.md | 19 + .../notificationupdatediscordrequest.md | 27 + .../notificationupdateemailrequest.md | 32 + .../notificationupdateslackrequest.md | 28 + .../notificationupdatetelegramrequest.md | 28 + docs/models/operations/placementswarm.md | 18 + docs/models/operations/platform.md | 19 + docs/models/operations/portcreateprotocol.md | 15 + docs/models/operations/portcreaterequest.md | 22 + docs/models/operations/portdeleterequest.md | 17 + docs/models/operations/portonerequest.md | 17 + docs/models/operations/portupdateprotocol.md | 15 + docs/models/operations/portupdaterequest.md | 22 + .../postgreschangestatusapplicationstatus.md | 15 + .../operations/postgreschangestatusrequest.md | 19 + .../operations/postgrescreaterequest.md | 30 + .../operations/postgresdeployrequest.md | 17 + docs/models/operations/postgresonerequest.md | 17 + .../operations/postgresreloadrequest.md | 19 + .../operations/postgresremoverequest.md | 17 + .../postgressaveenvironmentrequest.md | 18 + .../postgressaveexternalportrequest.md | 19 + .../models/operations/postgresstartrequest.md | 17 + docs/models/operations/postgresstoprequest.md | 17 + .../postgresupdateapplicationstatus.md | 15 + .../operations/postgresupdaterequest.md | 34 + docs/models/operations/preference.md | 19 + .../models/operations/projectcreaterequest.md | 18 + docs/models/operations/projectonerequest.md | 17 + .../models/operations/projectremoverequest.md | 17 + .../models/operations/projectupdaterequest.md | 20 + .../operations/redirectscreaterequest.md | 23 + .../operations/redirectsdeleterequest.md | 17 + docs/models/operations/redirectsonerequest.md | 17 + .../operations/redirectsupdaterequest.md | 23 + .../redischangestatusapplicationstatus.md | 15 + .../operations/redischangestatusrequest.md | 19 + docs/models/operations/rediscreaterequest.md | 26 + docs/models/operations/redisdeployrequest.md | 17 + docs/models/operations/redisonerequest.md | 17 + docs/models/operations/redisreloadrequest.md | 19 + docs/models/operations/redisremoverequest.md | 17 + .../operations/redissaveenvironmentrequest.md | 18 + .../redissaveexternalportrequest.md | 19 + docs/models/operations/redisstartrequest.md | 17 + docs/models/operations/redisstoprequest.md | 17 + .../redisupdateapplicationstatus.md | 15 + docs/models/operations/redisupdaterequest.md | 32 + .../operations/registrycreateregistrytype.md | 15 + .../operations/registrycreaterequest.md | 28 + docs/models/operations/registryonerequest.md | 17 + .../operations/registryremoverequest.md | 17 + .../registrytestregistryregistrytype.md | 15 + .../operations/registrytestregistryrequest.md | 27 + .../operations/registryupdateregistrytype.md | 15 + .../operations/registryupdaterequest.md | 26 + docs/models/operations/replicated.md | 15 + docs/models/operations/replicatedjob.md | 16 + docs/models/operations/restartpolicyswarm.md | 18 + docs/models/operations/rol.md | 15 + docs/models/operations/rollbackconfigswarm.md | 23 + .../operations/securitycreaterequest.md | 21 + .../operations/securitydeleterequest.md | 17 + docs/models/operations/securityonerequest.md | 17 + .../operations/securityupdaterequest.md | 21 + docs/models/operations/servercreaterequest.md | 26 + docs/models/operations/serveronerequest.md | 17 + docs/models/operations/serverremoverequest.md | 17 + docs/models/operations/serversetuprequest.md | 17 + docs/models/operations/serverupdaterequest.md | 28 + ...ttingsassigndomainservercertificatetype.md | 15 + .../settingsassigndomainserverrequest.md | 19 + .../operations/settingscleanallrequest.md | 15 + .../settingscleandockerbuilderrequest.md | 15 + .../settingscleandockerprunerequest.md | 15 + .../settingscleanstoppedcontainersrequest.md | 15 + .../settingscleanunusedimagesrequest.md | 15 + .../settingscleanunusedvolumesrequest.md | 15 + ...shavetraefikdashboardportenabledrequest.md | 15 + .../settingsreaddirectoriesrequest.md | 15 + .../settingsreadtraefikenvrequest.md | 15 + .../settingsreadtraefikfilerequest.md | 18 + .../settingsreloadtraefikrequest.md | 15 + .../settingssavesshprivatekeyrequest.md | 15 + .../settingstoggledashboardrequest.md | 16 + .../settingstogglelogrotaterequest.md | 17 + .../settingstogglerequestsrequest.md | 17 + .../settingsupdatedockercleanuprequest.md | 18 + ...ngsupdatemiddlewaretraefikconfigrequest.md | 17 + .../settingsupdatetraefikconfigrequest.md | 17 + .../settingsupdatetraefikfilerequest.md | 20 + ...ingsupdatewebservertraefikconfigrequest.md | 17 + .../settingswritetraefikenvrequest.md | 18 + docs/models/operations/spread.md | 17 + docs/models/operations/sshkeycreaterequest.md | 23 + .../operations/sshkeygeneraterequest.md | 15 + docs/models/operations/sshkeygeneratetype.md | 15 + docs/models/operations/sshkeyonerequest.md | 17 + docs/models/operations/sshkeyremoverequest.md | 17 + docs/models/operations/sshkeyupdaterequest.md | 20 + .../stripecreatecheckoutsessionrequest.md | 21 + docs/models/operations/updateconfigswarm.md | 23 + docs/models/operations/userbyauthidrequest.md | 17 + docs/models/operations/userbyuseridrequest.md | 17 + docs/models/security.md | 15 + docs/sdks/admin/README.md | 392 + docs/sdks/application/README.md | 1631 ++++ docs/sdks/auth/README.md | 1078 +++ docs/sdks/backup/README.md | 599 ++ docs/sdks/bitbucket/README.md | 514 + docs/sdks/certificates/README.md | 294 + docs/sdks/cluster/README.md | 280 + docs/sdks/compose/README.md | 1153 +++ docs/sdks/deployment/README.md | 223 + docs/sdks/destination/README.md | 466 + docs/sdks/docker/README.md | 363 + docs/sdks/dokploy/README.md | 8 + docs/sdks/domain/README.md | 513 + docs/sdks/github/README.md | 440 + docs/sdks/gitlab/README.md | 510 + docs/sdks/gitprovider/README.md | 146 + docs/sdks/mariadb/README.md | 817 ++ docs/sdks/mongo/README.md | 813 ++ docs/sdks/mounts/README.md | 299 + docs/sdks/mysql/README.md | 817 ++ docs/sdks/notification/README.md | 1100 +++ docs/sdks/notifications/README.md | 79 + docs/sdks/port/README.md | 303 + docs/sdks/postgres/README.md | 815 ++ docs/sdks/project/README.md | 364 + docs/sdks/redirects/README.md | 307 + docs/sdks/redis/README.md | 811 ++ docs/sdks/registry/README.md | 452 + docs/sdks/security/README.md | 303 + docs/sdks/server/README.md | 447 + docs/sdks/servers/README.md | 79 + docs/sdks/settings/README.md | 2617 +++++ docs/sdks/sshkey/README.md | 291 + docs/sdks/sshkeys/README.md | 150 + docs/sdks/stripe/README.md | 284 + docs/sdks/user/README.md | 218 + eslint.config.mjs | 22 + examples/.env.template | 14 + examples/README.md | 31 + examples/adminGetOne.example.ts | 26 + examples/package-lock.json | 611 ++ examples/package.json | 18 + jsr.json | 27 + package-lock.json | 2322 +++++ package.json | 122 + src/core.ts | 13 + src/funcs/adminAssignPermissions.ts | 157 + src/funcs/adminCreateUserInvitation.ts | 157 + src/funcs/adminGetOne.ts | 137 + src/funcs/adminGetUserByToken.ts | 161 + src/funcs/adminRemoveUser.ts | 156 + src/funcs/applicationCleanQueues.ts | 157 + src/funcs/applicationCreate.ts | 156 + src/funcs/applicationDelete.ts | 156 + src/funcs/applicationDeploy.ts | 156 + src/funcs/applicationGetOne.ts | 160 + src/funcs/applicationMarkRunning.ts | 157 + src/funcs/applicationReadAppMonitoring.ts | 163 + src/funcs/applicationReadTraefikConfig.ts | 163 + src/funcs/applicationRedeploy.ts | 157 + src/funcs/applicationRefreshToken.ts | 157 + src/funcs/applicationReload.ts | 156 + src/funcs/applicationSaveBitbucketProvider.ts | 159 + src/funcs/applicationSaveBuildType.ts | 157 + src/funcs/applicationSaveDockerProvider.ts | 159 + src/funcs/applicationSaveEnvironment.ts | 157 + src/funcs/applicationSaveGitProdiver.ts | 157 + src/funcs/applicationSaveGithubProvider.ts | 159 + src/funcs/applicationSaveGitlabProvider.ts | 159 + src/funcs/applicationStart.ts | 156 + src/funcs/applicationStop.ts | 156 + src/funcs/applicationUpdate.ts | 156 + src/funcs/applicationUpdateTraefikConfig.ts | 159 + src/funcs/authConfirmEmail.ts | 156 + src/funcs/authCreateAdmin.ts | 156 + src/funcs/authCreateUser.ts | 156 + src/funcs/authDisable2FA.ts | 137 + src/funcs/authGenerate2FASecret.ts | 137 + src/funcs/authGenerateToken.ts | 137 + src/funcs/authGet.ts | 160 + src/funcs/authGetOne.ts | 137 + src/funcs/authLogin.ts | 156 + src/funcs/authLogout.ts | 137 + src/funcs/authResetPassword.ts | 156 + src/funcs/authSendResetPasswordEmail.ts | 157 + src/funcs/authUpdate.ts | 156 + src/funcs/authVerify2faSetup.ts | 156 + src/funcs/authVerifyLogin2FA.ts | 156 + src/funcs/backupCreate.ts | 156 + src/funcs/backupGet.ts | 160 + src/funcs/backupManualBackupMariadb.ts | 157 + src/funcs/backupManualBackupMongo.ts | 157 + src/funcs/backupManualBackupMysql.ts | 157 + src/funcs/backupManualBackupPostgres.ts | 157 + src/funcs/backupRemove.ts | 156 + src/funcs/backupUpdate.ts | 156 + src/funcs/bitbucketCreate.ts | 156 + src/funcs/bitbucketGet.ts | 160 + src/funcs/bitbucketGetBranches.ts | 165 + src/funcs/bitbucketGetRepositories.ts | 163 + src/funcs/bitbucketProviders.ts | 137 + src/funcs/bitbucketTestConnection.ts | 157 + src/funcs/bitbucketUpdate.ts | 156 + src/funcs/certificatesAll.ts | 137 + src/funcs/certificatesCreate.ts | 156 + src/funcs/certificatesGet.ts | 160 + src/funcs/certificatesRemove.ts | 156 + src/funcs/clusterAddManager.ts | 137 + src/funcs/clusterAddWorker.ts | 137 + src/funcs/clusterGetNodes.ts | 137 + src/funcs/clusterRemoveWorker.ts | 157 + src/funcs/composeCleanQueues.ts | 156 + src/funcs/composeCreate.ts | 156 + src/funcs/composeDelete.ts | 156 + src/funcs/composeDeploy.ts | 156 + src/funcs/composeDeployTemplate.ts | 157 + src/funcs/composeFetchSourceType.ts | 157 + src/funcs/composeGetConverted.ts | 161 + src/funcs/composeGetDefaultCommand.ts | 161 + src/funcs/composeGetOne.ts | 160 + src/funcs/composeGetTags.ts | 137 + src/funcs/composeGetTemplates.ts | 137 + src/funcs/composeRandomizeCompose.ts | 157 + src/funcs/composeRedeploy.ts | 156 + src/funcs/composeRefreshToken.ts | 157 + src/funcs/composeStop.ts | 156 + src/funcs/composeUpdate.ts | 156 + src/funcs/deploymentAllByCompose.ts | 161 + src/funcs/deploymentAllByServer.ts | 161 + src/funcs/deploymentGet.ts | 160 + src/funcs/destinationCreate.ts | 156 + src/funcs/destinationGet.ts | 137 + src/funcs/destinationGetOne.ts | 160 + src/funcs/destinationRemove.ts | 156 + src/funcs/destinationTestConnection.ts | 157 + src/funcs/destinationUpdate.ts | 156 + src/funcs/dockerGetConfig.ts | 161 + src/funcs/dockerGetContainers.ts | 163 + src/funcs/dockerGetContainersByAppLabel.ts | 164 + .../dockerGetContainersByAppNameMatch.ts | 165 + src/funcs/dockerRestartContainer.ts | 157 + src/funcs/domainByApplicationId.ts | 161 + src/funcs/domainByComposeId.ts | 160 + src/funcs/domainCreate.ts | 156 + src/funcs/domainDelete.ts | 156 + src/funcs/domainGenerateDomain.ts | 157 + src/funcs/domainGet.ts | 160 + src/funcs/domainUpdate.ts | 156 + src/funcs/gitProviderGetAll.ts | 137 + src/funcs/gitProviderRemove.ts | 156 + src/funcs/githubGetBranches.ts | 163 + src/funcs/githubGetProviders.ts | 137 + src/funcs/githubGetRepositories.ts | 161 + src/funcs/githubOne.ts | 160 + src/funcs/githubTestConnection.ts | 157 + src/funcs/githubUpdate.ts | 156 + src/funcs/gitlabCreate.ts | 156 + src/funcs/gitlabGetGitlabBranches.ts | 164 + src/funcs/gitlabGetGitlabRepositories.ts | 161 + src/funcs/gitlabOne.ts | 160 + src/funcs/gitlabProviders.ts | 137 + src/funcs/gitlabTestConnection.ts | 157 + src/funcs/gitlabUpdate.ts | 156 + src/funcs/mariadbChangeStatus.ts | 157 + src/funcs/mariadbCreate.ts | 156 + src/funcs/mariadbDeploy.ts | 156 + src/funcs/mariadbGet.ts | 160 + src/funcs/mariadbReload.ts | 156 + src/funcs/mariadbRemove.ts | 156 + src/funcs/mariadbSaveEnvironment.ts | 157 + src/funcs/mariadbSaveExternalPort.ts | 157 + src/funcs/mariadbStart.ts | 156 + src/funcs/mariadbStop.ts | 156 + src/funcs/mariadbUpdate.ts | 156 + src/funcs/mongoChangeStatus.ts | 156 + src/funcs/mongoCreate.ts | 156 + src/funcs/mongoDeploy.ts | 156 + src/funcs/mongoGet.ts | 160 + src/funcs/mongoReload.ts | 156 + src/funcs/mongoRemove.ts | 156 + src/funcs/mongoSaveEnvironment.ts | 157 + src/funcs/mongoSaveExternalPort.ts | 157 + src/funcs/mongoStart.ts | 156 + src/funcs/mongoStop.ts | 156 + src/funcs/mongoUpdate.ts | 156 + src/funcs/mountsCreate.ts | 156 + src/funcs/mountsGet.ts | 160 + src/funcs/mountsRemove.ts | 156 + src/funcs/mountsUpdate.ts | 156 + src/funcs/mysqlChangeStatus.ts | 156 + src/funcs/mysqlCreate.ts | 156 + src/funcs/mysqlDeploy.ts | 156 + src/funcs/mysqlGet.ts | 160 + src/funcs/mysqlReload.ts | 156 + src/funcs/mysqlRemove.ts | 156 + src/funcs/mysqlSaveEnvironment.ts | 157 + src/funcs/mysqlSaveExternalPort.ts | 157 + src/funcs/mysqlStart.ts | 156 + src/funcs/mysqlStop.ts | 156 + src/funcs/mysqlUpdate.ts | 156 + src/funcs/notificationCreateDiscord.ts | 157 + src/funcs/notificationCreateEmail.ts | 157 + src/funcs/notificationCreateSlack.ts | 157 + src/funcs/notificationCreateTelegram.ts | 157 + src/funcs/notificationGetAll.ts | 137 + src/funcs/notificationRemove.ts | 156 + .../notificationTestDiscordConnection.ts | 159 + src/funcs/notificationTestEmailConnection.ts | 159 + src/funcs/notificationTestSlackConnection.ts | 159 + .../notificationTestTelegramConnection.ts | 159 + src/funcs/notificationUpdateDiscord.ts | 157 + src/funcs/notificationUpdateEmail.ts | 157 + src/funcs/notificationUpdateSlack.ts | 157 + src/funcs/notificationUpdateTelegram.ts | 157 + src/funcs/notificationsGet.ts | 160 + src/funcs/portCreate.ts | 156 + src/funcs/portDelete.ts | 156 + src/funcs/portGet.ts | 160 + src/funcs/portUpdate.ts | 156 + src/funcs/postgresChangeStatus.ts | 157 + src/funcs/postgresCreate.ts | 156 + src/funcs/postgresDeploy.ts | 156 + src/funcs/postgresGet.ts | 160 + src/funcs/postgresReload.ts | 156 + src/funcs/postgresRemove.ts | 156 + src/funcs/postgresSaveEnvironment.ts | 157 + src/funcs/postgresSaveExternalPort.ts | 157 + src/funcs/postgresStart.ts | 156 + src/funcs/postgresStop.ts | 156 + src/funcs/postgresUpdate.ts | 156 + src/funcs/projectAll.ts | 137 + src/funcs/projectCreate.ts | 156 + src/funcs/projectGet.ts | 160 + src/funcs/projectRemove.ts | 156 + src/funcs/projectUpdate.ts | 156 + src/funcs/redirectsCreate.ts | 156 + src/funcs/redirectsDelete.ts | 156 + src/funcs/redirectsGetOne.ts | 160 + src/funcs/redirectsUpdate.ts | 156 + src/funcs/redisChangeStatus.ts | 156 + src/funcs/redisCreate.ts | 156 + src/funcs/redisDeploy.ts | 156 + src/funcs/redisGet.ts | 160 + src/funcs/redisReload.ts | 156 + src/funcs/redisRemove.ts | 156 + src/funcs/redisSaveEnvironment.ts | 157 + src/funcs/redisSaveExternalPort.ts | 157 + src/funcs/redisStart.ts | 156 + src/funcs/redisStop.ts | 156 + src/funcs/redisUpdate.ts | 156 + src/funcs/registryCreate.ts | 156 + src/funcs/registryGet.ts | 160 + src/funcs/registryGetAll.ts | 137 + src/funcs/registryRemove.ts | 156 + src/funcs/registryTestRegistry.ts | 157 + src/funcs/registryUpdate.ts | 156 + src/funcs/securityCreate.ts | 156 + src/funcs/securityDelete.ts | 156 + src/funcs/securityGet.ts | 160 + src/funcs/securityUpdate.ts | 156 + src/funcs/serverAll.ts | 137 + src/funcs/serverCreate.ts | 156 + src/funcs/serverRemove.ts | 156 + src/funcs/serverSetup.ts | 156 + src/funcs/serverUpdate.ts | 156 + src/funcs/serverWithSSHKey.ts | 137 + src/funcs/serversGet.ts | 160 + src/funcs/settingsAssignDomainServer.ts | 157 + src/funcs/settingsCheckAndUpdateImage.ts | 137 + src/funcs/settingsCleanAll.ts | 159 + src/funcs/settingsCleanDockerBuilder.ts | 160 + src/funcs/settingsCleanDockerPrune.ts | 160 + src/funcs/settingsCleanMonitoring.ts | 137 + src/funcs/settingsCleanSshPrivateKey.ts | 137 + src/funcs/settingsCleanStoppedContainers.ts | 160 + src/funcs/settingsCleanUnusedImages.ts | 160 + src/funcs/settingsCleanUnusedVolumes.ts | 160 + src/funcs/settingsGetDokployVersion.ts | 137 + src/funcs/settingsGetIp.ts | 137 + src/funcs/settingsGetLogRotateStatus.ts | 137 + src/funcs/settingsGetOpenApiDocument.ts | 137 + src/funcs/settingsHaveActivateRequests.ts | 137 + ...settingsHaveTraefikDashboardPortEnabled.ts | 166 + src/funcs/settingsHealth.ts | 137 + src/funcs/settingsIsCloud.ts | 137 + src/funcs/settingsReadDirectories.ts | 163 + .../settingsReadMiddlewareTraefikConfig.ts | 137 + src/funcs/settingsReadStats.ts | 137 + src/funcs/settingsReadTraefikConfig.ts | 137 + src/funcs/settingsReadTraefikEnv.ts | 163 + src/funcs/settingsReadTraefikFile.ts | 162 + .../settingsReadWebServerTraefikConfig.ts | 137 + src/funcs/settingsReloadServer.ts | 137 + src/funcs/settingsReloadTraefik.ts | 161 + src/funcs/settingsSaveSshPrivateKey.ts | 157 + src/funcs/settingsToggleDashboard.ts | 157 + src/funcs/settingsToggleLogRotate.ts | 157 + src/funcs/settingsToggleRequests.ts | 157 + src/funcs/settingsUpdateDockerCleanup.ts | 157 + .../settingsUpdateMiddlewareTraefikConfig.ts | 158 + src/funcs/settingsUpdateServer.ts | 137 + src/funcs/settingsUpdateTraefikConfig.ts | 157 + src/funcs/settingsUpdateTraefikFile.ts | 157 + .../settingsUpdateWebServerTraefikConfig.ts | 158 + src/funcs/settingsWriteTraefikEnv.ts | 157 + src/funcs/sshKeyGenerate.ts | 156 + src/funcs/sshKeyGet.ts | 160 + src/funcs/sshKeyRemove.ts | 156 + src/funcs/sshKeyUpdate.ts | 156 + src/funcs/sshKeysAll.ts | 137 + src/funcs/sshKeysCreate.ts | 156 + src/funcs/stripeCanCreateMoreServers.ts | 137 + src/funcs/stripeCreateCheckoutSession.ts | 157 + .../stripeCreateCustomerPortalSession.ts | 137 + src/funcs/stripeGetProducts.ts | 137 + src/funcs/userByAuthId.ts | 160 + src/funcs/userByUserId.ts | 160 + src/funcs/userGetAll.ts | 137 + src/hooks/hooks.ts | 132 + src/hooks/index.ts | 6 + src/hooks/registration.ts | 14 + src/hooks/types.ts | 107 + src/index.ts | 9 + src/lib/base64.ts | 37 + src/lib/config.ts | 64 + src/lib/dlv.ts | 53 + src/lib/encodings.ts | 483 + src/lib/env.ts | 41 + src/lib/files.ts | 82 + src/lib/http.ts | 323 + src/lib/is-plain-object.ts | 43 + src/lib/logger.ts | 9 + src/lib/matchers.ts | 352 + src/lib/primitives.ts | 150 + src/lib/retries.ts | 218 + src/lib/schemas.ts | 91 + src/lib/sdks.ts | 406 + src/lib/security.ts | 264 + src/lib/url.ts | 33 + src/models/error.ts | 121 + src/models/errors/dokploydefaulterror.ts | 40 + src/models/errors/dokployerror.ts | 35 + src/models/errors/httpclienterrors.ts | 62 + src/models/errors/index.ts | 9 + src/models/errors/responsevalidationerror.ts | 50 + src/models/errors/sdkvalidationerror.ts | 109 + src/models/index.ts | 6 + .../operations/adminassignpermissions.ts | 112 + .../operations/admincreateuserinvitation.ts | 68 + src/models/operations/admingetuserbytoken.ts | 66 + src/models/operations/adminremoveuser.ts | 66 + .../operations/applicationcleanqueues.ts | 68 + src/models/operations/applicationcreate.ts | 82 + src/models/operations/applicationdelete.ts | 66 + src/models/operations/applicationdeploy.ts | 66 + .../operations/applicationmarkrunning.ts | 68 + src/models/operations/applicationone.ts | 66 + .../applicationreadappmonitoring.ts | 71 + .../applicationreadtraefikconfig.ts | 71 + src/models/operations/applicationredeploy.ts | 66 + .../operations/applicationrefreshtoken.ts | 68 + src/models/operations/applicationreload.ts | 70 + .../applicationsavebitbucketprovider.ts | 97 + .../operations/applicationsavebuildtype.ts | 122 + .../applicationsavedockerprovider.ts | 83 + .../operations/applicationsaveenvironment.ts | 77 + .../applicationsavegithubprovider.ts | 91 + .../applicationsavegitlabprovider.ts | 99 + .../operations/applicationsavegitprodiver.ts | 85 + src/models/operations/applicationstart.ts | 66 + src/models/operations/applicationstop.ts | 66 + src/models/operations/applicationupdate.ts | 1469 +++ .../applicationupdatetraefikconfig.ts | 75 + src/models/operations/authconfirmemail.ts | 66 + src/models/operations/authcreateadmin.ts | 70 + src/models/operations/authcreateuser.ts | 74 + src/models/operations/authlogin.ts | 70 + src/models/operations/authone.ts | 62 + src/models/operations/authresetpassword.ts | 70 + .../operations/authsendresetpasswordemail.ts | 69 + src/models/operations/authupdate.ts | 139 + src/models/operations/authverify2fasetup.ts | 70 + src/models/operations/authverifylogin2fa.ts | 70 + src/models/operations/backupcreate.ts | 130 + .../operations/backupmanualbackupmariadb.ts | 68 + .../operations/backupmanualbackupmongo.ts | 68 + .../operations/backupmanualbackupmysql.ts | 68 + .../operations/backupmanualbackuppostgres.ts | 69 + src/models/operations/backupone.ts | 66 + src/models/operations/backupremove.ts | 66 + src/models/operations/backupupdate.ts | 86 + src/models/operations/bitbucketcreate.ts | 90 + .../bitbucketgetbitbucketbranches.ts | 79 + .../bitbucketgetbitbucketrepositories.ts | 77 + src/models/operations/bitbucketone.ts | 66 + .../operations/bitbuckettestconnection.ts | 76 + src/models/operations/bitbucketupdate.ts | 90 + src/models/operations/certificatescreate.ts | 94 + src/models/operations/certificatesone.ts | 66 + src/models/operations/certificatesremove.ts | 66 + src/models/operations/clusterremoveworker.ts | 66 + src/models/operations/composecleanqueues.ts | 66 + src/models/operations/composecreate.ts | 116 + src/models/operations/composedelete.ts | 66 + src/models/operations/composedeploy.ts | 66 + .../operations/composedeploytemplate.ts | 76 + .../operations/composefetchsourcetype.ts | 68 + .../operations/composegetconvertedcompose.ts | 69 + .../operations/composegetdefaultcommand.ts | 68 + src/models/operations/composeone.ts | 66 + .../operations/composerandomizecompose.ts | 72 + src/models/operations/composeredeploy.ts | 66 + src/models/operations/composerefreshtoken.ts | 66 + src/models/operations/composestop.ts | 66 + src/models/operations/composeupdate.ts | 289 + src/models/operations/deploymentall.ts | 66 + .../operations/deploymentallbycompose.ts | 68 + .../operations/deploymentallbyserver.ts | 68 + src/models/operations/destinationcreate.ts | 90 + src/models/operations/destinationone.ts | 66 + src/models/operations/destinationremove.ts | 66 + .../operations/destinationtestconnection.ts | 92 + src/models/operations/destinationupdate.ts | 94 + src/models/operations/dockergetconfig.ts | 70 + src/models/operations/dockergetcontainers.ts | 66 + .../dockergetcontainersbyapplabel.ts | 75 + .../dockergetcontainersbyappnamematch.ts | 185 + .../operations/dockerrestartcontainer.ts | 68 + .../operations/domainbyapplicationid.ts | 68 + src/models/operations/domainbycomposeid.ts | 66 + src/models/operations/domaincreate.ts | 155 + src/models/operations/domaindelete.ts | 66 + src/models/operations/domaingeneratedomain.ts | 72 + src/models/operations/domainone.ts | 66 + src/models/operations/domainupdate.ts | 151 + .../operations/githubgetgithubbranches.ts | 76 + .../operations/githubgetgithubrepositories.ts | 70 + src/models/operations/githubone.ts | 66 + src/models/operations/githubtestconnection.ts | 68 + src/models/operations/githubupdate.ts | 102 + src/models/operations/gitlabcreate.ts | 106 + .../operations/gitlabgetgitlabbranches.ts | 80 + .../operations/gitlabgetgitlabrepositories.ts | 70 + src/models/operations/gitlabone.ts | 66 + src/models/operations/gitlabtestconnection.ts | 72 + src/models/operations/gitlabupdate.ts | 102 + src/models/operations/gitproviderremove.ts | 66 + src/models/operations/index.ts | 233 + src/models/operations/mariadbchangestatus.ts | 105 + src/models/operations/mariadbcreate.ts | 102 + src/models/operations/mariadbdeploy.ts | 66 + src/models/operations/mariadbone.ts | 66 + src/models/operations/mariadbreload.ts | 70 + src/models/operations/mariadbremove.ts | 66 + .../operations/mariadbsaveenvironment.ts | 72 + .../operations/mariadbsaveexternalport.ts | 72 + src/models/operations/mariadbstart.ts | 66 + src/models/operations/mariadbstop.ts | 66 + src/models/operations/mariadbupdate.ts | 170 + src/models/operations/mongochangestatus.ts | 103 + src/models/operations/mongocreate.ts | 94 + src/models/operations/mongodeploy.ts | 66 + src/models/operations/mongoone.ts | 64 + src/models/operations/mongoreload.ts | 70 + src/models/operations/mongoremove.ts | 66 + src/models/operations/mongosaveenvironment.ts | 72 + .../operations/mongosaveexternalport.ts | 72 + src/models/operations/mongostart.ts | 66 + src/models/operations/mongostop.ts | 66 + src/models/operations/mongoupdate.ts | 162 + src/models/operations/mountscreate.ts | 157 + src/models/operations/mountsone.ts | 66 + src/models/operations/mountsremove.ts | 66 + src/models/operations/mountsupdate.ts | 185 + src/models/operations/mysqlchangestatus.ts | 103 + src/models/operations/mysqlcreate.ts | 102 + src/models/operations/mysqldeploy.ts | 66 + src/models/operations/mysqlone.ts | 64 + src/models/operations/mysqlreload.ts | 70 + src/models/operations/mysqlremove.ts | 66 + src/models/operations/mysqlsaveenvironment.ts | 72 + .../operations/mysqlsaveexternalport.ts | 72 + src/models/operations/mysqlstart.ts | 66 + src/models/operations/mysqlstop.ts | 66 + src/models/operations/mysqlupdate.ts | 170 + .../operations/notificationcreatediscord.ts | 92 + .../operations/notificationcreateemail.ts | 112 + .../operations/notificationcreateslack.ts | 96 + .../operations/notificationcreatetelegram.ts | 97 + src/models/operations/notificationone.ts | 66 + src/models/operations/notificationremove.ts | 66 + .../notificationtestdiscordconnection.ts | 77 + .../notificationtestemailconnection.ts | 92 + .../notificationtestslackconnection.ts | 76 + .../notificationtesttelegramconnection.ts | 82 + .../operations/notificationupdatediscord.ts | 104 + .../operations/notificationupdateemail.ts | 124 + .../operations/notificationupdateslack.ts | 108 + .../operations/notificationupdatetelegram.ts | 109 + src/models/operations/portcreate.ts | 106 + src/models/operations/portdelete.ts | 66 + src/models/operations/portone.ts | 62 + src/models/operations/portupdate.ts | 106 + src/models/operations/postgreschangestatus.ts | 107 + src/models/operations/postgrescreate.ts | 98 + src/models/operations/postgresdeploy.ts | 66 + src/models/operations/postgresone.ts | 66 + src/models/operations/postgresreload.ts | 70 + src/models/operations/postgresremove.ts | 66 + .../operations/postgressaveenvironment.ts | 72 + .../operations/postgressaveexternalport.ts | 72 + src/models/operations/postgresstart.ts | 66 + src/models/operations/postgresstop.ts | 66 + src/models/operations/postgresupdate.ts | 166 + src/models/operations/projectcreate.ts | 70 + src/models/operations/projectone.ts | 66 + src/models/operations/projectremove.ts | 66 + src/models/operations/projectupdate.ts | 74 + src/models/operations/redirectscreate.ts | 78 + src/models/operations/redirectsdelete.ts | 66 + src/models/operations/redirectsone.ts | 66 + src/models/operations/redirectsupdate.ts | 78 + src/models/operations/redischangestatus.ts | 103 + src/models/operations/rediscreate.ts | 90 + src/models/operations/redisdeploy.ts | 66 + src/models/operations/redisone.ts | 64 + src/models/operations/redisreload.ts | 70 + src/models/operations/redisremove.ts | 66 + src/models/operations/redissaveenvironment.ts | 72 + .../operations/redissaveexternalport.ts | 72 + src/models/operations/redisstart.ts | 66 + src/models/operations/redisstop.ts | 66 + src/models/operations/redisupdate.ts | 158 + src/models/operations/registrycreate.ts | 119 + src/models/operations/registryone.ts | 66 + src/models/operations/registryremove.ts | 66 + src/models/operations/registrytestregistry.ts | 121 + src/models/operations/registryupdate.ts | 131 + src/models/operations/securitycreate.ts | 74 + src/models/operations/securitydelete.ts | 66 + src/models/operations/securityone.ts | 66 + src/models/operations/securityupdate.ts | 74 + src/models/operations/servercreate.ts | 86 + src/models/operations/serverone.ts | 66 + src/models/operations/serverremove.ts | 66 + src/models/operations/serversetup.ts | 66 + src/models/operations/serverupdate.ts | 90 + .../operations/settingsassigndomainserver.ts | 111 + src/models/operations/settingscleanall.ts | 66 + .../operations/settingscleandockerbuilder.ts | 69 + .../operations/settingscleandockerprune.ts | 68 + .../settingscleanstoppedcontainers.ts | 71 + .../operations/settingscleanunusedimages.ts | 68 + .../operations/settingscleanunusedvolumes.ts | 69 + ...settingshavetraefikdashboardportenabled.ts | 80 + .../operations/settingsreaddirectories.ts | 68 + .../operations/settingsreadtraefikenv.ts | 68 + .../operations/settingsreadtraefikfile.ts | 72 + .../operations/settingsreloadtraefik.ts | 68 + .../operations/settingssavesshprivatekey.ts | 68 + .../operations/settingstoggledashboard.ts | 72 + .../operations/settingstogglelogrotate.ts | 68 + .../operations/settingstogglerequests.ts | 68 + .../operations/settingsupdatedockercleanup.ts | 74 + .../settingsupdatemiddlewaretraefikconfig.ts | 79 + .../operations/settingsupdatetraefikconfig.ts | 70 + .../operations/settingsupdatetraefikfile.ts | 76 + .../settingsupdatewebservertraefikconfig.ts | 79 + .../operations/settingswritetraefikenv.ts | 72 + src/models/operations/sshkeycreate.ts | 82 + src/models/operations/sshkeygenerate.ts | 94 + src/models/operations/sshkeyone.ts | 66 + src/models/operations/sshkeyremove.ts | 66 + src/models/operations/sshkeyupdate.ts | 78 + .../operations/stripecreatecheckoutsession.ts | 78 + src/models/operations/userbyauthid.ts | 66 + src/models/operations/userbyuserid.ts | 66 + src/models/security.ts | 71 + src/sdk/admin.ts | 68 + src/sdk/application.ts | 274 + src/sdk/auth.ts | 180 + src/sdk/backup.ts | 106 + src/sdk/bitbucket.ts | 92 + src/sdk/certificates.ts | 56 + src/sdk/cluster.ts | 52 + src/sdk/compose.ts | 198 + src/sdk/deployment.ts | 46 + src/sdk/destination.ts | 80 + src/sdk/docker.ts | 70 + src/sdk/domain.ts | 94 + src/sdk/github.ts | 80 + src/sdk/gitlab.ts | 92 + src/sdk/gitprovider.ts | 32 + src/sdk/index.ts | 5 + src/sdk/mariadb.ts | 142 + src/sdk/mongo.ts | 142 + src/sdk/mounts.ts | 58 + src/sdk/mysql.ts | 142 + src/sdk/notification.ts | 176 + src/sdk/notifications.ts | 22 + src/sdk/port.ts | 58 + src/sdk/postgres.ts | 142 + src/sdk/project.ts | 68 + src/sdk/redirects.ts | 58 + src/sdk/redis.ts | 142 + src/sdk/registry.ts | 80 + src/sdk/sdk.ts | 217 + src/sdk/security.ts | 58 + src/sdk/server.ts | 78 + src/sdk/servers.ts | 22 + src/sdk/settings.ts | 436 + src/sdk/sshkey.ts | 58 + src/sdk/sshkeys.ts | 32 + src/sdk/stripe.ts | 52 + src/sdk/user.ts | 44 + src/types/async.ts | 68 + src/types/blobs.ts | 31 + src/types/constdatetime.ts | 15 + src/types/enums.ts | 16 + src/types/fp.ts | 50 + src/types/index.ts | 11 + src/types/operations.ts | 105 + src/types/rfcdate.ts | 54 + src/types/streams.ts | 21 + tsconfig.json | 41 + 928 files changed, 113882 insertions(+) create mode 100644 .devcontainer/README.md create mode 100644 .devcontainer/devcontainer.json create mode 100644 .devcontainer/setup.sh create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 .npmignore create mode 100644 .speakeasy/gen.lock create mode 100644 .speakeasy/gen.yaml create mode 100644 .speakeasy/out.openapi.yaml create mode 100644 .speakeasy/speakeasy-modifications-overlay.yaml create mode 100644 .speakeasy/workflow.lock create mode 100644 .speakeasy/workflow.yaml create mode 100644 CONTRIBUTING.md create mode 100644 FUNCTIONS.md create mode 100644 README.md create mode 100644 RUNTIMES.md create mode 100644 USAGE.md create mode 100644 docs/lib/utils/retryconfig.md create mode 100644 docs/models/errort.md create mode 100644 docs/models/issue.md create mode 100644 docs/models/operations/adminassignpermissionsrequest.md create mode 100644 docs/models/operations/admincreateuserinvitationrequest.md create mode 100644 docs/models/operations/admingetuserbytokenrequest.md create mode 100644 docs/models/operations/adminremoveuserrequest.md create mode 100644 docs/models/operations/applicationcleanqueuesrequest.md create mode 100644 docs/models/operations/applicationcreaterequest.md create mode 100644 docs/models/operations/applicationdeleterequest.md create mode 100644 docs/models/operations/applicationdeployrequest.md create mode 100644 docs/models/operations/applicationmarkrunningrequest.md create mode 100644 docs/models/operations/applicationonerequest.md create mode 100644 docs/models/operations/applicationreadappmonitoringrequest.md create mode 100644 docs/models/operations/applicationreadtraefikconfigrequest.md create mode 100644 docs/models/operations/applicationredeployrequest.md create mode 100644 docs/models/operations/applicationrefreshtokenrequest.md create mode 100644 docs/models/operations/applicationreloadrequest.md create mode 100644 docs/models/operations/applicationsavebitbucketproviderrequest.md create mode 100644 docs/models/operations/applicationsavebuildtypebuildtype.md create mode 100644 docs/models/operations/applicationsavebuildtyperequest.md create mode 100644 docs/models/operations/applicationsavedockerproviderrequest.md create mode 100644 docs/models/operations/applicationsaveenvironmentrequest.md create mode 100644 docs/models/operations/applicationsavegithubproviderrequest.md create mode 100644 docs/models/operations/applicationsavegitlabproviderrequest.md create mode 100644 docs/models/operations/applicationsavegitprodiverrequest.md create mode 100644 docs/models/operations/applicationstartrequest.md create mode 100644 docs/models/operations/applicationstoprequest.md create mode 100644 docs/models/operations/applicationupdateapplicationstatus.md create mode 100644 docs/models/operations/applicationupdatebuildtype.md create mode 100644 docs/models/operations/applicationupdaterequest.md create mode 100644 docs/models/operations/applicationupdatesourcetype.md create mode 100644 docs/models/operations/applicationupdatetraefikconfigrequest.md create mode 100644 docs/models/operations/apptype.md create mode 100644 docs/models/operations/apptypedockercompose.md create mode 100644 docs/models/operations/apptypestack.md create mode 100644 docs/models/operations/authconfirmemailrequest.md create mode 100644 docs/models/operations/authcreateadminrequest.md create mode 100644 docs/models/operations/authcreateuserrequest.md create mode 100644 docs/models/operations/authloginrequest.md create mode 100644 docs/models/operations/authonerequest.md create mode 100644 docs/models/operations/authresetpasswordrequest.md create mode 100644 docs/models/operations/authsendresetpasswordemailrequest.md create mode 100644 docs/models/operations/authupdaterequest.md create mode 100644 docs/models/operations/authverify2fasetuprequest.md create mode 100644 docs/models/operations/authverifylogin2farequest.md create mode 100644 docs/models/operations/backupcreaterequest.md create mode 100644 docs/models/operations/backupmanualbackupmariadbrequest.md create mode 100644 docs/models/operations/backupmanualbackupmongorequest.md create mode 100644 docs/models/operations/backupmanualbackupmysqlrequest.md create mode 100644 docs/models/operations/backupmanualbackuppostgresrequest.md create mode 100644 docs/models/operations/backuponerequest.md create mode 100644 docs/models/operations/backupremoverequest.md create mode 100644 docs/models/operations/backupupdaterequest.md create mode 100644 docs/models/operations/bitbucketcreaterequest.md create mode 100644 docs/models/operations/bitbucketgetbitbucketbranchesrequest.md create mode 100644 docs/models/operations/bitbucketgetbitbucketrepositoriesrequest.md create mode 100644 docs/models/operations/bitbucketonerequest.md create mode 100644 docs/models/operations/bitbuckettestconnectionrequest.md create mode 100644 docs/models/operations/bitbucketupdaterequest.md create mode 100644 docs/models/operations/certificatescreaterequest.md create mode 100644 docs/models/operations/certificatesonerequest.md create mode 100644 docs/models/operations/certificatesremoverequest.md create mode 100644 docs/models/operations/clusterremoveworkerrequest.md create mode 100644 docs/models/operations/composecleanqueuesrequest.md create mode 100644 docs/models/operations/composecreatecomposetype.md create mode 100644 docs/models/operations/composecreaterequest.md create mode 100644 docs/models/operations/composedeleterequest.md create mode 100644 docs/models/operations/composedeployrequest.md create mode 100644 docs/models/operations/composedeploytemplaterequest.md create mode 100644 docs/models/operations/composefetchsourcetyperequest.md create mode 100644 docs/models/operations/composegetconvertedcomposerequest.md create mode 100644 docs/models/operations/composegetdefaultcommandrequest.md create mode 100644 docs/models/operations/composeonerequest.md create mode 100644 docs/models/operations/composerandomizecomposerequest.md create mode 100644 docs/models/operations/composeredeployrequest.md create mode 100644 docs/models/operations/composerefreshtokenrequest.md create mode 100644 docs/models/operations/composestatus.md create mode 100644 docs/models/operations/composestoprequest.md create mode 100644 docs/models/operations/composeupdatecomposetype.md create mode 100644 docs/models/operations/composeupdaterequest.md create mode 100644 docs/models/operations/composeupdatesourcetype.md create mode 100644 docs/models/operations/databasetype.md create mode 100644 docs/models/operations/deploymentallbycomposerequest.md create mode 100644 docs/models/operations/deploymentallbyserverrequest.md create mode 100644 docs/models/operations/deploymentallrequest.md create mode 100644 docs/models/operations/destinationcreaterequest.md create mode 100644 docs/models/operations/destinationonerequest.md create mode 100644 docs/models/operations/destinationremoverequest.md create mode 100644 docs/models/operations/destinationtestconnectionrequest.md create mode 100644 docs/models/operations/destinationupdaterequest.md create mode 100644 docs/models/operations/dockergetconfigrequest.md create mode 100644 docs/models/operations/dockergetcontainersbyapplabelrequest.md create mode 100644 docs/models/operations/dockergetcontainersbyappnamematchrequest.md create mode 100644 docs/models/operations/dockergetcontainersrequest.md create mode 100644 docs/models/operations/dockerrestartcontainerrequest.md create mode 100644 docs/models/operations/domainbyapplicationidrequest.md create mode 100644 docs/models/operations/domainbycomposeidrequest.md create mode 100644 docs/models/operations/domaincreatecertificatetype.md create mode 100644 docs/models/operations/domaincreatedomaintype.md create mode 100644 docs/models/operations/domaincreaterequest.md create mode 100644 docs/models/operations/domaindeleterequest.md create mode 100644 docs/models/operations/domaingeneratedomainrequest.md create mode 100644 docs/models/operations/domainonerequest.md create mode 100644 docs/models/operations/domainupdatecertificatetype.md create mode 100644 docs/models/operations/domainupdatedomaintype.md create mode 100644 docs/models/operations/domainupdaterequest.md create mode 100644 docs/models/operations/driveropts.md create mode 100644 docs/models/operations/githubgetgithubbranchesrequest.md create mode 100644 docs/models/operations/githubgetgithubrepositoriesrequest.md create mode 100644 docs/models/operations/githubonerequest.md create mode 100644 docs/models/operations/githubtestconnectionrequest.md create mode 100644 docs/models/operations/githubupdaterequest.md create mode 100644 docs/models/operations/gitlabcreaterequest.md create mode 100644 docs/models/operations/gitlabgetgitlabbranchesrequest.md create mode 100644 docs/models/operations/gitlabgetgitlabrepositoriesrequest.md create mode 100644 docs/models/operations/gitlabonerequest.md create mode 100644 docs/models/operations/gitlabtestconnectionrequest.md create mode 100644 docs/models/operations/gitlabupdaterequest.md create mode 100644 docs/models/operations/gitproviderremoverequest.md create mode 100644 docs/models/operations/global.md create mode 100644 docs/models/operations/globaljob.md create mode 100644 docs/models/operations/healthcheckswarm.md create mode 100644 docs/models/operations/mariadbchangestatusapplicationstatus.md create mode 100644 docs/models/operations/mariadbchangestatusrequest.md create mode 100644 docs/models/operations/mariadbcreaterequest.md create mode 100644 docs/models/operations/mariadbdeployrequest.md create mode 100644 docs/models/operations/mariadbonerequest.md create mode 100644 docs/models/operations/mariadbreloadrequest.md create mode 100644 docs/models/operations/mariadbremoverequest.md create mode 100644 docs/models/operations/mariadbsaveenvironmentrequest.md create mode 100644 docs/models/operations/mariadbsaveexternalportrequest.md create mode 100644 docs/models/operations/mariadbstartrequest.md create mode 100644 docs/models/operations/mariadbstoprequest.md create mode 100644 docs/models/operations/mariadbupdateapplicationstatus.md create mode 100644 docs/models/operations/mariadbupdaterequest.md create mode 100644 docs/models/operations/modeswarm.md create mode 100644 docs/models/operations/mongochangestatusapplicationstatus.md create mode 100644 docs/models/operations/mongochangestatusrequest.md create mode 100644 docs/models/operations/mongocreaterequest.md create mode 100644 docs/models/operations/mongodeployrequest.md create mode 100644 docs/models/operations/mongoonerequest.md create mode 100644 docs/models/operations/mongoreloadrequest.md create mode 100644 docs/models/operations/mongoremoverequest.md create mode 100644 docs/models/operations/mongosaveenvironmentrequest.md create mode 100644 docs/models/operations/mongosaveexternalportrequest.md create mode 100644 docs/models/operations/mongostartrequest.md create mode 100644 docs/models/operations/mongostoprequest.md create mode 100644 docs/models/operations/mongoupdateapplicationstatus.md create mode 100644 docs/models/operations/mongoupdaterequest.md create mode 100644 docs/models/operations/mountscreaterequest.md create mode 100644 docs/models/operations/mountscreateservicetype.md create mode 100644 docs/models/operations/mountscreatetype.md create mode 100644 docs/models/operations/mountsonerequest.md create mode 100644 docs/models/operations/mountsremoverequest.md create mode 100644 docs/models/operations/mountsupdaterequest.md create mode 100644 docs/models/operations/mountsupdateservicetype.md create mode 100644 docs/models/operations/mountsupdatetype.md create mode 100644 docs/models/operations/mysqlchangestatusapplicationstatus.md create mode 100644 docs/models/operations/mysqlchangestatusrequest.md create mode 100644 docs/models/operations/mysqlcreaterequest.md create mode 100644 docs/models/operations/mysqldeployrequest.md create mode 100644 docs/models/operations/mysqlonerequest.md create mode 100644 docs/models/operations/mysqlreloadrequest.md create mode 100644 docs/models/operations/mysqlremoverequest.md create mode 100644 docs/models/operations/mysqlsaveenvironmentrequest.md create mode 100644 docs/models/operations/mysqlsaveexternalportrequest.md create mode 100644 docs/models/operations/mysqlstartrequest.md create mode 100644 docs/models/operations/mysqlstoprequest.md create mode 100644 docs/models/operations/mysqlupdateapplicationstatus.md create mode 100644 docs/models/operations/mysqlupdaterequest.md create mode 100644 docs/models/operations/networkswarm.md create mode 100644 docs/models/operations/notificationcreatediscordrequest.md create mode 100644 docs/models/operations/notificationcreateemailrequest.md create mode 100644 docs/models/operations/notificationcreateslackrequest.md create mode 100644 docs/models/operations/notificationcreatetelegramrequest.md create mode 100644 docs/models/operations/notificationonerequest.md create mode 100644 docs/models/operations/notificationremoverequest.md create mode 100644 docs/models/operations/notificationtestdiscordconnectionrequest.md create mode 100644 docs/models/operations/notificationtestemailconnectionrequest.md create mode 100644 docs/models/operations/notificationtestslackconnectionrequest.md create mode 100644 docs/models/operations/notificationtesttelegramconnectionrequest.md create mode 100644 docs/models/operations/notificationupdatediscordrequest.md create mode 100644 docs/models/operations/notificationupdateemailrequest.md create mode 100644 docs/models/operations/notificationupdateslackrequest.md create mode 100644 docs/models/operations/notificationupdatetelegramrequest.md create mode 100644 docs/models/operations/placementswarm.md create mode 100644 docs/models/operations/platform.md create mode 100644 docs/models/operations/portcreateprotocol.md create mode 100644 docs/models/operations/portcreaterequest.md create mode 100644 docs/models/operations/portdeleterequest.md create mode 100644 docs/models/operations/portonerequest.md create mode 100644 docs/models/operations/portupdateprotocol.md create mode 100644 docs/models/operations/portupdaterequest.md create mode 100644 docs/models/operations/postgreschangestatusapplicationstatus.md create mode 100644 docs/models/operations/postgreschangestatusrequest.md create mode 100644 docs/models/operations/postgrescreaterequest.md create mode 100644 docs/models/operations/postgresdeployrequest.md create mode 100644 docs/models/operations/postgresonerequest.md create mode 100644 docs/models/operations/postgresreloadrequest.md create mode 100644 docs/models/operations/postgresremoverequest.md create mode 100644 docs/models/operations/postgressaveenvironmentrequest.md create mode 100644 docs/models/operations/postgressaveexternalportrequest.md create mode 100644 docs/models/operations/postgresstartrequest.md create mode 100644 docs/models/operations/postgresstoprequest.md create mode 100644 docs/models/operations/postgresupdateapplicationstatus.md create mode 100644 docs/models/operations/postgresupdaterequest.md create mode 100644 docs/models/operations/preference.md create mode 100644 docs/models/operations/projectcreaterequest.md create mode 100644 docs/models/operations/projectonerequest.md create mode 100644 docs/models/operations/projectremoverequest.md create mode 100644 docs/models/operations/projectupdaterequest.md create mode 100644 docs/models/operations/redirectscreaterequest.md create mode 100644 docs/models/operations/redirectsdeleterequest.md create mode 100644 docs/models/operations/redirectsonerequest.md create mode 100644 docs/models/operations/redirectsupdaterequest.md create mode 100644 docs/models/operations/redischangestatusapplicationstatus.md create mode 100644 docs/models/operations/redischangestatusrequest.md create mode 100644 docs/models/operations/rediscreaterequest.md create mode 100644 docs/models/operations/redisdeployrequest.md create mode 100644 docs/models/operations/redisonerequest.md create mode 100644 docs/models/operations/redisreloadrequest.md create mode 100644 docs/models/operations/redisremoverequest.md create mode 100644 docs/models/operations/redissaveenvironmentrequest.md create mode 100644 docs/models/operations/redissaveexternalportrequest.md create mode 100644 docs/models/operations/redisstartrequest.md create mode 100644 docs/models/operations/redisstoprequest.md create mode 100644 docs/models/operations/redisupdateapplicationstatus.md create mode 100644 docs/models/operations/redisupdaterequest.md create mode 100644 docs/models/operations/registrycreateregistrytype.md create mode 100644 docs/models/operations/registrycreaterequest.md create mode 100644 docs/models/operations/registryonerequest.md create mode 100644 docs/models/operations/registryremoverequest.md create mode 100644 docs/models/operations/registrytestregistryregistrytype.md create mode 100644 docs/models/operations/registrytestregistryrequest.md create mode 100644 docs/models/operations/registryupdateregistrytype.md create mode 100644 docs/models/operations/registryupdaterequest.md create mode 100644 docs/models/operations/replicated.md create mode 100644 docs/models/operations/replicatedjob.md create mode 100644 docs/models/operations/restartpolicyswarm.md create mode 100644 docs/models/operations/rol.md create mode 100644 docs/models/operations/rollbackconfigswarm.md create mode 100644 docs/models/operations/securitycreaterequest.md create mode 100644 docs/models/operations/securitydeleterequest.md create mode 100644 docs/models/operations/securityonerequest.md create mode 100644 docs/models/operations/securityupdaterequest.md create mode 100644 docs/models/operations/servercreaterequest.md create mode 100644 docs/models/operations/serveronerequest.md create mode 100644 docs/models/operations/serverremoverequest.md create mode 100644 docs/models/operations/serversetuprequest.md create mode 100644 docs/models/operations/serverupdaterequest.md create mode 100644 docs/models/operations/settingsassigndomainservercertificatetype.md create mode 100644 docs/models/operations/settingsassigndomainserverrequest.md create mode 100644 docs/models/operations/settingscleanallrequest.md create mode 100644 docs/models/operations/settingscleandockerbuilderrequest.md create mode 100644 docs/models/operations/settingscleandockerprunerequest.md create mode 100644 docs/models/operations/settingscleanstoppedcontainersrequest.md create mode 100644 docs/models/operations/settingscleanunusedimagesrequest.md create mode 100644 docs/models/operations/settingscleanunusedvolumesrequest.md create mode 100644 docs/models/operations/settingshavetraefikdashboardportenabledrequest.md create mode 100644 docs/models/operations/settingsreaddirectoriesrequest.md create mode 100644 docs/models/operations/settingsreadtraefikenvrequest.md create mode 100644 docs/models/operations/settingsreadtraefikfilerequest.md create mode 100644 docs/models/operations/settingsreloadtraefikrequest.md create mode 100644 docs/models/operations/settingssavesshprivatekeyrequest.md create mode 100644 docs/models/operations/settingstoggledashboardrequest.md create mode 100644 docs/models/operations/settingstogglelogrotaterequest.md create mode 100644 docs/models/operations/settingstogglerequestsrequest.md create mode 100644 docs/models/operations/settingsupdatedockercleanuprequest.md create mode 100644 docs/models/operations/settingsupdatemiddlewaretraefikconfigrequest.md create mode 100644 docs/models/operations/settingsupdatetraefikconfigrequest.md create mode 100644 docs/models/operations/settingsupdatetraefikfilerequest.md create mode 100644 docs/models/operations/settingsupdatewebservertraefikconfigrequest.md create mode 100644 docs/models/operations/settingswritetraefikenvrequest.md create mode 100644 docs/models/operations/spread.md create mode 100644 docs/models/operations/sshkeycreaterequest.md create mode 100644 docs/models/operations/sshkeygeneraterequest.md create mode 100644 docs/models/operations/sshkeygeneratetype.md create mode 100644 docs/models/operations/sshkeyonerequest.md create mode 100644 docs/models/operations/sshkeyremoverequest.md create mode 100644 docs/models/operations/sshkeyupdaterequest.md create mode 100644 docs/models/operations/stripecreatecheckoutsessionrequest.md create mode 100644 docs/models/operations/updateconfigswarm.md create mode 100644 docs/models/operations/userbyauthidrequest.md create mode 100644 docs/models/operations/userbyuseridrequest.md create mode 100644 docs/models/security.md create mode 100644 docs/sdks/admin/README.md create mode 100644 docs/sdks/application/README.md create mode 100644 docs/sdks/auth/README.md create mode 100644 docs/sdks/backup/README.md create mode 100644 docs/sdks/bitbucket/README.md create mode 100644 docs/sdks/certificates/README.md create mode 100644 docs/sdks/cluster/README.md create mode 100644 docs/sdks/compose/README.md create mode 100644 docs/sdks/deployment/README.md create mode 100644 docs/sdks/destination/README.md create mode 100644 docs/sdks/docker/README.md create mode 100644 docs/sdks/dokploy/README.md create mode 100644 docs/sdks/domain/README.md create mode 100644 docs/sdks/github/README.md create mode 100644 docs/sdks/gitlab/README.md create mode 100644 docs/sdks/gitprovider/README.md create mode 100644 docs/sdks/mariadb/README.md create mode 100644 docs/sdks/mongo/README.md create mode 100644 docs/sdks/mounts/README.md create mode 100644 docs/sdks/mysql/README.md create mode 100644 docs/sdks/notification/README.md create mode 100644 docs/sdks/notifications/README.md create mode 100644 docs/sdks/port/README.md create mode 100644 docs/sdks/postgres/README.md create mode 100644 docs/sdks/project/README.md create mode 100644 docs/sdks/redirects/README.md create mode 100644 docs/sdks/redis/README.md create mode 100644 docs/sdks/registry/README.md create mode 100644 docs/sdks/security/README.md create mode 100644 docs/sdks/server/README.md create mode 100644 docs/sdks/servers/README.md create mode 100644 docs/sdks/settings/README.md create mode 100644 docs/sdks/sshkey/README.md create mode 100644 docs/sdks/sshkeys/README.md create mode 100644 docs/sdks/stripe/README.md create mode 100644 docs/sdks/user/README.md create mode 100644 eslint.config.mjs create mode 100644 examples/.env.template create mode 100644 examples/README.md create mode 100644 examples/adminGetOne.example.ts create mode 100644 examples/package-lock.json create mode 100644 examples/package.json create mode 100644 jsr.json create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 src/core.ts create mode 100644 src/funcs/adminAssignPermissions.ts create mode 100644 src/funcs/adminCreateUserInvitation.ts create mode 100644 src/funcs/adminGetOne.ts create mode 100644 src/funcs/adminGetUserByToken.ts create mode 100644 src/funcs/adminRemoveUser.ts create mode 100644 src/funcs/applicationCleanQueues.ts create mode 100644 src/funcs/applicationCreate.ts create mode 100644 src/funcs/applicationDelete.ts create mode 100644 src/funcs/applicationDeploy.ts create mode 100644 src/funcs/applicationGetOne.ts create mode 100644 src/funcs/applicationMarkRunning.ts create mode 100644 src/funcs/applicationReadAppMonitoring.ts create mode 100644 src/funcs/applicationReadTraefikConfig.ts create mode 100644 src/funcs/applicationRedeploy.ts create mode 100644 src/funcs/applicationRefreshToken.ts create mode 100644 src/funcs/applicationReload.ts create mode 100644 src/funcs/applicationSaveBitbucketProvider.ts create mode 100644 src/funcs/applicationSaveBuildType.ts create mode 100644 src/funcs/applicationSaveDockerProvider.ts create mode 100644 src/funcs/applicationSaveEnvironment.ts create mode 100644 src/funcs/applicationSaveGitProdiver.ts create mode 100644 src/funcs/applicationSaveGithubProvider.ts create mode 100644 src/funcs/applicationSaveGitlabProvider.ts create mode 100644 src/funcs/applicationStart.ts create mode 100644 src/funcs/applicationStop.ts create mode 100644 src/funcs/applicationUpdate.ts create mode 100644 src/funcs/applicationUpdateTraefikConfig.ts create mode 100644 src/funcs/authConfirmEmail.ts create mode 100644 src/funcs/authCreateAdmin.ts create mode 100644 src/funcs/authCreateUser.ts create mode 100644 src/funcs/authDisable2FA.ts create mode 100644 src/funcs/authGenerate2FASecret.ts create mode 100644 src/funcs/authGenerateToken.ts create mode 100644 src/funcs/authGet.ts create mode 100644 src/funcs/authGetOne.ts create mode 100644 src/funcs/authLogin.ts create mode 100644 src/funcs/authLogout.ts create mode 100644 src/funcs/authResetPassword.ts create mode 100644 src/funcs/authSendResetPasswordEmail.ts create mode 100644 src/funcs/authUpdate.ts create mode 100644 src/funcs/authVerify2faSetup.ts create mode 100644 src/funcs/authVerifyLogin2FA.ts create mode 100644 src/funcs/backupCreate.ts create mode 100644 src/funcs/backupGet.ts create mode 100644 src/funcs/backupManualBackupMariadb.ts create mode 100644 src/funcs/backupManualBackupMongo.ts create mode 100644 src/funcs/backupManualBackupMysql.ts create mode 100644 src/funcs/backupManualBackupPostgres.ts create mode 100644 src/funcs/backupRemove.ts create mode 100644 src/funcs/backupUpdate.ts create mode 100644 src/funcs/bitbucketCreate.ts create mode 100644 src/funcs/bitbucketGet.ts create mode 100644 src/funcs/bitbucketGetBranches.ts create mode 100644 src/funcs/bitbucketGetRepositories.ts create mode 100644 src/funcs/bitbucketProviders.ts create mode 100644 src/funcs/bitbucketTestConnection.ts create mode 100644 src/funcs/bitbucketUpdate.ts create mode 100644 src/funcs/certificatesAll.ts create mode 100644 src/funcs/certificatesCreate.ts create mode 100644 src/funcs/certificatesGet.ts create mode 100644 src/funcs/certificatesRemove.ts create mode 100644 src/funcs/clusterAddManager.ts create mode 100644 src/funcs/clusterAddWorker.ts create mode 100644 src/funcs/clusterGetNodes.ts create mode 100644 src/funcs/clusterRemoveWorker.ts create mode 100644 src/funcs/composeCleanQueues.ts create mode 100644 src/funcs/composeCreate.ts create mode 100644 src/funcs/composeDelete.ts create mode 100644 src/funcs/composeDeploy.ts create mode 100644 src/funcs/composeDeployTemplate.ts create mode 100644 src/funcs/composeFetchSourceType.ts create mode 100644 src/funcs/composeGetConverted.ts create mode 100644 src/funcs/composeGetDefaultCommand.ts create mode 100644 src/funcs/composeGetOne.ts create mode 100644 src/funcs/composeGetTags.ts create mode 100644 src/funcs/composeGetTemplates.ts create mode 100644 src/funcs/composeRandomizeCompose.ts create mode 100644 src/funcs/composeRedeploy.ts create mode 100644 src/funcs/composeRefreshToken.ts create mode 100644 src/funcs/composeStop.ts create mode 100644 src/funcs/composeUpdate.ts create mode 100644 src/funcs/deploymentAllByCompose.ts create mode 100644 src/funcs/deploymentAllByServer.ts create mode 100644 src/funcs/deploymentGet.ts create mode 100644 src/funcs/destinationCreate.ts create mode 100644 src/funcs/destinationGet.ts create mode 100644 src/funcs/destinationGetOne.ts create mode 100644 src/funcs/destinationRemove.ts create mode 100644 src/funcs/destinationTestConnection.ts create mode 100644 src/funcs/destinationUpdate.ts create mode 100644 src/funcs/dockerGetConfig.ts create mode 100644 src/funcs/dockerGetContainers.ts create mode 100644 src/funcs/dockerGetContainersByAppLabel.ts create mode 100644 src/funcs/dockerGetContainersByAppNameMatch.ts create mode 100644 src/funcs/dockerRestartContainer.ts create mode 100644 src/funcs/domainByApplicationId.ts create mode 100644 src/funcs/domainByComposeId.ts create mode 100644 src/funcs/domainCreate.ts create mode 100644 src/funcs/domainDelete.ts create mode 100644 src/funcs/domainGenerateDomain.ts create mode 100644 src/funcs/domainGet.ts create mode 100644 src/funcs/domainUpdate.ts create mode 100644 src/funcs/gitProviderGetAll.ts create mode 100644 src/funcs/gitProviderRemove.ts create mode 100644 src/funcs/githubGetBranches.ts create mode 100644 src/funcs/githubGetProviders.ts create mode 100644 src/funcs/githubGetRepositories.ts create mode 100644 src/funcs/githubOne.ts create mode 100644 src/funcs/githubTestConnection.ts create mode 100644 src/funcs/githubUpdate.ts create mode 100644 src/funcs/gitlabCreate.ts create mode 100644 src/funcs/gitlabGetGitlabBranches.ts create mode 100644 src/funcs/gitlabGetGitlabRepositories.ts create mode 100644 src/funcs/gitlabOne.ts create mode 100644 src/funcs/gitlabProviders.ts create mode 100644 src/funcs/gitlabTestConnection.ts create mode 100644 src/funcs/gitlabUpdate.ts create mode 100644 src/funcs/mariadbChangeStatus.ts create mode 100644 src/funcs/mariadbCreate.ts create mode 100644 src/funcs/mariadbDeploy.ts create mode 100644 src/funcs/mariadbGet.ts create mode 100644 src/funcs/mariadbReload.ts create mode 100644 src/funcs/mariadbRemove.ts create mode 100644 src/funcs/mariadbSaveEnvironment.ts create mode 100644 src/funcs/mariadbSaveExternalPort.ts create mode 100644 src/funcs/mariadbStart.ts create mode 100644 src/funcs/mariadbStop.ts create mode 100644 src/funcs/mariadbUpdate.ts create mode 100644 src/funcs/mongoChangeStatus.ts create mode 100644 src/funcs/mongoCreate.ts create mode 100644 src/funcs/mongoDeploy.ts create mode 100644 src/funcs/mongoGet.ts create mode 100644 src/funcs/mongoReload.ts create mode 100644 src/funcs/mongoRemove.ts create mode 100644 src/funcs/mongoSaveEnvironment.ts create mode 100644 src/funcs/mongoSaveExternalPort.ts create mode 100644 src/funcs/mongoStart.ts create mode 100644 src/funcs/mongoStop.ts create mode 100644 src/funcs/mongoUpdate.ts create mode 100644 src/funcs/mountsCreate.ts create mode 100644 src/funcs/mountsGet.ts create mode 100644 src/funcs/mountsRemove.ts create mode 100644 src/funcs/mountsUpdate.ts create mode 100644 src/funcs/mysqlChangeStatus.ts create mode 100644 src/funcs/mysqlCreate.ts create mode 100644 src/funcs/mysqlDeploy.ts create mode 100644 src/funcs/mysqlGet.ts create mode 100644 src/funcs/mysqlReload.ts create mode 100644 src/funcs/mysqlRemove.ts create mode 100644 src/funcs/mysqlSaveEnvironment.ts create mode 100644 src/funcs/mysqlSaveExternalPort.ts create mode 100644 src/funcs/mysqlStart.ts create mode 100644 src/funcs/mysqlStop.ts create mode 100644 src/funcs/mysqlUpdate.ts create mode 100644 src/funcs/notificationCreateDiscord.ts create mode 100644 src/funcs/notificationCreateEmail.ts create mode 100644 src/funcs/notificationCreateSlack.ts create mode 100644 src/funcs/notificationCreateTelegram.ts create mode 100644 src/funcs/notificationGetAll.ts create mode 100644 src/funcs/notificationRemove.ts create mode 100644 src/funcs/notificationTestDiscordConnection.ts create mode 100644 src/funcs/notificationTestEmailConnection.ts create mode 100644 src/funcs/notificationTestSlackConnection.ts create mode 100644 src/funcs/notificationTestTelegramConnection.ts create mode 100644 src/funcs/notificationUpdateDiscord.ts create mode 100644 src/funcs/notificationUpdateEmail.ts create mode 100644 src/funcs/notificationUpdateSlack.ts create mode 100644 src/funcs/notificationUpdateTelegram.ts create mode 100644 src/funcs/notificationsGet.ts create mode 100644 src/funcs/portCreate.ts create mode 100644 src/funcs/portDelete.ts create mode 100644 src/funcs/portGet.ts create mode 100644 src/funcs/portUpdate.ts create mode 100644 src/funcs/postgresChangeStatus.ts create mode 100644 src/funcs/postgresCreate.ts create mode 100644 src/funcs/postgresDeploy.ts create mode 100644 src/funcs/postgresGet.ts create mode 100644 src/funcs/postgresReload.ts create mode 100644 src/funcs/postgresRemove.ts create mode 100644 src/funcs/postgresSaveEnvironment.ts create mode 100644 src/funcs/postgresSaveExternalPort.ts create mode 100644 src/funcs/postgresStart.ts create mode 100644 src/funcs/postgresStop.ts create mode 100644 src/funcs/postgresUpdate.ts create mode 100644 src/funcs/projectAll.ts create mode 100644 src/funcs/projectCreate.ts create mode 100644 src/funcs/projectGet.ts create mode 100644 src/funcs/projectRemove.ts create mode 100644 src/funcs/projectUpdate.ts create mode 100644 src/funcs/redirectsCreate.ts create mode 100644 src/funcs/redirectsDelete.ts create mode 100644 src/funcs/redirectsGetOne.ts create mode 100644 src/funcs/redirectsUpdate.ts create mode 100644 src/funcs/redisChangeStatus.ts create mode 100644 src/funcs/redisCreate.ts create mode 100644 src/funcs/redisDeploy.ts create mode 100644 src/funcs/redisGet.ts create mode 100644 src/funcs/redisReload.ts create mode 100644 src/funcs/redisRemove.ts create mode 100644 src/funcs/redisSaveEnvironment.ts create mode 100644 src/funcs/redisSaveExternalPort.ts create mode 100644 src/funcs/redisStart.ts create mode 100644 src/funcs/redisStop.ts create mode 100644 src/funcs/redisUpdate.ts create mode 100644 src/funcs/registryCreate.ts create mode 100644 src/funcs/registryGet.ts create mode 100644 src/funcs/registryGetAll.ts create mode 100644 src/funcs/registryRemove.ts create mode 100644 src/funcs/registryTestRegistry.ts create mode 100644 src/funcs/registryUpdate.ts create mode 100644 src/funcs/securityCreate.ts create mode 100644 src/funcs/securityDelete.ts create mode 100644 src/funcs/securityGet.ts create mode 100644 src/funcs/securityUpdate.ts create mode 100644 src/funcs/serverAll.ts create mode 100644 src/funcs/serverCreate.ts create mode 100644 src/funcs/serverRemove.ts create mode 100644 src/funcs/serverSetup.ts create mode 100644 src/funcs/serverUpdate.ts create mode 100644 src/funcs/serverWithSSHKey.ts create mode 100644 src/funcs/serversGet.ts create mode 100644 src/funcs/settingsAssignDomainServer.ts create mode 100644 src/funcs/settingsCheckAndUpdateImage.ts create mode 100644 src/funcs/settingsCleanAll.ts create mode 100644 src/funcs/settingsCleanDockerBuilder.ts create mode 100644 src/funcs/settingsCleanDockerPrune.ts create mode 100644 src/funcs/settingsCleanMonitoring.ts create mode 100644 src/funcs/settingsCleanSshPrivateKey.ts create mode 100644 src/funcs/settingsCleanStoppedContainers.ts create mode 100644 src/funcs/settingsCleanUnusedImages.ts create mode 100644 src/funcs/settingsCleanUnusedVolumes.ts create mode 100644 src/funcs/settingsGetDokployVersion.ts create mode 100644 src/funcs/settingsGetIp.ts create mode 100644 src/funcs/settingsGetLogRotateStatus.ts create mode 100644 src/funcs/settingsGetOpenApiDocument.ts create mode 100644 src/funcs/settingsHaveActivateRequests.ts create mode 100644 src/funcs/settingsHaveTraefikDashboardPortEnabled.ts create mode 100644 src/funcs/settingsHealth.ts create mode 100644 src/funcs/settingsIsCloud.ts create mode 100644 src/funcs/settingsReadDirectories.ts create mode 100644 src/funcs/settingsReadMiddlewareTraefikConfig.ts create mode 100644 src/funcs/settingsReadStats.ts create mode 100644 src/funcs/settingsReadTraefikConfig.ts create mode 100644 src/funcs/settingsReadTraefikEnv.ts create mode 100644 src/funcs/settingsReadTraefikFile.ts create mode 100644 src/funcs/settingsReadWebServerTraefikConfig.ts create mode 100644 src/funcs/settingsReloadServer.ts create mode 100644 src/funcs/settingsReloadTraefik.ts create mode 100644 src/funcs/settingsSaveSshPrivateKey.ts create mode 100644 src/funcs/settingsToggleDashboard.ts create mode 100644 src/funcs/settingsToggleLogRotate.ts create mode 100644 src/funcs/settingsToggleRequests.ts create mode 100644 src/funcs/settingsUpdateDockerCleanup.ts create mode 100644 src/funcs/settingsUpdateMiddlewareTraefikConfig.ts create mode 100644 src/funcs/settingsUpdateServer.ts create mode 100644 src/funcs/settingsUpdateTraefikConfig.ts create mode 100644 src/funcs/settingsUpdateTraefikFile.ts create mode 100644 src/funcs/settingsUpdateWebServerTraefikConfig.ts create mode 100644 src/funcs/settingsWriteTraefikEnv.ts create mode 100644 src/funcs/sshKeyGenerate.ts create mode 100644 src/funcs/sshKeyGet.ts create mode 100644 src/funcs/sshKeyRemove.ts create mode 100644 src/funcs/sshKeyUpdate.ts create mode 100644 src/funcs/sshKeysAll.ts create mode 100644 src/funcs/sshKeysCreate.ts create mode 100644 src/funcs/stripeCanCreateMoreServers.ts create mode 100644 src/funcs/stripeCreateCheckoutSession.ts create mode 100644 src/funcs/stripeCreateCustomerPortalSession.ts create mode 100644 src/funcs/stripeGetProducts.ts create mode 100644 src/funcs/userByAuthId.ts create mode 100644 src/funcs/userByUserId.ts create mode 100644 src/funcs/userGetAll.ts create mode 100644 src/hooks/hooks.ts create mode 100644 src/hooks/index.ts create mode 100644 src/hooks/registration.ts create mode 100644 src/hooks/types.ts create mode 100644 src/index.ts create mode 100644 src/lib/base64.ts create mode 100644 src/lib/config.ts create mode 100644 src/lib/dlv.ts create mode 100644 src/lib/encodings.ts create mode 100644 src/lib/env.ts create mode 100644 src/lib/files.ts create mode 100644 src/lib/http.ts create mode 100644 src/lib/is-plain-object.ts create mode 100644 src/lib/logger.ts create mode 100644 src/lib/matchers.ts create mode 100644 src/lib/primitives.ts create mode 100644 src/lib/retries.ts create mode 100644 src/lib/schemas.ts create mode 100644 src/lib/sdks.ts create mode 100644 src/lib/security.ts create mode 100644 src/lib/url.ts create mode 100644 src/models/error.ts create mode 100644 src/models/errors/dokploydefaulterror.ts create mode 100644 src/models/errors/dokployerror.ts create mode 100644 src/models/errors/httpclienterrors.ts create mode 100644 src/models/errors/index.ts create mode 100644 src/models/errors/responsevalidationerror.ts create mode 100644 src/models/errors/sdkvalidationerror.ts create mode 100644 src/models/index.ts create mode 100644 src/models/operations/adminassignpermissions.ts create mode 100644 src/models/operations/admincreateuserinvitation.ts create mode 100644 src/models/operations/admingetuserbytoken.ts create mode 100644 src/models/operations/adminremoveuser.ts create mode 100644 src/models/operations/applicationcleanqueues.ts create mode 100644 src/models/operations/applicationcreate.ts create mode 100644 src/models/operations/applicationdelete.ts create mode 100644 src/models/operations/applicationdeploy.ts create mode 100644 src/models/operations/applicationmarkrunning.ts create mode 100644 src/models/operations/applicationone.ts create mode 100644 src/models/operations/applicationreadappmonitoring.ts create mode 100644 src/models/operations/applicationreadtraefikconfig.ts create mode 100644 src/models/operations/applicationredeploy.ts create mode 100644 src/models/operations/applicationrefreshtoken.ts create mode 100644 src/models/operations/applicationreload.ts create mode 100644 src/models/operations/applicationsavebitbucketprovider.ts create mode 100644 src/models/operations/applicationsavebuildtype.ts create mode 100644 src/models/operations/applicationsavedockerprovider.ts create mode 100644 src/models/operations/applicationsaveenvironment.ts create mode 100644 src/models/operations/applicationsavegithubprovider.ts create mode 100644 src/models/operations/applicationsavegitlabprovider.ts create mode 100644 src/models/operations/applicationsavegitprodiver.ts create mode 100644 src/models/operations/applicationstart.ts create mode 100644 src/models/operations/applicationstop.ts create mode 100644 src/models/operations/applicationupdate.ts create mode 100644 src/models/operations/applicationupdatetraefikconfig.ts create mode 100644 src/models/operations/authconfirmemail.ts create mode 100644 src/models/operations/authcreateadmin.ts create mode 100644 src/models/operations/authcreateuser.ts create mode 100644 src/models/operations/authlogin.ts create mode 100644 src/models/operations/authone.ts create mode 100644 src/models/operations/authresetpassword.ts create mode 100644 src/models/operations/authsendresetpasswordemail.ts create mode 100644 src/models/operations/authupdate.ts create mode 100644 src/models/operations/authverify2fasetup.ts create mode 100644 src/models/operations/authverifylogin2fa.ts create mode 100644 src/models/operations/backupcreate.ts create mode 100644 src/models/operations/backupmanualbackupmariadb.ts create mode 100644 src/models/operations/backupmanualbackupmongo.ts create mode 100644 src/models/operations/backupmanualbackupmysql.ts create mode 100644 src/models/operations/backupmanualbackuppostgres.ts create mode 100644 src/models/operations/backupone.ts create mode 100644 src/models/operations/backupremove.ts create mode 100644 src/models/operations/backupupdate.ts create mode 100644 src/models/operations/bitbucketcreate.ts create mode 100644 src/models/operations/bitbucketgetbitbucketbranches.ts create mode 100644 src/models/operations/bitbucketgetbitbucketrepositories.ts create mode 100644 src/models/operations/bitbucketone.ts create mode 100644 src/models/operations/bitbuckettestconnection.ts create mode 100644 src/models/operations/bitbucketupdate.ts create mode 100644 src/models/operations/certificatescreate.ts create mode 100644 src/models/operations/certificatesone.ts create mode 100644 src/models/operations/certificatesremove.ts create mode 100644 src/models/operations/clusterremoveworker.ts create mode 100644 src/models/operations/composecleanqueues.ts create mode 100644 src/models/operations/composecreate.ts create mode 100644 src/models/operations/composedelete.ts create mode 100644 src/models/operations/composedeploy.ts create mode 100644 src/models/operations/composedeploytemplate.ts create mode 100644 src/models/operations/composefetchsourcetype.ts create mode 100644 src/models/operations/composegetconvertedcompose.ts create mode 100644 src/models/operations/composegetdefaultcommand.ts create mode 100644 src/models/operations/composeone.ts create mode 100644 src/models/operations/composerandomizecompose.ts create mode 100644 src/models/operations/composeredeploy.ts create mode 100644 src/models/operations/composerefreshtoken.ts create mode 100644 src/models/operations/composestop.ts create mode 100644 src/models/operations/composeupdate.ts create mode 100644 src/models/operations/deploymentall.ts create mode 100644 src/models/operations/deploymentallbycompose.ts create mode 100644 src/models/operations/deploymentallbyserver.ts create mode 100644 src/models/operations/destinationcreate.ts create mode 100644 src/models/operations/destinationone.ts create mode 100644 src/models/operations/destinationremove.ts create mode 100644 src/models/operations/destinationtestconnection.ts create mode 100644 src/models/operations/destinationupdate.ts create mode 100644 src/models/operations/dockergetconfig.ts create mode 100644 src/models/operations/dockergetcontainers.ts create mode 100644 src/models/operations/dockergetcontainersbyapplabel.ts create mode 100644 src/models/operations/dockergetcontainersbyappnamematch.ts create mode 100644 src/models/operations/dockerrestartcontainer.ts create mode 100644 src/models/operations/domainbyapplicationid.ts create mode 100644 src/models/operations/domainbycomposeid.ts create mode 100644 src/models/operations/domaincreate.ts create mode 100644 src/models/operations/domaindelete.ts create mode 100644 src/models/operations/domaingeneratedomain.ts create mode 100644 src/models/operations/domainone.ts create mode 100644 src/models/operations/domainupdate.ts create mode 100644 src/models/operations/githubgetgithubbranches.ts create mode 100644 src/models/operations/githubgetgithubrepositories.ts create mode 100644 src/models/operations/githubone.ts create mode 100644 src/models/operations/githubtestconnection.ts create mode 100644 src/models/operations/githubupdate.ts create mode 100644 src/models/operations/gitlabcreate.ts create mode 100644 src/models/operations/gitlabgetgitlabbranches.ts create mode 100644 src/models/operations/gitlabgetgitlabrepositories.ts create mode 100644 src/models/operations/gitlabone.ts create mode 100644 src/models/operations/gitlabtestconnection.ts create mode 100644 src/models/operations/gitlabupdate.ts create mode 100644 src/models/operations/gitproviderremove.ts create mode 100644 src/models/operations/index.ts create mode 100644 src/models/operations/mariadbchangestatus.ts create mode 100644 src/models/operations/mariadbcreate.ts create mode 100644 src/models/operations/mariadbdeploy.ts create mode 100644 src/models/operations/mariadbone.ts create mode 100644 src/models/operations/mariadbreload.ts create mode 100644 src/models/operations/mariadbremove.ts create mode 100644 src/models/operations/mariadbsaveenvironment.ts create mode 100644 src/models/operations/mariadbsaveexternalport.ts create mode 100644 src/models/operations/mariadbstart.ts create mode 100644 src/models/operations/mariadbstop.ts create mode 100644 src/models/operations/mariadbupdate.ts create mode 100644 src/models/operations/mongochangestatus.ts create mode 100644 src/models/operations/mongocreate.ts create mode 100644 src/models/operations/mongodeploy.ts create mode 100644 src/models/operations/mongoone.ts create mode 100644 src/models/operations/mongoreload.ts create mode 100644 src/models/operations/mongoremove.ts create mode 100644 src/models/operations/mongosaveenvironment.ts create mode 100644 src/models/operations/mongosaveexternalport.ts create mode 100644 src/models/operations/mongostart.ts create mode 100644 src/models/operations/mongostop.ts create mode 100644 src/models/operations/mongoupdate.ts create mode 100644 src/models/operations/mountscreate.ts create mode 100644 src/models/operations/mountsone.ts create mode 100644 src/models/operations/mountsremove.ts create mode 100644 src/models/operations/mountsupdate.ts create mode 100644 src/models/operations/mysqlchangestatus.ts create mode 100644 src/models/operations/mysqlcreate.ts create mode 100644 src/models/operations/mysqldeploy.ts create mode 100644 src/models/operations/mysqlone.ts create mode 100644 src/models/operations/mysqlreload.ts create mode 100644 src/models/operations/mysqlremove.ts create mode 100644 src/models/operations/mysqlsaveenvironment.ts create mode 100644 src/models/operations/mysqlsaveexternalport.ts create mode 100644 src/models/operations/mysqlstart.ts create mode 100644 src/models/operations/mysqlstop.ts create mode 100644 src/models/operations/mysqlupdate.ts create mode 100644 src/models/operations/notificationcreatediscord.ts create mode 100644 src/models/operations/notificationcreateemail.ts create mode 100644 src/models/operations/notificationcreateslack.ts create mode 100644 src/models/operations/notificationcreatetelegram.ts create mode 100644 src/models/operations/notificationone.ts create mode 100644 src/models/operations/notificationremove.ts create mode 100644 src/models/operations/notificationtestdiscordconnection.ts create mode 100644 src/models/operations/notificationtestemailconnection.ts create mode 100644 src/models/operations/notificationtestslackconnection.ts create mode 100644 src/models/operations/notificationtesttelegramconnection.ts create mode 100644 src/models/operations/notificationupdatediscord.ts create mode 100644 src/models/operations/notificationupdateemail.ts create mode 100644 src/models/operations/notificationupdateslack.ts create mode 100644 src/models/operations/notificationupdatetelegram.ts create mode 100644 src/models/operations/portcreate.ts create mode 100644 src/models/operations/portdelete.ts create mode 100644 src/models/operations/portone.ts create mode 100644 src/models/operations/portupdate.ts create mode 100644 src/models/operations/postgreschangestatus.ts create mode 100644 src/models/operations/postgrescreate.ts create mode 100644 src/models/operations/postgresdeploy.ts create mode 100644 src/models/operations/postgresone.ts create mode 100644 src/models/operations/postgresreload.ts create mode 100644 src/models/operations/postgresremove.ts create mode 100644 src/models/operations/postgressaveenvironment.ts create mode 100644 src/models/operations/postgressaveexternalport.ts create mode 100644 src/models/operations/postgresstart.ts create mode 100644 src/models/operations/postgresstop.ts create mode 100644 src/models/operations/postgresupdate.ts create mode 100644 src/models/operations/projectcreate.ts create mode 100644 src/models/operations/projectone.ts create mode 100644 src/models/operations/projectremove.ts create mode 100644 src/models/operations/projectupdate.ts create mode 100644 src/models/operations/redirectscreate.ts create mode 100644 src/models/operations/redirectsdelete.ts create mode 100644 src/models/operations/redirectsone.ts create mode 100644 src/models/operations/redirectsupdate.ts create mode 100644 src/models/operations/redischangestatus.ts create mode 100644 src/models/operations/rediscreate.ts create mode 100644 src/models/operations/redisdeploy.ts create mode 100644 src/models/operations/redisone.ts create mode 100644 src/models/operations/redisreload.ts create mode 100644 src/models/operations/redisremove.ts create mode 100644 src/models/operations/redissaveenvironment.ts create mode 100644 src/models/operations/redissaveexternalport.ts create mode 100644 src/models/operations/redisstart.ts create mode 100644 src/models/operations/redisstop.ts create mode 100644 src/models/operations/redisupdate.ts create mode 100644 src/models/operations/registrycreate.ts create mode 100644 src/models/operations/registryone.ts create mode 100644 src/models/operations/registryremove.ts create mode 100644 src/models/operations/registrytestregistry.ts create mode 100644 src/models/operations/registryupdate.ts create mode 100644 src/models/operations/securitycreate.ts create mode 100644 src/models/operations/securitydelete.ts create mode 100644 src/models/operations/securityone.ts create mode 100644 src/models/operations/securityupdate.ts create mode 100644 src/models/operations/servercreate.ts create mode 100644 src/models/operations/serverone.ts create mode 100644 src/models/operations/serverremove.ts create mode 100644 src/models/operations/serversetup.ts create mode 100644 src/models/operations/serverupdate.ts create mode 100644 src/models/operations/settingsassigndomainserver.ts create mode 100644 src/models/operations/settingscleanall.ts create mode 100644 src/models/operations/settingscleandockerbuilder.ts create mode 100644 src/models/operations/settingscleandockerprune.ts create mode 100644 src/models/operations/settingscleanstoppedcontainers.ts create mode 100644 src/models/operations/settingscleanunusedimages.ts create mode 100644 src/models/operations/settingscleanunusedvolumes.ts create mode 100644 src/models/operations/settingshavetraefikdashboardportenabled.ts create mode 100644 src/models/operations/settingsreaddirectories.ts create mode 100644 src/models/operations/settingsreadtraefikenv.ts create mode 100644 src/models/operations/settingsreadtraefikfile.ts create mode 100644 src/models/operations/settingsreloadtraefik.ts create mode 100644 src/models/operations/settingssavesshprivatekey.ts create mode 100644 src/models/operations/settingstoggledashboard.ts create mode 100644 src/models/operations/settingstogglelogrotate.ts create mode 100644 src/models/operations/settingstogglerequests.ts create mode 100644 src/models/operations/settingsupdatedockercleanup.ts create mode 100644 src/models/operations/settingsupdatemiddlewaretraefikconfig.ts create mode 100644 src/models/operations/settingsupdatetraefikconfig.ts create mode 100644 src/models/operations/settingsupdatetraefikfile.ts create mode 100644 src/models/operations/settingsupdatewebservertraefikconfig.ts create mode 100644 src/models/operations/settingswritetraefikenv.ts create mode 100644 src/models/operations/sshkeycreate.ts create mode 100644 src/models/operations/sshkeygenerate.ts create mode 100644 src/models/operations/sshkeyone.ts create mode 100644 src/models/operations/sshkeyremove.ts create mode 100644 src/models/operations/sshkeyupdate.ts create mode 100644 src/models/operations/stripecreatecheckoutsession.ts create mode 100644 src/models/operations/userbyauthid.ts create mode 100644 src/models/operations/userbyuserid.ts create mode 100644 src/models/security.ts create mode 100644 src/sdk/admin.ts create mode 100644 src/sdk/application.ts create mode 100644 src/sdk/auth.ts create mode 100644 src/sdk/backup.ts create mode 100644 src/sdk/bitbucket.ts create mode 100644 src/sdk/certificates.ts create mode 100644 src/sdk/cluster.ts create mode 100644 src/sdk/compose.ts create mode 100644 src/sdk/deployment.ts create mode 100644 src/sdk/destination.ts create mode 100644 src/sdk/docker.ts create mode 100644 src/sdk/domain.ts create mode 100644 src/sdk/github.ts create mode 100644 src/sdk/gitlab.ts create mode 100644 src/sdk/gitprovider.ts create mode 100644 src/sdk/index.ts create mode 100644 src/sdk/mariadb.ts create mode 100644 src/sdk/mongo.ts create mode 100644 src/sdk/mounts.ts create mode 100644 src/sdk/mysql.ts create mode 100644 src/sdk/notification.ts create mode 100644 src/sdk/notifications.ts create mode 100644 src/sdk/port.ts create mode 100644 src/sdk/postgres.ts create mode 100644 src/sdk/project.ts create mode 100644 src/sdk/redirects.ts create mode 100644 src/sdk/redis.ts create mode 100644 src/sdk/registry.ts create mode 100644 src/sdk/sdk.ts create mode 100644 src/sdk/security.ts create mode 100644 src/sdk/server.ts create mode 100644 src/sdk/servers.ts create mode 100644 src/sdk/settings.ts create mode 100644 src/sdk/sshkey.ts create mode 100644 src/sdk/sshkeys.ts create mode 100644 src/sdk/stripe.ts create mode 100644 src/sdk/user.ts create mode 100644 src/types/async.ts create mode 100644 src/types/blobs.ts create mode 100644 src/types/constdatetime.ts create mode 100644 src/types/enums.ts create mode 100644 src/types/fp.ts create mode 100644 src/types/index.ts create mode 100644 src/types/operations.ts create mode 100644 src/types/rfcdate.ts create mode 100644 src/types/streams.ts create mode 100644 tsconfig.json diff --git a/.devcontainer/README.md b/.devcontainer/README.md new file mode 100644 index 0000000..cdef18c --- /dev/null +++ b/.devcontainer/README.md @@ -0,0 +1,30 @@ + +> **Remember to shutdown a GitHub Codespace when it is not in use!** + +# Dev Containers Quick Start + +The default location for usage snippets is the `samples` directory. + +## Running a Usage Sample + +A sample usage example has been provided in a `root.ts` file. As you work with the SDK, it's expected that you will modify these samples to fit your needs. To execute this particular snippet, use the command below. + +``` +ts-node root.ts +``` + +## Generating Additional Usage Samples + +The speakeasy CLI allows you to generate more usage snippets. Here's how: + +- To generate a sample for a specific operation by providing an operation ID, use: + +``` +speakeasy generate usage -s .speakeasy/out.openapi.yaml -l typescript -i {INPUT_OPERATION_ID} -o ./samples +``` + +- To generate samples for an entire namespace (like a tag or group name), use: + +``` +speakeasy generate usage -s .speakeasy/out.openapi.yaml -l typescript -n {INPUT_TAG_NAME} -o ./samples +``` diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..4d560dd --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,45 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/images/tree/main/src/typescript-node +{ + "name": "TypeScript", + "image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye", + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "sudo chmod +x ./.devcontainer/setup.sh && ./.devcontainer/setup.sh", + "customizations": { + "vscode": { + "extensions": [ + "ms-vscode.vscode-typescript-tslint-plugin", + "esbenp.prettier-vscode", + "github.vscode-pull-request-github" + ], + "settings": { + "files.eol": "\n", + "editor.formatOnSave": true, + "typescript.tsc.autoDetect": "on", + "typescript.updateImportsOnFileMove.enabled": "always", + "typescript.preferences.importModuleSpecifier": "relative", + "[typescript]": { + "editor.codeActionsOnSave": { + "source.organizeImports": true + } + }, + "[typescriptreact]": { + "editor.codeActionsOnSave": { + "source.organizeImports": true + } + } + } + }, + "codespaces": { + "openFiles": [ + ".devcontainer/README.md" + ] + } + } + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh new file mode 100644 index 0000000..eb4e7ad --- /dev/null +++ b/.devcontainer/setup.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# Install the speakeasy CLI +curl -fsSL https://raw.githubusercontent.com/speakeasy-api/speakeasy/main/install.sh | sh + +# Setup samples directory +rmdir samples || true +mkdir samples + +npm install --ignore-scripts +npm install -g ts-node --ignore-scripts +npm link +npm link dokploy +TS_CONFIG_CONTENT=$(cat < samples/tsconfig.json + +# Generate starter usage sample with speakeasy +speakeasy generate usage -s .speakeasy/out.openapi.yaml -l typescript -o samples/root.ts \ No newline at end of file diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..113eead --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# This allows generated code to be indexed correctly +*.ts linguist-generated=false \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f9a3f76 --- /dev/null +++ b/.gitignore @@ -0,0 +1,30 @@ +/models +/models/errors +/types +/node_modules +/examples/node_modules +/lib +/sdk +/funcs +/react-query +/mcp-server +/hooks +/index.* +/core.* +/bin +/cjs +/esm +/dist +/.tsbuildinfo +/.eslintcache +/.tshy +/.tshy-* +/__tests__ +.DS_Store +**/.speakeasy/temp/ +**/.speakeasy/logs/ +.DS_Store +/.speakeasy/reports +.env +.env.local +.env.*.local diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..cf98a6b --- /dev/null +++ b/.npmignore @@ -0,0 +1,15 @@ +**/* +!/FUNCTIONS.md +!/RUNTIMES.md +!/REACT_QUERY.md +!/**/*.ts +!/**/*.js +!/**/*.mjs +!/**/*.json +!/**/*.map + +/eslint.config.mjs +/cjs +/.tshy +/.tshy-* +/__tests__ diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock new file mode 100644 index 0000000..fff888b --- /dev/null +++ b/.speakeasy/gen.lock @@ -0,0 +1,2794 @@ +lockVersion: 2.0.0 +id: ff998d2f-a70c-4fe1-bec9-f5bb79308b4a +management: + docChecksum: 57b0e09d5d900be8470e4c655d27d5b8 + docVersion: 1.0.0 + speakeasyVersion: 1.630.0 + generationVersion: 2.716.10 + releaseVersion: 0.1.2 + configChecksum: 42a354977b7c236d1a223d78ecdcc936 +features: + typescript: + additionalDependencies: 0.1.0 + constsAndDefaults: 0.1.12 + core: 3.21.25 + defaultEnabledRetries: 0.1.0 + devContainers: 2.90.1 + enumUnions: 0.1.0 + envVarSecurityUsage: 0.1.2 + globalSecurity: 2.82.14 + globalSecurityCallbacks: 0.1.0 + globalSecurityFlattening: 0.1.0 + globalServerURLs: 2.82.5 + groups: 2.81.2 + methodArguments: 0.1.2 + nameOverrides: 2.81.2 + nullables: 0.1.1 + responseFormat: 0.2.3 + retries: 2.83.0 + sdkHooks: 0.3.0 + unions: 2.85.12 +generatedFiles: + - .devcontainer/README.md + - .devcontainer/devcontainer.json + - .devcontainer/setup.sh + - .gitattributes + - .npmignore + - FUNCTIONS.md + - RUNTIMES.md + - USAGE.md + - docs/lib/utils/retryconfig.md + - docs/models/errort.md + - docs/models/issue.md + - docs/models/operations/adminassignpermissionsrequest.md + - docs/models/operations/admincreateuserinvitationrequest.md + - docs/models/operations/admingetuserbytokenrequest.md + - docs/models/operations/adminremoveuserrequest.md + - docs/models/operations/applicationcleanqueuesrequest.md + - docs/models/operations/applicationcreaterequest.md + - docs/models/operations/applicationdeleterequest.md + - docs/models/operations/applicationdeployrequest.md + - docs/models/operations/applicationmarkrunningrequest.md + - docs/models/operations/applicationonerequest.md + - docs/models/operations/applicationreadappmonitoringrequest.md + - docs/models/operations/applicationreadtraefikconfigrequest.md + - docs/models/operations/applicationredeployrequest.md + - docs/models/operations/applicationrefreshtokenrequest.md + - docs/models/operations/applicationreloadrequest.md + - docs/models/operations/applicationsavebitbucketproviderrequest.md + - docs/models/operations/applicationsavebuildtypebuildtype.md + - docs/models/operations/applicationsavebuildtyperequest.md + - docs/models/operations/applicationsavedockerproviderrequest.md + - docs/models/operations/applicationsaveenvironmentrequest.md + - docs/models/operations/applicationsavegithubproviderrequest.md + - docs/models/operations/applicationsavegitlabproviderrequest.md + - docs/models/operations/applicationsavegitprodiverrequest.md + - docs/models/operations/applicationstartrequest.md + - docs/models/operations/applicationstoprequest.md + - docs/models/operations/applicationupdateapplicationstatus.md + - docs/models/operations/applicationupdatebuildtype.md + - docs/models/operations/applicationupdaterequest.md + - docs/models/operations/applicationupdatesourcetype.md + - docs/models/operations/applicationupdatetraefikconfigrequest.md + - docs/models/operations/apptype.md + - docs/models/operations/apptypedockercompose.md + - docs/models/operations/apptypestack.md + - docs/models/operations/authconfirmemailrequest.md + - docs/models/operations/authcreateadminrequest.md + - docs/models/operations/authcreateuserrequest.md + - docs/models/operations/authloginrequest.md + - docs/models/operations/authonerequest.md + - docs/models/operations/authresetpasswordrequest.md + - docs/models/operations/authsendresetpasswordemailrequest.md + - docs/models/operations/authupdaterequest.md + - docs/models/operations/authverify2fasetuprequest.md + - docs/models/operations/authverifylogin2farequest.md + - docs/models/operations/backupcreaterequest.md + - docs/models/operations/backupmanualbackupmariadbrequest.md + - docs/models/operations/backupmanualbackupmongorequest.md + - docs/models/operations/backupmanualbackupmysqlrequest.md + - docs/models/operations/backupmanualbackuppostgresrequest.md + - docs/models/operations/backuponerequest.md + - docs/models/operations/backupremoverequest.md + - docs/models/operations/backupupdaterequest.md + - docs/models/operations/bitbucketcreaterequest.md + - docs/models/operations/bitbucketgetbitbucketbranchesrequest.md + - docs/models/operations/bitbucketgetbitbucketrepositoriesrequest.md + - docs/models/operations/bitbucketonerequest.md + - docs/models/operations/bitbuckettestconnectionrequest.md + - docs/models/operations/bitbucketupdaterequest.md + - docs/models/operations/certificatescreaterequest.md + - docs/models/operations/certificatesonerequest.md + - docs/models/operations/certificatesremoverequest.md + - docs/models/operations/clusterremoveworkerrequest.md + - docs/models/operations/composecleanqueuesrequest.md + - docs/models/operations/composecreatecomposetype.md + - docs/models/operations/composecreaterequest.md + - docs/models/operations/composedeleterequest.md + - docs/models/operations/composedeployrequest.md + - docs/models/operations/composedeploytemplaterequest.md + - docs/models/operations/composefetchsourcetyperequest.md + - docs/models/operations/composegetconvertedcomposerequest.md + - docs/models/operations/composegetdefaultcommandrequest.md + - docs/models/operations/composeonerequest.md + - docs/models/operations/composerandomizecomposerequest.md + - docs/models/operations/composeredeployrequest.md + - docs/models/operations/composerefreshtokenrequest.md + - docs/models/operations/composestatus.md + - docs/models/operations/composestoprequest.md + - docs/models/operations/composeupdatecomposetype.md + - docs/models/operations/composeupdaterequest.md + - docs/models/operations/composeupdatesourcetype.md + - docs/models/operations/databasetype.md + - docs/models/operations/deploymentallbycomposerequest.md + - docs/models/operations/deploymentallbyserverrequest.md + - docs/models/operations/deploymentallrequest.md + - docs/models/operations/destinationcreaterequest.md + - docs/models/operations/destinationonerequest.md + - docs/models/operations/destinationremoverequest.md + - docs/models/operations/destinationtestconnectionrequest.md + - docs/models/operations/destinationupdaterequest.md + - docs/models/operations/dockergetconfigrequest.md + - docs/models/operations/dockergetcontainersbyapplabelrequest.md + - docs/models/operations/dockergetcontainersbyappnamematchrequest.md + - docs/models/operations/dockergetcontainersrequest.md + - docs/models/operations/dockerrestartcontainerrequest.md + - docs/models/operations/domainbyapplicationidrequest.md + - docs/models/operations/domainbycomposeidrequest.md + - docs/models/operations/domaincreatecertificatetype.md + - docs/models/operations/domaincreatedomaintype.md + - docs/models/operations/domaincreaterequest.md + - docs/models/operations/domaindeleterequest.md + - docs/models/operations/domaingeneratedomainrequest.md + - docs/models/operations/domainonerequest.md + - docs/models/operations/domainupdatecertificatetype.md + - docs/models/operations/domainupdatedomaintype.md + - docs/models/operations/domainupdaterequest.md + - docs/models/operations/driveropts.md + - docs/models/operations/githubgetgithubbranchesrequest.md + - docs/models/operations/githubgetgithubrepositoriesrequest.md + - docs/models/operations/githubonerequest.md + - docs/models/operations/githubtestconnectionrequest.md + - docs/models/operations/githubupdaterequest.md + - docs/models/operations/gitlabcreaterequest.md + - docs/models/operations/gitlabgetgitlabbranchesrequest.md + - docs/models/operations/gitlabgetgitlabrepositoriesrequest.md + - docs/models/operations/gitlabonerequest.md + - docs/models/operations/gitlabtestconnectionrequest.md + - docs/models/operations/gitlabupdaterequest.md + - docs/models/operations/gitproviderremoverequest.md + - docs/models/operations/global.md + - docs/models/operations/globaljob.md + - docs/models/operations/healthcheckswarm.md + - docs/models/operations/mariadbchangestatusapplicationstatus.md + - docs/models/operations/mariadbchangestatusrequest.md + - docs/models/operations/mariadbcreaterequest.md + - docs/models/operations/mariadbdeployrequest.md + - docs/models/operations/mariadbonerequest.md + - docs/models/operations/mariadbreloadrequest.md + - docs/models/operations/mariadbremoverequest.md + - docs/models/operations/mariadbsaveenvironmentrequest.md + - docs/models/operations/mariadbsaveexternalportrequest.md + - docs/models/operations/mariadbstartrequest.md + - docs/models/operations/mariadbstoprequest.md + - docs/models/operations/mariadbupdateapplicationstatus.md + - docs/models/operations/mariadbupdaterequest.md + - docs/models/operations/modeswarm.md + - docs/models/operations/mongochangestatusapplicationstatus.md + - docs/models/operations/mongochangestatusrequest.md + - docs/models/operations/mongocreaterequest.md + - docs/models/operations/mongodeployrequest.md + - docs/models/operations/mongoonerequest.md + - docs/models/operations/mongoreloadrequest.md + - docs/models/operations/mongoremoverequest.md + - docs/models/operations/mongosaveenvironmentrequest.md + - docs/models/operations/mongosaveexternalportrequest.md + - docs/models/operations/mongostartrequest.md + - docs/models/operations/mongostoprequest.md + - docs/models/operations/mongoupdateapplicationstatus.md + - docs/models/operations/mongoupdaterequest.md + - docs/models/operations/mountscreaterequest.md + - docs/models/operations/mountscreateservicetype.md + - docs/models/operations/mountscreatetype.md + - docs/models/operations/mountsonerequest.md + - docs/models/operations/mountsremoverequest.md + - docs/models/operations/mountsupdaterequest.md + - docs/models/operations/mountsupdateservicetype.md + - docs/models/operations/mountsupdatetype.md + - docs/models/operations/mysqlchangestatusapplicationstatus.md + - docs/models/operations/mysqlchangestatusrequest.md + - docs/models/operations/mysqlcreaterequest.md + - docs/models/operations/mysqldeployrequest.md + - docs/models/operations/mysqlonerequest.md + - docs/models/operations/mysqlreloadrequest.md + - docs/models/operations/mysqlremoverequest.md + - docs/models/operations/mysqlsaveenvironmentrequest.md + - docs/models/operations/mysqlsaveexternalportrequest.md + - docs/models/operations/mysqlstartrequest.md + - docs/models/operations/mysqlstoprequest.md + - docs/models/operations/mysqlupdateapplicationstatus.md + - docs/models/operations/mysqlupdaterequest.md + - docs/models/operations/networkswarm.md + - docs/models/operations/notificationcreatediscordrequest.md + - docs/models/operations/notificationcreateemailrequest.md + - docs/models/operations/notificationcreateslackrequest.md + - docs/models/operations/notificationcreatetelegramrequest.md + - docs/models/operations/notificationonerequest.md + - docs/models/operations/notificationremoverequest.md + - docs/models/operations/notificationtestdiscordconnectionrequest.md + - docs/models/operations/notificationtestemailconnectionrequest.md + - docs/models/operations/notificationtestslackconnectionrequest.md + - docs/models/operations/notificationtesttelegramconnectionrequest.md + - docs/models/operations/notificationupdatediscordrequest.md + - docs/models/operations/notificationupdateemailrequest.md + - docs/models/operations/notificationupdateslackrequest.md + - docs/models/operations/notificationupdatetelegramrequest.md + - docs/models/operations/placementswarm.md + - docs/models/operations/platform.md + - docs/models/operations/portcreateprotocol.md + - docs/models/operations/portcreaterequest.md + - docs/models/operations/portdeleterequest.md + - docs/models/operations/portonerequest.md + - docs/models/operations/portupdateprotocol.md + - docs/models/operations/portupdaterequest.md + - docs/models/operations/postgreschangestatusapplicationstatus.md + - docs/models/operations/postgreschangestatusrequest.md + - docs/models/operations/postgrescreaterequest.md + - docs/models/operations/postgresdeployrequest.md + - docs/models/operations/postgresonerequest.md + - docs/models/operations/postgresreloadrequest.md + - docs/models/operations/postgresremoverequest.md + - docs/models/operations/postgressaveenvironmentrequest.md + - docs/models/operations/postgressaveexternalportrequest.md + - docs/models/operations/postgresstartrequest.md + - docs/models/operations/postgresstoprequest.md + - docs/models/operations/postgresupdateapplicationstatus.md + - docs/models/operations/postgresupdaterequest.md + - docs/models/operations/preference.md + - docs/models/operations/projectcreaterequest.md + - docs/models/operations/projectonerequest.md + - docs/models/operations/projectremoverequest.md + - docs/models/operations/projectupdaterequest.md + - docs/models/operations/redirectscreaterequest.md + - docs/models/operations/redirectsdeleterequest.md + - docs/models/operations/redirectsonerequest.md + - docs/models/operations/redirectsupdaterequest.md + - docs/models/operations/redischangestatusapplicationstatus.md + - docs/models/operations/redischangestatusrequest.md + - docs/models/operations/rediscreaterequest.md + - docs/models/operations/redisdeployrequest.md + - docs/models/operations/redisonerequest.md + - docs/models/operations/redisreloadrequest.md + - docs/models/operations/redisremoverequest.md + - docs/models/operations/redissaveenvironmentrequest.md + - docs/models/operations/redissaveexternalportrequest.md + - docs/models/operations/redisstartrequest.md + - docs/models/operations/redisstoprequest.md + - docs/models/operations/redisupdateapplicationstatus.md + - docs/models/operations/redisupdaterequest.md + - docs/models/operations/registrycreateregistrytype.md + - docs/models/operations/registrycreaterequest.md + - docs/models/operations/registryonerequest.md + - docs/models/operations/registryremoverequest.md + - docs/models/operations/registrytestregistryregistrytype.md + - docs/models/operations/registrytestregistryrequest.md + - docs/models/operations/registryupdateregistrytype.md + - docs/models/operations/registryupdaterequest.md + - docs/models/operations/replicated.md + - docs/models/operations/replicatedjob.md + - docs/models/operations/restartpolicyswarm.md + - docs/models/operations/rol.md + - docs/models/operations/rollbackconfigswarm.md + - docs/models/operations/securitycreaterequest.md + - docs/models/operations/securitydeleterequest.md + - docs/models/operations/securityonerequest.md + - docs/models/operations/securityupdaterequest.md + - docs/models/operations/servercreaterequest.md + - docs/models/operations/serveronerequest.md + - docs/models/operations/serverremoverequest.md + - docs/models/operations/serversetuprequest.md + - docs/models/operations/serverupdaterequest.md + - docs/models/operations/settingsassigndomainservercertificatetype.md + - docs/models/operations/settingsassigndomainserverrequest.md + - docs/models/operations/settingscleanallrequest.md + - docs/models/operations/settingscleandockerbuilderrequest.md + - docs/models/operations/settingscleandockerprunerequest.md + - docs/models/operations/settingscleanstoppedcontainersrequest.md + - docs/models/operations/settingscleanunusedimagesrequest.md + - docs/models/operations/settingscleanunusedvolumesrequest.md + - docs/models/operations/settingshavetraefikdashboardportenabledrequest.md + - docs/models/operations/settingsreaddirectoriesrequest.md + - docs/models/operations/settingsreadtraefikenvrequest.md + - docs/models/operations/settingsreadtraefikfilerequest.md + - docs/models/operations/settingsreloadtraefikrequest.md + - docs/models/operations/settingssavesshprivatekeyrequest.md + - docs/models/operations/settingstoggledashboardrequest.md + - docs/models/operations/settingstogglelogrotaterequest.md + - docs/models/operations/settingstogglerequestsrequest.md + - docs/models/operations/settingsupdatedockercleanuprequest.md + - docs/models/operations/settingsupdatemiddlewaretraefikconfigrequest.md + - docs/models/operations/settingsupdatetraefikconfigrequest.md + - docs/models/operations/settingsupdatetraefikfilerequest.md + - docs/models/operations/settingsupdatewebservertraefikconfigrequest.md + - docs/models/operations/settingswritetraefikenvrequest.md + - docs/models/operations/spread.md + - docs/models/operations/sshkeycreaterequest.md + - docs/models/operations/sshkeygeneraterequest.md + - docs/models/operations/sshkeygeneratetype.md + - docs/models/operations/sshkeyonerequest.md + - docs/models/operations/sshkeyremoverequest.md + - docs/models/operations/sshkeyupdaterequest.md + - docs/models/operations/stripecreatecheckoutsessionrequest.md + - docs/models/operations/updateconfigswarm.md + - docs/models/operations/userbyauthidrequest.md + - docs/models/operations/userbyuseridrequest.md + - docs/models/security.md + - docs/sdks/admin/README.md + - docs/sdks/application/README.md + - docs/sdks/auth/README.md + - docs/sdks/backup/README.md + - docs/sdks/bitbucket/README.md + - docs/sdks/certificates/README.md + - docs/sdks/cluster/README.md + - docs/sdks/compose/README.md + - docs/sdks/deployment/README.md + - docs/sdks/destination/README.md + - docs/sdks/docker/README.md + - docs/sdks/dokploy/README.md + - docs/sdks/domain/README.md + - docs/sdks/github/README.md + - docs/sdks/gitlab/README.md + - docs/sdks/gitprovider/README.md + - docs/sdks/mariadb/README.md + - docs/sdks/mongo/README.md + - docs/sdks/mounts/README.md + - docs/sdks/mysql/README.md + - docs/sdks/notification/README.md + - docs/sdks/notifications/README.md + - docs/sdks/port/README.md + - docs/sdks/postgres/README.md + - docs/sdks/project/README.md + - docs/sdks/redirects/README.md + - docs/sdks/redis/README.md + - docs/sdks/registry/README.md + - docs/sdks/security/README.md + - docs/sdks/server/README.md + - docs/sdks/servers/README.md + - docs/sdks/settings/README.md + - docs/sdks/sshkey/README.md + - docs/sdks/sshkeys/README.md + - docs/sdks/stripe/README.md + - docs/sdks/user/README.md + - eslint.config.mjs + - examples/.env.template + - examples/README.md + - examples/adminGetOne.example.ts + - examples/package.json + - jsr.json + - package.json + - src/core.ts + - src/funcs/adminAssignPermissions.ts + - src/funcs/adminCreateUserInvitation.ts + - src/funcs/adminGetOne.ts + - src/funcs/adminGetUserByToken.ts + - src/funcs/adminRemoveUser.ts + - src/funcs/applicationCleanQueues.ts + - src/funcs/applicationCreate.ts + - src/funcs/applicationDelete.ts + - src/funcs/applicationDeploy.ts + - src/funcs/applicationGetOne.ts + - src/funcs/applicationMarkRunning.ts + - src/funcs/applicationReadAppMonitoring.ts + - src/funcs/applicationReadTraefikConfig.ts + - src/funcs/applicationRedeploy.ts + - src/funcs/applicationRefreshToken.ts + - src/funcs/applicationReload.ts + - src/funcs/applicationSaveBitbucketProvider.ts + - src/funcs/applicationSaveBuildType.ts + - src/funcs/applicationSaveDockerProvider.ts + - src/funcs/applicationSaveEnvironment.ts + - src/funcs/applicationSaveGitProdiver.ts + - src/funcs/applicationSaveGithubProvider.ts + - src/funcs/applicationSaveGitlabProvider.ts + - src/funcs/applicationStart.ts + - src/funcs/applicationStop.ts + - src/funcs/applicationUpdate.ts + - src/funcs/applicationUpdateTraefikConfig.ts + - src/funcs/authConfirmEmail.ts + - src/funcs/authCreateAdmin.ts + - src/funcs/authCreateUser.ts + - src/funcs/authDisable2FA.ts + - src/funcs/authGenerate2FASecret.ts + - src/funcs/authGenerateToken.ts + - src/funcs/authGet.ts + - src/funcs/authGetOne.ts + - src/funcs/authLogin.ts + - src/funcs/authLogout.ts + - src/funcs/authResetPassword.ts + - src/funcs/authSendResetPasswordEmail.ts + - src/funcs/authUpdate.ts + - src/funcs/authVerify2faSetup.ts + - src/funcs/authVerifyLogin2FA.ts + - src/funcs/backupCreate.ts + - src/funcs/backupGet.ts + - src/funcs/backupManualBackupMariadb.ts + - src/funcs/backupManualBackupMongo.ts + - src/funcs/backupManualBackupMysql.ts + - src/funcs/backupManualBackupPostgres.ts + - src/funcs/backupRemove.ts + - src/funcs/backupUpdate.ts + - src/funcs/bitbucketCreate.ts + - src/funcs/bitbucketGet.ts + - src/funcs/bitbucketGetBranches.ts + - src/funcs/bitbucketGetRepositories.ts + - src/funcs/bitbucketProviders.ts + - src/funcs/bitbucketTestConnection.ts + - src/funcs/bitbucketUpdate.ts + - src/funcs/certificatesAll.ts + - src/funcs/certificatesCreate.ts + - src/funcs/certificatesGet.ts + - src/funcs/certificatesRemove.ts + - src/funcs/clusterAddManager.ts + - src/funcs/clusterAddWorker.ts + - src/funcs/clusterGetNodes.ts + - src/funcs/clusterRemoveWorker.ts + - src/funcs/composeCleanQueues.ts + - src/funcs/composeCreate.ts + - src/funcs/composeDelete.ts + - src/funcs/composeDeploy.ts + - src/funcs/composeDeployTemplate.ts + - src/funcs/composeFetchSourceType.ts + - src/funcs/composeGetConverted.ts + - src/funcs/composeGetDefaultCommand.ts + - src/funcs/composeGetOne.ts + - src/funcs/composeGetTags.ts + - src/funcs/composeGetTemplates.ts + - src/funcs/composeRandomizeCompose.ts + - src/funcs/composeRedeploy.ts + - src/funcs/composeRefreshToken.ts + - src/funcs/composeStop.ts + - src/funcs/composeUpdate.ts + - src/funcs/deploymentAllByCompose.ts + - src/funcs/deploymentAllByServer.ts + - src/funcs/deploymentGet.ts + - src/funcs/destinationCreate.ts + - src/funcs/destinationGet.ts + - src/funcs/destinationGetOne.ts + - src/funcs/destinationRemove.ts + - src/funcs/destinationTestConnection.ts + - src/funcs/destinationUpdate.ts + - src/funcs/dockerGetConfig.ts + - src/funcs/dockerGetContainers.ts + - src/funcs/dockerGetContainersByAppLabel.ts + - src/funcs/dockerGetContainersByAppNameMatch.ts + - src/funcs/dockerRestartContainer.ts + - src/funcs/domainByApplicationId.ts + - src/funcs/domainByComposeId.ts + - src/funcs/domainCreate.ts + - src/funcs/domainDelete.ts + - src/funcs/domainGenerateDomain.ts + - src/funcs/domainGet.ts + - src/funcs/domainUpdate.ts + - src/funcs/gitProviderGetAll.ts + - src/funcs/gitProviderRemove.ts + - src/funcs/githubGetBranches.ts + - src/funcs/githubGetProviders.ts + - src/funcs/githubGetRepositories.ts + - src/funcs/githubOne.ts + - src/funcs/githubTestConnection.ts + - src/funcs/githubUpdate.ts + - src/funcs/gitlabCreate.ts + - src/funcs/gitlabGetGitlabBranches.ts + - src/funcs/gitlabGetGitlabRepositories.ts + - src/funcs/gitlabOne.ts + - src/funcs/gitlabProviders.ts + - src/funcs/gitlabTestConnection.ts + - src/funcs/gitlabUpdate.ts + - src/funcs/mariadbChangeStatus.ts + - src/funcs/mariadbCreate.ts + - src/funcs/mariadbDeploy.ts + - src/funcs/mariadbGet.ts + - src/funcs/mariadbReload.ts + - src/funcs/mariadbRemove.ts + - src/funcs/mariadbSaveEnvironment.ts + - src/funcs/mariadbSaveExternalPort.ts + - src/funcs/mariadbStart.ts + - src/funcs/mariadbStop.ts + - src/funcs/mariadbUpdate.ts + - src/funcs/mongoChangeStatus.ts + - src/funcs/mongoCreate.ts + - src/funcs/mongoDeploy.ts + - src/funcs/mongoGet.ts + - src/funcs/mongoReload.ts + - src/funcs/mongoRemove.ts + - src/funcs/mongoSaveEnvironment.ts + - src/funcs/mongoSaveExternalPort.ts + - src/funcs/mongoStart.ts + - src/funcs/mongoStop.ts + - src/funcs/mongoUpdate.ts + - src/funcs/mountsCreate.ts + - src/funcs/mountsGet.ts + - src/funcs/mountsRemove.ts + - src/funcs/mountsUpdate.ts + - src/funcs/mysqlChangeStatus.ts + - src/funcs/mysqlCreate.ts + - src/funcs/mysqlDeploy.ts + - src/funcs/mysqlGet.ts + - src/funcs/mysqlReload.ts + - src/funcs/mysqlRemove.ts + - src/funcs/mysqlSaveEnvironment.ts + - src/funcs/mysqlSaveExternalPort.ts + - src/funcs/mysqlStart.ts + - src/funcs/mysqlStop.ts + - src/funcs/mysqlUpdate.ts + - src/funcs/notificationCreateDiscord.ts + - src/funcs/notificationCreateEmail.ts + - src/funcs/notificationCreateSlack.ts + - src/funcs/notificationCreateTelegram.ts + - src/funcs/notificationGetAll.ts + - src/funcs/notificationRemove.ts + - src/funcs/notificationTestDiscordConnection.ts + - src/funcs/notificationTestEmailConnection.ts + - src/funcs/notificationTestSlackConnection.ts + - src/funcs/notificationTestTelegramConnection.ts + - src/funcs/notificationUpdateDiscord.ts + - src/funcs/notificationUpdateEmail.ts + - src/funcs/notificationUpdateSlack.ts + - src/funcs/notificationUpdateTelegram.ts + - src/funcs/notificationsGet.ts + - src/funcs/portCreate.ts + - src/funcs/portDelete.ts + - src/funcs/portGet.ts + - src/funcs/portUpdate.ts + - src/funcs/postgresChangeStatus.ts + - src/funcs/postgresCreate.ts + - src/funcs/postgresDeploy.ts + - src/funcs/postgresGet.ts + - src/funcs/postgresReload.ts + - src/funcs/postgresRemove.ts + - src/funcs/postgresSaveEnvironment.ts + - src/funcs/postgresSaveExternalPort.ts + - src/funcs/postgresStart.ts + - src/funcs/postgresStop.ts + - src/funcs/postgresUpdate.ts + - src/funcs/projectAll.ts + - src/funcs/projectCreate.ts + - src/funcs/projectGet.ts + - src/funcs/projectRemove.ts + - src/funcs/projectUpdate.ts + - src/funcs/redirectsCreate.ts + - src/funcs/redirectsDelete.ts + - src/funcs/redirectsGetOne.ts + - src/funcs/redirectsUpdate.ts + - src/funcs/redisChangeStatus.ts + - src/funcs/redisCreate.ts + - src/funcs/redisDeploy.ts + - src/funcs/redisGet.ts + - src/funcs/redisReload.ts + - src/funcs/redisRemove.ts + - src/funcs/redisSaveEnvironment.ts + - src/funcs/redisSaveExternalPort.ts + - src/funcs/redisStart.ts + - src/funcs/redisStop.ts + - src/funcs/redisUpdate.ts + - src/funcs/registryCreate.ts + - src/funcs/registryGet.ts + - src/funcs/registryGetAll.ts + - src/funcs/registryRemove.ts + - src/funcs/registryTestRegistry.ts + - src/funcs/registryUpdate.ts + - src/funcs/securityCreate.ts + - src/funcs/securityDelete.ts + - src/funcs/securityGet.ts + - src/funcs/securityUpdate.ts + - src/funcs/serverAll.ts + - src/funcs/serverCreate.ts + - src/funcs/serverRemove.ts + - src/funcs/serverSetup.ts + - src/funcs/serverUpdate.ts + - src/funcs/serverWithSSHKey.ts + - src/funcs/serversGet.ts + - src/funcs/settingsAssignDomainServer.ts + - src/funcs/settingsCheckAndUpdateImage.ts + - src/funcs/settingsCleanAll.ts + - src/funcs/settingsCleanDockerBuilder.ts + - src/funcs/settingsCleanDockerPrune.ts + - src/funcs/settingsCleanMonitoring.ts + - src/funcs/settingsCleanSshPrivateKey.ts + - src/funcs/settingsCleanStoppedContainers.ts + - src/funcs/settingsCleanUnusedImages.ts + - src/funcs/settingsCleanUnusedVolumes.ts + - src/funcs/settingsGetDokployVersion.ts + - src/funcs/settingsGetIp.ts + - src/funcs/settingsGetLogRotateStatus.ts + - src/funcs/settingsGetOpenApiDocument.ts + - src/funcs/settingsHaveActivateRequests.ts + - src/funcs/settingsHaveTraefikDashboardPortEnabled.ts + - src/funcs/settingsHealth.ts + - src/funcs/settingsIsCloud.ts + - src/funcs/settingsReadDirectories.ts + - src/funcs/settingsReadMiddlewareTraefikConfig.ts + - src/funcs/settingsReadStats.ts + - src/funcs/settingsReadTraefikConfig.ts + - src/funcs/settingsReadTraefikEnv.ts + - src/funcs/settingsReadTraefikFile.ts + - src/funcs/settingsReadWebServerTraefikConfig.ts + - src/funcs/settingsReloadServer.ts + - src/funcs/settingsReloadTraefik.ts + - src/funcs/settingsSaveSshPrivateKey.ts + - src/funcs/settingsToggleDashboard.ts + - src/funcs/settingsToggleLogRotate.ts + - src/funcs/settingsToggleRequests.ts + - src/funcs/settingsUpdateDockerCleanup.ts + - src/funcs/settingsUpdateMiddlewareTraefikConfig.ts + - src/funcs/settingsUpdateServer.ts + - src/funcs/settingsUpdateTraefikConfig.ts + - src/funcs/settingsUpdateTraefikFile.ts + - src/funcs/settingsUpdateWebServerTraefikConfig.ts + - src/funcs/settingsWriteTraefikEnv.ts + - src/funcs/sshKeyGenerate.ts + - src/funcs/sshKeyGet.ts + - src/funcs/sshKeyRemove.ts + - src/funcs/sshKeyUpdate.ts + - src/funcs/sshKeysAll.ts + - src/funcs/sshKeysCreate.ts + - src/funcs/stripeCanCreateMoreServers.ts + - src/funcs/stripeCreateCheckoutSession.ts + - src/funcs/stripeCreateCustomerPortalSession.ts + - src/funcs/stripeGetProducts.ts + - src/funcs/userByAuthId.ts + - src/funcs/userByUserId.ts + - src/funcs/userGetAll.ts + - src/hooks/hooks.ts + - src/hooks/index.ts + - src/hooks/types.ts + - src/index.ts + - src/lib/base64.ts + - src/lib/config.ts + - src/lib/dlv.ts + - src/lib/encodings.ts + - src/lib/env.ts + - src/lib/files.ts + - src/lib/http.ts + - src/lib/is-plain-object.ts + - src/lib/logger.ts + - src/lib/matchers.ts + - src/lib/primitives.ts + - src/lib/retries.ts + - src/lib/schemas.ts + - src/lib/sdks.ts + - src/lib/security.ts + - src/lib/url.ts + - src/models/error.ts + - src/models/errors/dokploydefaulterror.ts + - src/models/errors/dokployerror.ts + - src/models/errors/httpclienterrors.ts + - src/models/errors/index.ts + - src/models/errors/responsevalidationerror.ts + - src/models/errors/sdkvalidationerror.ts + - src/models/index.ts + - src/models/operations/adminassignpermissions.ts + - src/models/operations/admincreateuserinvitation.ts + - src/models/operations/admingetuserbytoken.ts + - src/models/operations/adminremoveuser.ts + - src/models/operations/applicationcleanqueues.ts + - src/models/operations/applicationcreate.ts + - src/models/operations/applicationdelete.ts + - src/models/operations/applicationdeploy.ts + - src/models/operations/applicationmarkrunning.ts + - src/models/operations/applicationone.ts + - src/models/operations/applicationreadappmonitoring.ts + - src/models/operations/applicationreadtraefikconfig.ts + - src/models/operations/applicationredeploy.ts + - src/models/operations/applicationrefreshtoken.ts + - src/models/operations/applicationreload.ts + - src/models/operations/applicationsavebitbucketprovider.ts + - src/models/operations/applicationsavebuildtype.ts + - src/models/operations/applicationsavedockerprovider.ts + - src/models/operations/applicationsaveenvironment.ts + - src/models/operations/applicationsavegithubprovider.ts + - src/models/operations/applicationsavegitlabprovider.ts + - src/models/operations/applicationsavegitprodiver.ts + - src/models/operations/applicationstart.ts + - src/models/operations/applicationstop.ts + - src/models/operations/applicationupdate.ts + - src/models/operations/applicationupdatetraefikconfig.ts + - src/models/operations/authconfirmemail.ts + - src/models/operations/authcreateadmin.ts + - src/models/operations/authcreateuser.ts + - src/models/operations/authlogin.ts + - src/models/operations/authone.ts + - src/models/operations/authresetpassword.ts + - src/models/operations/authsendresetpasswordemail.ts + - src/models/operations/authupdate.ts + - src/models/operations/authverify2fasetup.ts + - src/models/operations/authverifylogin2fa.ts + - src/models/operations/backupcreate.ts + - src/models/operations/backupmanualbackupmariadb.ts + - src/models/operations/backupmanualbackupmongo.ts + - src/models/operations/backupmanualbackupmysql.ts + - src/models/operations/backupmanualbackuppostgres.ts + - src/models/operations/backupone.ts + - src/models/operations/backupremove.ts + - src/models/operations/backupupdate.ts + - src/models/operations/bitbucketcreate.ts + - src/models/operations/bitbucketgetbitbucketbranches.ts + - src/models/operations/bitbucketgetbitbucketrepositories.ts + - src/models/operations/bitbucketone.ts + - src/models/operations/bitbuckettestconnection.ts + - src/models/operations/bitbucketupdate.ts + - src/models/operations/certificatescreate.ts + - src/models/operations/certificatesone.ts + - src/models/operations/certificatesremove.ts + - src/models/operations/clusterremoveworker.ts + - src/models/operations/composecleanqueues.ts + - src/models/operations/composecreate.ts + - src/models/operations/composedelete.ts + - src/models/operations/composedeploy.ts + - src/models/operations/composedeploytemplate.ts + - src/models/operations/composefetchsourcetype.ts + - src/models/operations/composegetconvertedcompose.ts + - src/models/operations/composegetdefaultcommand.ts + - src/models/operations/composeone.ts + - src/models/operations/composerandomizecompose.ts + - src/models/operations/composeredeploy.ts + - src/models/operations/composerefreshtoken.ts + - src/models/operations/composestop.ts + - src/models/operations/composeupdate.ts + - src/models/operations/deploymentall.ts + - src/models/operations/deploymentallbycompose.ts + - src/models/operations/deploymentallbyserver.ts + - src/models/operations/destinationcreate.ts + - src/models/operations/destinationone.ts + - src/models/operations/destinationremove.ts + - src/models/operations/destinationtestconnection.ts + - src/models/operations/destinationupdate.ts + - src/models/operations/dockergetconfig.ts + - src/models/operations/dockergetcontainers.ts + - src/models/operations/dockergetcontainersbyapplabel.ts + - src/models/operations/dockergetcontainersbyappnamematch.ts + - src/models/operations/dockerrestartcontainer.ts + - src/models/operations/domainbyapplicationid.ts + - src/models/operations/domainbycomposeid.ts + - src/models/operations/domaincreate.ts + - src/models/operations/domaindelete.ts + - src/models/operations/domaingeneratedomain.ts + - src/models/operations/domainone.ts + - src/models/operations/domainupdate.ts + - src/models/operations/githubgetgithubbranches.ts + - src/models/operations/githubgetgithubrepositories.ts + - src/models/operations/githubone.ts + - src/models/operations/githubtestconnection.ts + - src/models/operations/githubupdate.ts + - src/models/operations/gitlabcreate.ts + - src/models/operations/gitlabgetgitlabbranches.ts + - src/models/operations/gitlabgetgitlabrepositories.ts + - src/models/operations/gitlabone.ts + - src/models/operations/gitlabtestconnection.ts + - src/models/operations/gitlabupdate.ts + - src/models/operations/gitproviderremove.ts + - src/models/operations/index.ts + - src/models/operations/mariadbchangestatus.ts + - src/models/operations/mariadbcreate.ts + - src/models/operations/mariadbdeploy.ts + - src/models/operations/mariadbone.ts + - src/models/operations/mariadbreload.ts + - src/models/operations/mariadbremove.ts + - src/models/operations/mariadbsaveenvironment.ts + - src/models/operations/mariadbsaveexternalport.ts + - src/models/operations/mariadbstart.ts + - src/models/operations/mariadbstop.ts + - src/models/operations/mariadbupdate.ts + - src/models/operations/mongochangestatus.ts + - src/models/operations/mongocreate.ts + - src/models/operations/mongodeploy.ts + - src/models/operations/mongoone.ts + - src/models/operations/mongoreload.ts + - src/models/operations/mongoremove.ts + - src/models/operations/mongosaveenvironment.ts + - src/models/operations/mongosaveexternalport.ts + - src/models/operations/mongostart.ts + - src/models/operations/mongostop.ts + - src/models/operations/mongoupdate.ts + - src/models/operations/mountscreate.ts + - src/models/operations/mountsone.ts + - src/models/operations/mountsremove.ts + - src/models/operations/mountsupdate.ts + - src/models/operations/mysqlchangestatus.ts + - src/models/operations/mysqlcreate.ts + - src/models/operations/mysqldeploy.ts + - src/models/operations/mysqlone.ts + - src/models/operations/mysqlreload.ts + - src/models/operations/mysqlremove.ts + - src/models/operations/mysqlsaveenvironment.ts + - src/models/operations/mysqlsaveexternalport.ts + - src/models/operations/mysqlstart.ts + - src/models/operations/mysqlstop.ts + - src/models/operations/mysqlupdate.ts + - src/models/operations/notificationcreatediscord.ts + - src/models/operations/notificationcreateemail.ts + - src/models/operations/notificationcreateslack.ts + - src/models/operations/notificationcreatetelegram.ts + - src/models/operations/notificationone.ts + - src/models/operations/notificationremove.ts + - src/models/operations/notificationtestdiscordconnection.ts + - src/models/operations/notificationtestemailconnection.ts + - src/models/operations/notificationtestslackconnection.ts + - src/models/operations/notificationtesttelegramconnection.ts + - src/models/operations/notificationupdatediscord.ts + - src/models/operations/notificationupdateemail.ts + - src/models/operations/notificationupdateslack.ts + - src/models/operations/notificationupdatetelegram.ts + - src/models/operations/portcreate.ts + - src/models/operations/portdelete.ts + - src/models/operations/portone.ts + - src/models/operations/portupdate.ts + - src/models/operations/postgreschangestatus.ts + - src/models/operations/postgrescreate.ts + - src/models/operations/postgresdeploy.ts + - src/models/operations/postgresone.ts + - src/models/operations/postgresreload.ts + - src/models/operations/postgresremove.ts + - src/models/operations/postgressaveenvironment.ts + - src/models/operations/postgressaveexternalport.ts + - src/models/operations/postgresstart.ts + - src/models/operations/postgresstop.ts + - src/models/operations/postgresupdate.ts + - src/models/operations/projectcreate.ts + - src/models/operations/projectone.ts + - src/models/operations/projectremove.ts + - src/models/operations/projectupdate.ts + - src/models/operations/redirectscreate.ts + - src/models/operations/redirectsdelete.ts + - src/models/operations/redirectsone.ts + - src/models/operations/redirectsupdate.ts + - src/models/operations/redischangestatus.ts + - src/models/operations/rediscreate.ts + - src/models/operations/redisdeploy.ts + - src/models/operations/redisone.ts + - src/models/operations/redisreload.ts + - src/models/operations/redisremove.ts + - src/models/operations/redissaveenvironment.ts + - src/models/operations/redissaveexternalport.ts + - src/models/operations/redisstart.ts + - src/models/operations/redisstop.ts + - src/models/operations/redisupdate.ts + - src/models/operations/registrycreate.ts + - src/models/operations/registryone.ts + - src/models/operations/registryremove.ts + - src/models/operations/registrytestregistry.ts + - src/models/operations/registryupdate.ts + - src/models/operations/securitycreate.ts + - src/models/operations/securitydelete.ts + - src/models/operations/securityone.ts + - src/models/operations/securityupdate.ts + - src/models/operations/servercreate.ts + - src/models/operations/serverone.ts + - src/models/operations/serverremove.ts + - src/models/operations/serversetup.ts + - src/models/operations/serverupdate.ts + - src/models/operations/settingsassigndomainserver.ts + - src/models/operations/settingscleanall.ts + - src/models/operations/settingscleandockerbuilder.ts + - src/models/operations/settingscleandockerprune.ts + - src/models/operations/settingscleanstoppedcontainers.ts + - src/models/operations/settingscleanunusedimages.ts + - src/models/operations/settingscleanunusedvolumes.ts + - src/models/operations/settingshavetraefikdashboardportenabled.ts + - src/models/operations/settingsreaddirectories.ts + - src/models/operations/settingsreadtraefikenv.ts + - src/models/operations/settingsreadtraefikfile.ts + - src/models/operations/settingsreloadtraefik.ts + - src/models/operations/settingssavesshprivatekey.ts + - src/models/operations/settingstoggledashboard.ts + - src/models/operations/settingstogglelogrotate.ts + - src/models/operations/settingstogglerequests.ts + - src/models/operations/settingsupdatedockercleanup.ts + - src/models/operations/settingsupdatemiddlewaretraefikconfig.ts + - src/models/operations/settingsupdatetraefikconfig.ts + - src/models/operations/settingsupdatetraefikfile.ts + - src/models/operations/settingsupdatewebservertraefikconfig.ts + - src/models/operations/settingswritetraefikenv.ts + - src/models/operations/sshkeycreate.ts + - src/models/operations/sshkeygenerate.ts + - src/models/operations/sshkeyone.ts + - src/models/operations/sshkeyremove.ts + - src/models/operations/sshkeyupdate.ts + - src/models/operations/stripecreatecheckoutsession.ts + - src/models/operations/userbyauthid.ts + - src/models/operations/userbyuserid.ts + - src/models/security.ts + - src/sdk/admin.ts + - src/sdk/application.ts + - src/sdk/auth.ts + - src/sdk/backup.ts + - src/sdk/bitbucket.ts + - src/sdk/certificates.ts + - src/sdk/cluster.ts + - src/sdk/compose.ts + - src/sdk/deployment.ts + - src/sdk/destination.ts + - src/sdk/docker.ts + - src/sdk/domain.ts + - src/sdk/github.ts + - src/sdk/gitlab.ts + - src/sdk/gitprovider.ts + - src/sdk/index.ts + - src/sdk/mariadb.ts + - src/sdk/mongo.ts + - src/sdk/mounts.ts + - src/sdk/mysql.ts + - src/sdk/notification.ts + - src/sdk/notifications.ts + - src/sdk/port.ts + - src/sdk/postgres.ts + - src/sdk/project.ts + - src/sdk/redirects.ts + - src/sdk/redis.ts + - src/sdk/registry.ts + - src/sdk/sdk.ts + - src/sdk/security.ts + - src/sdk/server.ts + - src/sdk/servers.ts + - src/sdk/settings.ts + - src/sdk/sshkey.ts + - src/sdk/sshkeys.ts + - src/sdk/stripe.ts + - src/sdk/user.ts + - src/types/async.ts + - src/types/blobs.ts + - src/types/constdatetime.ts + - src/types/enums.ts + - src/types/fp.ts + - src/types/index.ts + - src/types/operations.ts + - src/types/rfcdate.ts + - src/types/streams.ts + - tsconfig.json +examples: + admin-one: + speakeasy-default-admin-one: + responses: + default: + application/json: {"message": "", "code": ""} + admin-createUserInvitation: + speakeasy-default-admin-create-user-invitation: + requestBody: + application/json: {"email": "Melody5@gmail.com"} + responses: + default: + application/json: {"message": "", "code": ""} + admin-removeUser: + speakeasy-default-admin-remove-user: + requestBody: + application/json: {"authId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + admin-getUserByToken: + speakeasy-default-admin-get-user-by-token: + parameters: + query: + token: "" + responses: + default: + application/json: {"message": "", "code": ""} + admin-assignPermissions: + speakeasy-default-admin-assign-permissions: + requestBody: + application/json: {"userId": "", "canCreateProjects": false, "canCreateServices": false, "canDeleteProjects": false, "canDeleteServices": false, "accesedProjects": [""], "accesedServices": [""], "canAccessToTraefikFiles": false, "canAccessToDocker": true, "canAccessToAPI": false, "canAccessToSSHKeys": true, "canAccessToGitProviders": false} + responses: + default: + application/json: {"message": "", "code": ""} + docker-getContainers: + speakeasy-default-docker-get-containers: + responses: + default: + application/json: {"message": "", "code": ""} + docker-restartContainer: + speakeasy-default-docker-restart-container: + requestBody: + application/json: {"containerId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + docker-getConfig: + speakeasy-default-docker-get-config: + parameters: + query: + containerId: "" + responses: + default: + application/json: {"message": "", "code": ""} + docker-getContainersByAppNameMatch: + speakeasy-default-docker-get-containers-by-app-name-match: + parameters: + query: + appName: "" + responses: + default: + application/json: {"message": "", "code": ""} + docker-getContainersByAppLabel: + speakeasy-default-docker-get-containers-by-app-label: + parameters: + query: + appName: "" + responses: + default: + application/json: {"message": "", "code": ""} + auth-createAdmin: + speakeasy-default-auth-create-admin: + requestBody: + application/json: {"email": "Margarett.Keeling@hotmail.com", "password": "tugyh_JW5kT5IDW"} + responses: + default: + application/json: {"message": "", "code": ""} + auth-createUser: + speakeasy-default-auth-create-user: + requestBody: + application/json: {"password": "MRqGkWGKqLanNcu", "id": "", "token": ""} + responses: + default: + application/json: {"message": "", "code": ""} + auth-login: + speakeasy-default-auth-login: + requestBody: + application/json: {"email": "Lloyd_Howe41@gmail.com", "password": "NBiV2yTHHqOmb69"} + responses: + default: + application/json: {"message": "", "code": ""} + auth-get: + speakeasy-default-auth-get: + responses: + default: + application/json: {"message": "", "code": ""} + auth-logout: + speakeasy-default-auth-logout: + responses: + default: + application/json: {"message": "", "code": ""} + auth-update: + speakeasy-default-auth-update: + requestBody: + application/json: {"email": "Larissa_Aufderhar@hotmail.com", "password": "lGQCLAhWN3Y4KOT"} + responses: + default: + application/json: {"message": "", "code": ""} + auth-generateToken: + speakeasy-default-auth-generate-token: + responses: + default: + application/json: {"message": "", "code": ""} + auth-one: + speakeasy-default-auth-one: + parameters: + query: + id: "" + responses: + default: + application/json: {"message": "", "code": ""} + auth-generate2FASecret: + speakeasy-default-auth-generate2-FA-secret: + responses: + default: + application/json: {"message": "", "code": ""} + auth-verify2FASetup: + speakeasy-default-auth-verify2-FA-setup: + requestBody: + application/json: {"pin": "8291", "secret": ""} + responses: + default: + application/json: {"message": "", "code": ""} + auth-verifyLogin2FA: + speakeasy-default-auth-verify-login2-FA: + requestBody: + application/json: {"pin": "5896", "id": ""} + responses: + default: + application/json: {"message": "", "code": ""} + auth-disable2FA: + speakeasy-default-auth-disable2-FA: + responses: + default: + application/json: {"message": "", "code": ""} + auth-sendResetPasswordEmail: + speakeasy-default-auth-send-reset-password-email: + requestBody: + application/json: {"email": "Rubye_Stanton63@hotmail.com"} + responses: + default: + application/json: {"message": "", "code": ""} + auth-resetPassword: + speakeasy-default-auth-reset-password: + requestBody: + application/json: {"resetPasswordToken": "", "password": "gZLRGbfCK0k8C4F"} + responses: + default: + application/json: {"message": "", "code": ""} + auth-confirmEmail: + speakeasy-default-auth-confirm-email: + requestBody: + application/json: {"confirmationToken": ""} + responses: + default: + application/json: {"message": "", "code": ""} + project-create: + speakeasy-default-project-create: + requestBody: + application/json: {"name": ""} + responses: + default: + application/json: {"message": "", "code": ""} + project-one: + speakeasy-default-project-one: + parameters: + query: + projectId: "" + responses: + default: + application/json: {"message": "", "code": ""} + project-all: + speakeasy-default-project-all: + responses: + default: + application/json: {"message": "", "code": ""} + project-remove: + speakeasy-default-project-remove: + requestBody: + application/json: {"projectId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + project-update: + speakeasy-default-project-update: + requestBody: + application/json: {"name": "", "projectId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + application-create: + speakeasy-default-application-create: + requestBody: + application/json: {"name": "", "projectId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + application-one: + speakeasy-default-application-one: + parameters: + query: + applicationId: "" + responses: + default: + application/json: {"message": "", "code": ""} + application-reload: + speakeasy-default-application-reload: + requestBody: + application/json: {"appName": "", "applicationId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + application-delete: + speakeasy-default-application-delete: + requestBody: + application/json: {"applicationId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + application-stop: + speakeasy-default-application-stop: + requestBody: + application/json: {"applicationId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + application-start: + speakeasy-default-application-start: + requestBody: + application/json: {"applicationId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + application-redeploy: + speakeasy-default-application-redeploy: + requestBody: + application/json: {"applicationId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + application-saveEnvironment: + speakeasy-default-application-save-environment: + requestBody: + application/json: {"applicationId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + application-saveBuildType: + speakeasy-default-application-save-build-type: + requestBody: + application/json: {"applicationId": "", "buildType": "dockerfile", "dockerContextPath": "", "dockerBuildStage": null} + responses: + default: + application/json: {"message": "", "code": ""} + application-saveGithubProvider: + speakeasy-default-application-save-github-provider: + requestBody: + application/json: {"applicationId": "", "owner": null, "githubId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + application-saveGitlabProvider: + speakeasy-default-application-save-gitlab-provider: + requestBody: + application/json: {"applicationId": "", "gitlabBranch": "", "gitlabBuildPath": "", "gitlabOwner": "", "gitlabRepository": "", "gitlabId": "", "gitlabProjectId": 950.43, "gitlabPathNamespace": ""} + responses: + default: + application/json: {"message": "", "code": ""} + application-saveBitbucketProvider: + speakeasy-default-application-save-bitbucket-provider: + requestBody: + application/json: {"bitbucketBranch": "", "bitbucketBuildPath": "", "bitbucketOwner": "", "bitbucketRepository": "", "bitbucketId": "", "applicationId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + application-saveDockerProvider: + speakeasy-default-application-save-docker-provider: + requestBody: + application/json: {"applicationId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + application-saveGitProdiver: + speakeasy-default-application-save-git-prodiver: + requestBody: + application/json: {"applicationId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + application-markRunning: + speakeasy-default-application-mark-running: + requestBody: + application/json: {"applicationId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + application-update: + speakeasy-default-application-update: + requestBody: + application/json: {"applicationId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + application-refreshToken: + speakeasy-default-application-refresh-token: + requestBody: + application/json: {"applicationId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + application-deploy: + speakeasy-default-application-deploy: + requestBody: + application/json: {"applicationId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + application-cleanQueues: + speakeasy-default-application-clean-queues: + requestBody: + application/json: {"applicationId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + application-readTraefikConfig: + speakeasy-default-application-read-traefik-config: + parameters: + query: + applicationId: "" + responses: + default: + application/json: {"message": "", "code": ""} + application-updateTraefikConfig: + speakeasy-default-application-update-traefik-config: + requestBody: + application/json: {"applicationId": "", "traefikConfig": ""} + responses: + default: + application/json: {"message": "", "code": ""} + application-readAppMonitoring: + speakeasy-default-application-read-app-monitoring: + parameters: + query: + appName: "" + responses: + default: + application/json: {"message": "", "code": ""} + mysql-create: + speakeasy-default-mysql-create: + requestBody: + application/json: {"name": "", "appName": "", "dockerImage": "mysql:8", "projectId": "", "databaseName": "", "databaseUser": "", "databasePassword": "", "databaseRootPassword": ""} + responses: + default: + application/json: {"message": "", "code": ""} + mysql-one: + speakeasy-default-mysql-one: + parameters: + query: + mysqlId: "" + responses: + default: + application/json: {"message": "", "code": ""} + mysql-start: + speakeasy-default-mysql-start: + requestBody: + application/json: {"mysqlId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + mysql-stop: + speakeasy-default-mysql-stop: + requestBody: + application/json: {"mysqlId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + mysql-saveExternalPort: + speakeasy-default-mysql-save-external-port: + requestBody: + application/json: {"mysqlId": "", "externalPort": 6359.48} + responses: + default: + application/json: {"message": "", "code": ""} + mysql-deploy: + speakeasy-default-mysql-deploy: + requestBody: + application/json: {"mysqlId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + mysql-changeStatus: + speakeasy-default-mysql-change-status: + requestBody: + application/json: {"mysqlId": "", "applicationStatus": "error"} + responses: + default: + application/json: {"message": "", "code": ""} + mysql-reload: + speakeasy-default-mysql-reload: + requestBody: + application/json: {"mysqlId": "", "appName": ""} + responses: + default: + application/json: {"message": "", "code": ""} + mysql-remove: + speakeasy-default-mysql-remove: + requestBody: + application/json: {"mysqlId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + mysql-saveEnvironment: + speakeasy-default-mysql-save-environment: + requestBody: + application/json: {"mysqlId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + mysql-update: + speakeasy-default-mysql-update: + requestBody: + application/json: {"mysqlId": "", "dockerImage": "mysql:8"} + responses: + default: + application/json: {"message": "", "code": ""} + postgres-create: + speakeasy-default-postgres-create: + requestBody: + application/json: {"name": "", "appName": "", "databaseName": "", "databaseUser": "", "databasePassword": "", "dockerImage": "postgres:15", "projectId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + postgres-one: + speakeasy-default-postgres-one: + parameters: + query: + postgresId: "" + responses: + default: + application/json: {"message": "", "code": ""} + postgres-start: + speakeasy-default-postgres-start: + requestBody: + application/json: {"postgresId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + postgres-stop: + speakeasy-default-postgres-stop: + requestBody: + application/json: {"postgresId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + postgres-saveExternalPort: + speakeasy-default-postgres-save-external-port: + requestBody: + application/json: {"postgresId": "", "externalPort": 3135.23} + responses: + default: + application/json: {"message": "", "code": ""} + postgres-deploy: + speakeasy-default-postgres-deploy: + requestBody: + application/json: {"postgresId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + postgres-changeStatus: + speakeasy-default-postgres-change-status: + requestBody: + application/json: {"postgresId": "", "applicationStatus": "idle"} + responses: + default: + application/json: {"message": "", "code": ""} + postgres-remove: + speakeasy-default-postgres-remove: + requestBody: + application/json: {"postgresId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + postgres-saveEnvironment: + speakeasy-default-postgres-save-environment: + requestBody: + application/json: {"postgresId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + postgres-reload: + speakeasy-default-postgres-reload: + requestBody: + application/json: {"postgresId": "", "appName": ""} + responses: + default: + application/json: {"message": "", "code": ""} + postgres-update: + speakeasy-default-postgres-update: + requestBody: + application/json: {"postgresId": "", "dockerImage": "postgres:15"} + responses: + default: + application/json: {"message": "", "code": ""} + redis-create: + speakeasy-default-redis-create: + requestBody: + application/json: {"name": "", "appName": "", "databasePassword": "", "dockerImage": "redis:8", "projectId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + redis-one: + speakeasy-default-redis-one: + parameters: + query: + redisId: "" + responses: + default: + application/json: {"message": "", "code": ""} + redis-start: + speakeasy-default-redis-start: + requestBody: + application/json: {"redisId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + redis-reload: + speakeasy-default-redis-reload: + requestBody: + application/json: {"redisId": "", "appName": ""} + responses: + default: + application/json: {"message": "", "code": ""} + redis-stop: + speakeasy-default-redis-stop: + requestBody: + application/json: {"redisId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + redis-saveExternalPort: + speakeasy-default-redis-save-external-port: + requestBody: + application/json: {"redisId": "", "externalPort": 8375.12} + responses: + default: + application/json: {"message": "", "code": ""} + redis-deploy: + speakeasy-default-redis-deploy: + requestBody: + application/json: {"redisId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + redis-changeStatus: + speakeasy-default-redis-change-status: + requestBody: + application/json: {"redisId": "", "applicationStatus": "error"} + responses: + default: + application/json: {"message": "", "code": ""} + redis-remove: + speakeasy-default-redis-remove: + requestBody: + application/json: {"redisId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + redis-saveEnvironment: + speakeasy-default-redis-save-environment: + requestBody: + application/json: {"redisId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + redis-update: + speakeasy-default-redis-update: + requestBody: + application/json: {"redisId": "", "dockerImage": "redis:8"} + responses: + default: + application/json: {"message": "", "code": ""} + mongo-create: + speakeasy-default-mongo-create: + requestBody: + application/json: {"name": "", "appName": "", "dockerImage": "mongo:15", "projectId": "", "databaseUser": "", "databasePassword": ""} + responses: + default: + application/json: {"message": "", "code": ""} + mongo-one: + speakeasy-default-mongo-one: + parameters: + query: + mongoId: "" + responses: + default: + application/json: {"message": "", "code": ""} + mongo-start: + speakeasy-default-mongo-start: + requestBody: + application/json: {"mongoId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + mongo-stop: + speakeasy-default-mongo-stop: + requestBody: + application/json: {"mongoId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + mongo-saveExternalPort: + speakeasy-default-mongo-save-external-port: + requestBody: + application/json: {"mongoId": "", "externalPort": null} + responses: + default: + application/json: {"message": "", "code": ""} + mongo-deploy: + speakeasy-default-mongo-deploy: + requestBody: + application/json: {"mongoId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + mongo-changeStatus: + speakeasy-default-mongo-change-status: + requestBody: + application/json: {"mongoId": "", "applicationStatus": "error"} + responses: + default: + application/json: {"message": "", "code": ""} + mongo-reload: + speakeasy-default-mongo-reload: + requestBody: + application/json: {"mongoId": "", "appName": ""} + responses: + default: + application/json: {"message": "", "code": ""} + mongo-remove: + speakeasy-default-mongo-remove: + requestBody: + application/json: {"mongoId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + mongo-saveEnvironment: + speakeasy-default-mongo-save-environment: + requestBody: + application/json: {"mongoId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + mongo-update: + speakeasy-default-mongo-update: + requestBody: + application/json: {"mongoId": "", "dockerImage": "mongo:15"} + responses: + default: + application/json: {"message": "", "code": ""} + mariadb-create: + speakeasy-default-mariadb-create: + requestBody: + application/json: {"name": "", "appName": "", "dockerImage": "mariadb:6", "databaseRootPassword": "", "projectId": "", "databaseName": "", "databaseUser": "", "databasePassword": ""} + responses: + default: + application/json: {"message": "", "code": ""} + mariadb-one: + speakeasy-default-mariadb-one: + parameters: + query: + mariadbId: "" + responses: + default: + application/json: {"message": "", "code": ""} + mariadb-start: + speakeasy-default-mariadb-start: + requestBody: + application/json: {"mariadbId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + mariadb-stop: + speakeasy-default-mariadb-stop: + requestBody: + application/json: {"mariadbId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + mariadb-saveExternalPort: + speakeasy-default-mariadb-save-external-port: + requestBody: + application/json: {"mariadbId": "", "externalPort": 1693.93} + responses: + default: + application/json: {"message": "", "code": ""} + mariadb-deploy: + speakeasy-default-mariadb-deploy: + requestBody: + application/json: {"mariadbId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + mariadb-changeStatus: + speakeasy-default-mariadb-change-status: + requestBody: + application/json: {"mariadbId": "", "applicationStatus": "idle"} + responses: + default: + application/json: {"message": "", "code": ""} + mariadb-remove: + speakeasy-default-mariadb-remove: + requestBody: + application/json: {"mariadbId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + mariadb-saveEnvironment: + speakeasy-default-mariadb-save-environment: + requestBody: + application/json: {"mariadbId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + mariadb-reload: + speakeasy-default-mariadb-reload: + requestBody: + application/json: {"mariadbId": "", "appName": ""} + responses: + default: + application/json: {"message": "", "code": ""} + mariadb-update: + speakeasy-default-mariadb-update: + requestBody: + application/json: {"mariadbId": "", "dockerImage": "mariadb:6"} + responses: + default: + application/json: {"message": "", "code": ""} + compose-create: + speakeasy-default-compose-create: + requestBody: + application/json: {"name": "", "projectId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + compose-one: + speakeasy-default-compose-one: + parameters: + query: + composeId: "" + responses: + default: + application/json: {"message": "", "code": ""} + compose-update: + speakeasy-default-compose-update: + requestBody: + application/json: {"composeId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + compose-delete: + speakeasy-default-compose-delete: + requestBody: + application/json: {"composeId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + compose-cleanQueues: + speakeasy-default-compose-clean-queues: + requestBody: + application/json: {"composeId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + compose-fetchSourceType: + speakeasy-default-compose-fetch-source-type: + requestBody: + application/json: {"composeId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + compose-randomizeCompose: + speakeasy-default-compose-randomize-compose: + requestBody: + application/json: {"composeId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + compose-getConvertedCompose: + speakeasy-default-compose-get-converted-compose: + parameters: + query: + composeId: "" + responses: + default: + application/json: {"message": "", "code": ""} + compose-deploy: + speakeasy-default-compose-deploy: + requestBody: + application/json: {"composeId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + compose-redeploy: + speakeasy-default-compose-redeploy: + requestBody: + application/json: {"composeId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + compose-stop: + speakeasy-default-compose-stop: + requestBody: + application/json: {"composeId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + compose-getDefaultCommand: + speakeasy-default-compose-get-default-command: + parameters: + query: + composeId: "" + responses: + default: + application/json: {"message": "", "code": ""} + compose-refreshToken: + speakeasy-default-compose-refresh-token: + requestBody: + application/json: {"composeId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + compose-deployTemplate: + speakeasy-default-compose-deploy-template: + requestBody: + application/json: {"projectId": "", "id": ""} + responses: + default: + application/json: {"message": "", "code": ""} + compose-templates: + speakeasy-default-compose-templates: + responses: + default: + application/json: {"message": "", "code": ""} + compose-getTags: + speakeasy-default-compose-get-tags: + responses: + default: + application/json: {"message": "", "code": ""} + user-all: + speakeasy-default-user-all: + responses: + default: + application/json: {"message": "", "code": ""} + user-byAuthId: + speakeasy-default-user-by-auth-id: + parameters: + query: + authId: "" + responses: + default: + application/json: {"message": "", "code": ""} + user-byUserId: + speakeasy-default-user-by-user-id: + parameters: + query: + userId: "" + responses: + default: + application/json: {"message": "", "code": ""} + domain-create: + speakeasy-default-domain-create: + requestBody: + application/json: {"host": "musty-merit.net"} + responses: + default: + application/json: {"message": "", "code": ""} + domain-byApplicationId: + speakeasy-default-domain-by-application-id: + parameters: + query: + applicationId: "" + responses: + default: + application/json: {"message": "", "code": ""} + domain-byComposeId: + speakeasy-default-domain-by-compose-id: + parameters: + query: + composeId: "" + responses: + default: + application/json: {"message": "", "code": ""} + domain-generateDomain: + speakeasy-default-domain-generate-domain: + requestBody: + application/json: {"appName": ""} + responses: + default: + application/json: {"message": "", "code": ""} + domain-update: + speakeasy-default-domain-update: + requestBody: + application/json: {"host": "unruly-toothbrush.info", "domainId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + domain-one: + speakeasy-default-domain-one: + parameters: + query: + domainId: "" + responses: + default: + application/json: {"message": "", "code": ""} + domain-delete: + speakeasy-default-domain-delete: + requestBody: + application/json: {"domainId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + destination-create: + speakeasy-default-destination-create: + requestBody: + application/json: {"name": "", "accessKey": "", "bucket": "", "region": "", "endpoint": "", "secretAccessKey": ""} + responses: + default: + application/json: {"message": "", "code": ""} + destination-testConnection: + speakeasy-default-destination-test-connection: + requestBody: + application/json: {"name": "", "accessKey": "", "bucket": "", "region": "", "endpoint": "", "secretAccessKey": ""} + responses: + default: + application/json: {"message": "", "code": ""} + destination-one: + speakeasy-default-destination-one: + parameters: + query: + destinationId: "" + responses: + default: + application/json: {"message": "", "code": ""} + destination-all: + speakeasy-default-destination-all: + responses: + default: + application/json: {"message": "", "code": ""} + destination-remove: + speakeasy-default-destination-remove: + requestBody: + application/json: {"destinationId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + destination-update: + speakeasy-default-destination-update: + requestBody: + application/json: {"name": "", "accessKey": "", "bucket": "", "region": "", "endpoint": "", "secretAccessKey": "", "destinationId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + backup-create: + speakeasy-default-backup-create: + requestBody: + application/json: {"schedule": "", "prefix": "", "destinationId": "", "database": "", "databaseType": "mysql"} + responses: + default: + application/json: {"message": "", "code": ""} + backup-one: + speakeasy-default-backup-one: + parameters: + query: + backupId: "" + responses: + default: + application/json: {"message": "", "code": ""} + backup-update: + speakeasy-default-backup-update: + requestBody: + application/json: {"schedule": "", "prefix": "", "backupId": "", "destinationId": "", "database": ""} + responses: + default: + application/json: {"message": "", "code": ""} + backup-remove: + speakeasy-default-backup-remove: + requestBody: + application/json: {"backupId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + backup-manualBackupPostgres: + speakeasy-default-backup-manual-backup-postgres: + requestBody: + application/json: {"backupId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + backup-manualBackupMySql: + speakeasy-default-backup-manual-backup-my-sql: + requestBody: + application/json: {"backupId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + backup-manualBackupMariadb: + speakeasy-default-backup-manual-backup-mariadb: + requestBody: + application/json: {"backupId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + backup-manualBackupMongo: + speakeasy-default-backup-manual-backup-mongo: + requestBody: + application/json: {"backupId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + deployment-all: + speakeasy-default-deployment-all: + parameters: + query: + applicationId: "" + responses: + default: + application/json: {"message": "", "code": ""} + deployment-allByCompose: + speakeasy-default-deployment-all-by-compose: + parameters: + query: + composeId: "" + responses: + default: + application/json: {"message": "", "code": ""} + deployment-allByServer: + speakeasy-default-deployment-all-by-server: + parameters: + query: + serverId: "" + responses: + default: + application/json: {"message": "", "code": ""} + mounts-create: + speakeasy-default-mounts-create: + requestBody: + application/json: {"type": "file", "mountPath": "", "serviceType": "application", "serviceId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + mounts-remove: + speakeasy-default-mounts-remove: + requestBody: + application/json: {"mountId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + mounts-one: + speakeasy-default-mounts-one: + parameters: + query: + mountId: "" + responses: + default: + application/json: {"message": "", "code": ""} + mounts-update: + speakeasy-default-mounts-update: + requestBody: + application/json: {"mountId": "", "serviceType": "application"} + responses: + default: + application/json: {"message": "", "code": ""} + certificates-create: + speakeasy-default-certificates-create: + requestBody: + application/json: {"name": "", "certificateData": "", "privateKey": ""} + responses: + default: + application/json: {"message": "", "code": ""} + certificates-one: + speakeasy-default-certificates-one: + parameters: + query: + certificateId: "" + responses: + default: + application/json: {"message": "", "code": ""} + certificates-remove: + speakeasy-default-certificates-remove: + requestBody: + application/json: {"certificateId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + certificates-all: + speakeasy-default-certificates-all: + responses: + default: + application/json: {"message": "", "code": ""} + settings-reloadServer: + speakeasy-default-settings-reload-server: + responses: + default: + application/json: {"message": "", "code": ""} + settings-reloadTraefik: + speakeasy-default-settings-reload-traefik: + responses: + default: + application/json: {"message": "", "code": ""} + settings-toggleDashboard: + speakeasy-default-settings-toggle-dashboard: + requestBody: + application/json: {} + responses: + default: + application/json: {"message": "", "code": ""} + settings-cleanUnusedImages: + speakeasy-default-settings-clean-unused-images: + responses: + default: + application/json: {"message": "", "code": ""} + settings-cleanUnusedVolumes: + speakeasy-default-settings-clean-unused-volumes: + responses: + default: + application/json: {"message": "", "code": ""} + settings-cleanStoppedContainers: + speakeasy-default-settings-clean-stopped-containers: + responses: + default: + application/json: {"message": "", "code": ""} + settings-cleanDockerBuilder: + speakeasy-default-settings-clean-docker-builder: + responses: + default: + application/json: {"message": "", "code": ""} + settings-cleanDockerPrune: + speakeasy-default-settings-clean-docker-prune: + responses: + default: + application/json: {"message": "", "code": ""} + settings-cleanAll: + speakeasy-default-settings-clean-all: + responses: + default: + application/json: {"message": "", "code": ""} + settings-cleanMonitoring: + speakeasy-default-settings-clean-monitoring: + responses: + default: + application/json: {"message": "", "code": ""} + settings-saveSSHPrivateKey: + speakeasy-default-settings-save-SSH-private-key: + requestBody: + application/json: {} + responses: + default: + application/json: {"message": "", "code": ""} + settings-assignDomainServer: + speakeasy-default-settings-assign-domain-server: + requestBody: + application/json: {"host": "pure-alb.biz", "certificateType": "none"} + responses: + default: + application/json: {"message": "", "code": ""} + settings-cleanSSHPrivateKey: + speakeasy-default-settings-clean-SSH-private-key: + responses: + default: + application/json: {"message": "", "code": ""} + settings-updateDockerCleanup: + speakeasy-default-settings-update-docker-cleanup: + requestBody: + application/json: {"enableDockerCleanup": true} + responses: + default: + application/json: {"message": "", "code": ""} + settings-readTraefikConfig: + speakeasy-default-settings-read-traefik-config: + responses: + default: + application/json: {"message": "", "code": ""} + settings-updateTraefikConfig: + speakeasy-default-settings-update-traefik-config: + requestBody: + application/json: {"traefikConfig": ""} + responses: + default: + application/json: {"message": "", "code": ""} + settings-readWebServerTraefikConfig: + speakeasy-default-settings-read-web-server-traefik-config: + responses: + default: + application/json: {"message": "", "code": ""} + settings-updateWebServerTraefikConfig: + speakeasy-default-settings-update-web-server-traefik-config: + requestBody: + application/json: {"traefikConfig": ""} + responses: + default: + application/json: {"message": "", "code": ""} + settings-readMiddlewareTraefikConfig: + speakeasy-default-settings-read-middleware-traefik-config: + responses: + default: + application/json: {"message": "", "code": ""} + settings-updateMiddlewareTraefikConfig: + speakeasy-default-settings-update-middleware-traefik-config: + requestBody: + application/json: {"traefikConfig": ""} + responses: + default: + application/json: {"message": "", "code": ""} + settings-checkAndUpdateImage: + speakeasy-default-settings-check-and-update-image: + responses: + default: + application/json: {"message": "", "code": ""} + settings-updateServer: + speakeasy-default-settings-update-server: + responses: + default: + application/json: {"message": "", "code": ""} + settings-getDokployVersion: + speakeasy-default-settings-get-dokploy-version: + responses: + default: + application/json: {"message": "", "code": ""} + settings-readDirectories: + speakeasy-default-settings-read-directories: + responses: + default: + application/json: {"message": "", "code": ""} + settings-updateTraefikFile: + speakeasy-default-settings-update-traefik-file: + requestBody: + application/json: {"path": "/var/tmp", "traefikConfig": ""} + responses: + default: + application/json: {"message": "", "code": ""} + settings-readTraefikFile: + speakeasy-default-settings-read-traefik-file: + parameters: + query: + path: "/mnt" + responses: + default: + application/json: {"message": "", "code": ""} + settings-getIp: + speakeasy-default-settings-get-ip: + responses: + default: + application/json: {"message": "", "code": ""} + settings-getOpenApiDocument: + speakeasy-default-settings-get-open-api-document: + responses: + default: + application/json: {"message": "", "code": ""} + settings-readTraefikEnv: + speakeasy-default-settings-read-traefik-env: + responses: + default: + application/json: {"message": "", "code": ""} + settings-writeTraefikEnv: + speakeasy-default-settings-write-traefik-env: + requestBody: + application/json: {"env": ""} + responses: + default: + application/json: {"message": "", "code": ""} + settings-haveTraefikDashboardPortEnabled: + speakeasy-default-settings-have-traefik-dashboard-port-enabled: + responses: + default: + application/json: {"message": "", "code": ""} + settings-readStats: + speakeasy-default-settings-read-stats: + responses: + default: + application/json: {"message": "", "code": ""} + settings-getLogRotateStatus: + speakeasy-default-settings-get-log-rotate-status: + responses: + default: + application/json: {"message": "", "code": ""} + settings-toggleLogRotate: + speakeasy-default-settings-toggle-log-rotate: + requestBody: + application/json: {"enable": true} + responses: + default: + application/json: {"message": "", "code": ""} + settings-haveActivateRequests: + speakeasy-default-settings-have-activate-requests: + responses: + default: + application/json: {"message": "", "code": ""} + settings-toggleRequests: + speakeasy-default-settings-toggle-requests: + requestBody: + application/json: {"enable": true} + responses: + default: + application/json: {"message": "", "code": ""} + settings-isCloud: + speakeasy-default-settings-is-cloud: + responses: + default: + application/json: {"message": "", "code": ""} + settings-health: + speakeasy-default-settings-health: + responses: + default: + application/json: {"message": "", "code": ""} + security-create: + speakeasy-default-security-create: + requestBody: + application/json: {"applicationId": "", "username": "Jaida.Zulauf", "password": "K9baGIdLMCnW0iF"} + responses: + default: + application/json: {"message": "", "code": ""} + security-one: + speakeasy-default-security-one: + parameters: + query: + securityId: "" + responses: + default: + application/json: {"message": "", "code": ""} + security-delete: + speakeasy-default-security-delete: + requestBody: + application/json: {"securityId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + security-update: + speakeasy-default-security-update: + requestBody: + application/json: {"securityId": "", "username": "Easter19", "password": "lzeP1olfVZ7Co23"} + responses: + default: + application/json: {"message": "", "code": ""} + redirects-create: + speakeasy-default-redirects-create: + requestBody: + application/json: {"regex": "", "replacement": "", "permanent": false, "applicationId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + redirects-one: + speakeasy-default-redirects-one: + parameters: + query: + redirectId: "" + responses: + default: + application/json: {"message": "", "code": ""} + redirects-delete: + speakeasy-default-redirects-delete: + requestBody: + application/json: {"redirectId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + redirects-update: + speakeasy-default-redirects-update: + requestBody: + application/json: {"redirectId": "", "regex": "", "replacement": "", "permanent": false} + responses: + default: + application/json: {"message": "", "code": ""} + port-create: + speakeasy-default-port-create: + requestBody: + application/json: {"publishedPort": 9167.77, "targetPort": 2161.7, "protocol": "tcp", "applicationId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + port-one: + speakeasy-default-port-one: + parameters: + query: + portId: "" + responses: + default: + application/json: {"message": "", "code": ""} + port-delete: + speakeasy-default-port-delete: + requestBody: + application/json: {"portId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + port-update: + speakeasy-default-port-update: + requestBody: + application/json: {"portId": "", "publishedPort": 7240.07, "targetPort": 9496, "protocol": "tcp"} + responses: + default: + application/json: {"message": "", "code": ""} + registry-create: + speakeasy-default-registry-create: + requestBody: + application/json: {"registryName": "", "username": "Edward97", "password": "Dgmo4uBNDUDA9K5", "registryUrl": "https://cute-declaration.name", "registryType": "cloud", "imagePrefix": ""} + responses: + default: + application/json: {"message": "", "code": ""} + registry-remove: + speakeasy-default-registry-remove: + requestBody: + application/json: {"registryId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + registry-update: + speakeasy-default-registry-update: + requestBody: + application/json: {"registryId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + registry-all: + speakeasy-default-registry-all: + responses: + default: + application/json: {"message": "", "code": ""} + registry-one: + speakeasy-default-registry-one: + parameters: + query: + registryId: "" + responses: + default: + application/json: {"message": "", "code": ""} + registry-testRegistry: + speakeasy-default-registry-test-registry: + requestBody: + application/json: {"registryName": "", "username": "Amani_Kohler", "password": "HbHSp2hcDiXugz1", "registryUrl": "https://biodegradable-priesthood.info/", "registryType": "cloud"} + responses: + default: + application/json: {"message": "", "code": ""} + cluster-getNodes: + speakeasy-default-cluster-get-nodes: + responses: + default: + application/json: {"message": "", "code": ""} + cluster-removeWorker: + speakeasy-default-cluster-remove-worker: + requestBody: + application/json: {"nodeId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + cluster-addWorker: + speakeasy-default-cluster-add-worker: + responses: + default: + application/json: {"message": "", "code": ""} + cluster-addManager: + speakeasy-default-cluster-add-manager: + responses: + default: + application/json: {"message": "", "code": ""} + notification-createSlack: + speakeasy-default-notification-create-slack: + requestBody: + application/json: {"appBuildError": true, "databaseBackup": true, "dokployRestart": false, "name": "", "appDeploy": false, "dockerCleanup": false, "webhookUrl": "https://familiar-custody.name", "channel": ""} + responses: + default: + application/json: {"message": "", "code": ""} + notification-updateSlack: + speakeasy-default-notification-update-slack: + requestBody: + application/json: {"notificationId": "", "slackId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + notification-testSlackConnection: + speakeasy-default-notification-test-slack-connection: + requestBody: + application/json: {"webhookUrl": "https://pointed-institute.com", "channel": ""} + responses: + default: + application/json: {"message": "", "code": ""} + notification-createTelegram: + speakeasy-default-notification-create-telegram: + requestBody: + application/json: {"appBuildError": false, "databaseBackup": true, "dokployRestart": false, "name": "", "appDeploy": true, "dockerCleanup": true, "botToken": "", "chatId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + notification-updateTelegram: + speakeasy-default-notification-update-telegram: + requestBody: + application/json: {"notificationId": "", "telegramId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + notification-testTelegramConnection: + speakeasy-default-notification-test-telegram-connection: + requestBody: + application/json: {"botToken": "", "chatId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + notification-createDiscord: + speakeasy-default-notification-create-discord: + requestBody: + application/json: {"appBuildError": false, "databaseBackup": true, "dokployRestart": false, "name": "", "appDeploy": false, "dockerCleanup": true, "webhookUrl": "https://present-sport.net/"} + responses: + default: + application/json: {"message": "", "code": ""} + notification-updateDiscord: + speakeasy-default-notification-update-discord: + requestBody: + application/json: {"notificationId": "", "discordId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + notification-testDiscordConnection: + speakeasy-default-notification-test-discord-connection: + requestBody: + application/json: {"webhookUrl": "https://radiant-fireplace.net"} + responses: + default: + application/json: {"message": "", "code": ""} + notification-createEmail: + speakeasy-default-notification-create-email: + requestBody: + application/json: {"appBuildError": false, "databaseBackup": false, "dokployRestart": true, "name": "", "appDeploy": false, "dockerCleanup": false, "smtpServer": "", "smtpPort": 8149.3, "username": "Krystal95", "password": "LGAnX2vuZKQTVc9", "fromAddress": "", "toAddresses": []} + responses: + default: + application/json: {"message": "", "code": ""} + notification-updateEmail: + speakeasy-default-notification-update-email: + requestBody: + application/json: {"notificationId": "", "emailId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + notification-testEmailConnection: + speakeasy-default-notification-test-email-connection: + requestBody: + application/json: {"smtpServer": "", "smtpPort": 4799.46, "username": "Rollin96", "password": "xHtlQtIjbn2x0yV", "toAddresses": ["", ""], "fromAddress": ""} + responses: + default: + application/json: {"message": "", "code": ""} + notification-remove: + speakeasy-default-notification-remove: + requestBody: + application/json: {"notificationId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + notification-one: + speakeasy-default-notification-one: + parameters: + query: + notificationId: "" + responses: + default: + application/json: {"message": "", "code": ""} + notification-all: + speakeasy-default-notification-all: + responses: + default: + application/json: {"message": "", "code": ""} + sshKey-create: + speakeasy-default-ssh-key-create: + requestBody: + application/json: {"name": "", "privateKey": "", "publicKey": ""} + responses: + default: + application/json: {"message": "", "code": ""} + sshKey-remove: + speakeasy-default-ssh-key-remove: + requestBody: + application/json: {"sshKeyId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + sshKey-one: + speakeasy-default-ssh-key-one: + parameters: + query: + sshKeyId: "" + responses: + default: + application/json: {"message": "", "code": ""} + sshKey-all: + speakeasy-default-ssh-key-all: + responses: + default: + application/json: {"message": "", "code": ""} + sshKey-generate: + speakeasy-default-ssh-key-generate: + requestBody: + application/json: {} + responses: + default: + application/json: {"message": "", "code": ""} + sshKey-update: + speakeasy-default-ssh-key-update: + requestBody: + application/json: {"sshKeyId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + gitProvider-getAll: + speakeasy-default-git-provider-get-all: + responses: + default: + application/json: {"message": "", "code": ""} + gitProvider-remove: + speakeasy-default-git-provider-remove: + requestBody: + application/json: {"gitProviderId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + bitbucket-create: + speakeasy-default-bitbucket-create: + requestBody: + application/json: {"authId": "", "name": ""} + responses: + default: + application/json: {"message": "", "code": ""} + bitbucket-one: + speakeasy-default-bitbucket-one: + parameters: + query: + bitbucketId: "" + responses: + default: + application/json: {"message": "", "code": ""} + bitbucket-bitbucketProviders: + speakeasy-default-bitbucket-bitbucket-providers: + responses: + default: + application/json: {"message": "", "code": ""} + bitbucket-getBitbucketRepositories: + speakeasy-default-bitbucket-get-bitbucket-repositories: + parameters: + query: + bitbucketId: "" + responses: + default: + application/json: {"message": "", "code": ""} + bitbucket-getBitbucketBranches: + speakeasy-default-bitbucket-get-bitbucket-branches: + parameters: + query: + owner: "" + repo: "" + responses: + default: + application/json: {"message": "", "code": ""} + bitbucket-testConnection: + speakeasy-default-bitbucket-test-connection: + requestBody: + application/json: {"bitbucketId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + bitbucket-update: + speakeasy-default-bitbucket-update: + requestBody: + application/json: {"bitbucketId": "", "gitProviderId": "", "name": ""} + responses: + default: + application/json: {"message": "", "code": ""} + gitlab-create: + speakeasy-default-gitlab-create: + requestBody: + application/json: {"authId": "", "name": ""} + responses: + default: + application/json: {"message": "", "code": ""} + gitlab-one: + speakeasy-default-gitlab-one: + parameters: + query: + gitlabId: "" + responses: + default: + application/json: {"message": "", "code": ""} + gitlab-gitlabProviders: + speakeasy-default-gitlab-gitlab-providers: + responses: + default: + application/json: {"message": "", "code": ""} + gitlab-getGitlabRepositories: + speakeasy-default-gitlab-get-gitlab-repositories: + parameters: + query: + gitlabId: "" + responses: + default: + application/json: {"message": "", "code": ""} + gitlab-getGitlabBranches: + speakeasy-default-gitlab-get-gitlab-branches: + parameters: + query: + owner: "" + repo: "" + responses: + default: + application/json: {"message": "", "code": ""} + gitlab-testConnection: + speakeasy-default-gitlab-test-connection: + requestBody: + application/json: {} + responses: + default: + application/json: {"message": "", "code": ""} + gitlab-update: + speakeasy-default-gitlab-update: + requestBody: + application/json: {"gitlabId": "", "gitProviderId": "", "name": ""} + responses: + default: + application/json: {"message": "", "code": ""} + github-one: + speakeasy-default-github-one: + parameters: + query: + githubId: "" + responses: + default: + application/json: {"message": "", "code": ""} + github-getGithubRepositories: + speakeasy-default-github-get-github-repositories: + parameters: + query: + githubId: "" + responses: + default: + application/json: {"message": "", "code": ""} + github-getGithubBranches: + speakeasy-default-github-get-github-branches: + parameters: + query: + repo: "" + owner: "" + responses: + default: + application/json: {"message": "", "code": ""} + github-githubProviders: + speakeasy-default-github-github-providers: + responses: + default: + application/json: {"message": "", "code": ""} + github-testConnection: + speakeasy-default-github-test-connection: + requestBody: + application/json: {"githubId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + github-update: + speakeasy-default-github-update: + requestBody: + application/json: {"githubId": "", "gitProviderId": "", "name": ""} + responses: + default: + application/json: {"message": "", "code": ""} + server-create: + speakeasy-default-server-create: + requestBody: + application/json: {"name": "", "ipAddress": "8.12.175.213", "port": 9154.55, "username": "Asia_Parker82", "sshKeyId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + server-one: + speakeasy-default-server-one: + parameters: + query: + serverId: "" + responses: + default: + application/json: {"message": "", "code": ""} + server-all: + speakeasy-default-server-all: + responses: + default: + application/json: {"message": "", "code": ""} + server-withSSHKey: + speakeasy-default-server-with-SSH-key: + responses: + default: + application/json: {"message": "", "code": ""} + server-setup: + speakeasy-default-server-setup: + requestBody: + application/json: {"serverId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + server-remove: + speakeasy-default-server-remove: + requestBody: + application/json: {"serverId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + server-update: + speakeasy-default-server-update: + requestBody: + application/json: {"name": "", "serverId": "", "ipAddress": "945d:4a06:ae40:dab4:6ecb:dbfc:8b3d:df1d", "port": 4322.18, "username": "Adelia.Casper", "sshKeyId": ""} + responses: + default: + application/json: {"message": "", "code": ""} + stripe-getProducts: + speakeasy-default-stripe-get-products: + responses: + default: + application/json: {"message": "", "code": ""} + stripe-createCheckoutSession: + speakeasy-default-stripe-create-checkout-session: + requestBody: + application/json: {"productId": "", "serverQuantity": 4592.6, "isAnnual": false} + responses: + default: + application/json: {"message": "", "code": ""} + stripe-createCustomerPortalSession: + speakeasy-default-stripe-create-customer-portal-session: + responses: + default: + application/json: {"message": "", "code": ""} + stripe-canCreateMoreServers: + speakeasy-default-stripe-can-create-more-servers: + responses: + default: + application/json: {"message": "", "code": ""} +examplesVersion: 1.0.2 diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml new file mode 100644 index 0000000..eb0f51a --- /dev/null +++ b/.speakeasy/gen.yaml @@ -0,0 +1,69 @@ +configVersion: 2.0.0 +generation: + devContainers: + enabled: true + schemaPath: .speakeasy/out.openapi.yaml + sdkClassName: Dokploy + maintainOpenAPIOrder: true + usageSnippets: + optionalPropertyRendering: withExample + sdkInitStyle: constructor + useClassNamesForArrayFields: true + fixes: + nameResolutionDec2023: true + nameResolutionFeb2025: true + parameterOrderingFeb2024: true + requestResponseComponentNamesFeb2024: true + securityFeb2025: true + sharedErrorComponentsApr2025: true + auth: + oAuth2ClientCredentialsEnabled: true + oAuth2PasswordEnabled: true + hoistGlobalSecurity: true + inferSSEOverload: true + sdkHooksConfigAccess: true + tests: + generateTests: false + generateNewTests: true + skipResponseBodyAssertions: false +typescript: + version: 0.1.2 + additionalDependencies: + dependencies: {} + devDependencies: {} + peerDependencies: {} + additionalPackageJSON: {} + author: Speakeasy + baseErrorName: DokployError + clientServerStatusCodesAsErrors: true + constFieldsAlwaysOptional: false + defaultErrorName: DokployDefaultError + enableCustomCodeRegions: false + enableMCPServer: false + enableReactQuery: false + enumFormat: union + envVarPrefix: DOKPLOY + flattenGlobalSecurity: true + flatteningOrder: parameters-first + generateExamples: true + imports: + option: openapi + paths: + callbacks: models/callbacks + errors: models/errors + operations: models/operations + shared: models + webhooks: models/webhooks + inputModelSuffix: input + jsonpath: rfc9535 + maxMethodParams: 0 + methodArguments: infer-optional-args + modelPropertyCasing: camel + moduleFormat: dual + outputModelSuffix: output + packageName: dokploy + responseFormat: flat + sseFlatResponse: true + templateVersion: v2 + usageSDKInitImports: [] + useIndexModules: true diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml new file mode 100644 index 0000000..622d4a3 --- /dev/null +++ b/.speakeasy/out.openapi.yaml @@ -0,0 +1,8526 @@ +openapi: "3.0.3" +info: + title: "Dokploy API" + description: "Endpoints for dokploy" + version: "1.0.0" +servers: + - url: "http://your-dokploy-instance.com/api" +paths: + "/admin.one": + get: + operationId: "admin-one" + tags: + - "admin" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "get-one" + "/admin.createUserInvitation": + post: + operationId: "admin-createUserInvitation" + tags: + - "admin" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "email": + type: "string" + format: "email" + required: + - "email" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "createUserInvitation" + "/admin.removeUser": + post: + operationId: "admin-removeUser" + tags: + - "admin" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "authId": + type: "string" + minLength: 1 + required: + - "authId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "remove-user" + "/admin.getUserByToken": + get: + operationId: "admin-getUserByToken" + tags: + - "admin" + security: + - Authorization: [] + parameters: + - name: "token" + in: "query" + required: true + schema: + type: "string" + minLength: 1 + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "getUserByToken" + "/admin.assignPermissions": + post: + operationId: "admin-assignPermissions" + tags: + - "admin" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "userId": + type: "string" + minLength: 1 + "canCreateProjects": + type: "boolean" + "canCreateServices": + type: "boolean" + "canDeleteProjects": + type: "boolean" + "canDeleteServices": + type: "boolean" + "accesedProjects": + type: "array" + items: + type: "string" + "accesedServices": + type: "array" + items: + type: "string" + "canAccessToTraefikFiles": + type: "boolean" + "canAccessToDocker": + type: "boolean" + "canAccessToAPI": + type: "boolean" + "canAccessToSSHKeys": + type: "boolean" + "canAccessToGitProviders": + type: "boolean" + required: + - "userId" + - "canCreateProjects" + - "canCreateServices" + - "canDeleteProjects" + - "canDeleteServices" + - "accesedProjects" + - "accesedServices" + - "canAccessToTraefikFiles" + - "canAccessToDocker" + - "canAccessToAPI" + - "canAccessToSSHKeys" + - "canAccessToGitProviders" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "assignPermissions" + "/docker.getContainers": + get: + operationId: "docker-getContainers" + tags: + - "docker" + security: + - Authorization: [] + parameters: + - name: "serverId" + in: "query" + required: false + schema: + type: "string" + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "get-containers" + "/docker.restartContainer": + post: + operationId: "docker-restartContainer" + tags: + - "docker" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "containerId": + type: "string" + minLength: 1 + required: + - "containerId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "restartContainer" + "/docker.getConfig": + get: + operationId: "docker-getConfig" + tags: + - "docker" + security: + - Authorization: [] + parameters: + - name: "containerId" + in: "query" + required: true + schema: + type: "string" + minLength: 1 + - name: "serverId" + in: "query" + required: false + schema: + type: "string" + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "get-config" + "/docker.getContainersByAppNameMatch": + get: + operationId: "docker-getContainersByAppNameMatch" + tags: + - "docker" + security: + - Authorization: [] + parameters: + - name: "appType" + in: "query" + required: false + schema: + anyOf: + - type: "string" + enum: + - "stack" + - type: "string" + enum: + - "docker-compose" + - name: "appName" + in: "query" + required: true + schema: + type: "string" + minLength: 1 + - name: "serverId" + in: "query" + required: false + schema: + type: "string" + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "getContainersByAppNameMatch" + "/docker.getContainersByAppLabel": + get: + operationId: "docker-getContainersByAppLabel" + tags: + - "docker" + security: + - Authorization: [] + parameters: + - name: "appName" + in: "query" + required: true + schema: + type: "string" + minLength: 1 + - name: "serverId" + in: "query" + required: false + schema: + type: "string" + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "get-containers-by-app-label" + "/auth.createAdmin": + post: + operationId: "auth-createAdmin" + tags: + - "auth" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "email": + type: "string" + format: "email" + "password": + type: "string" + minLength: 8 + required: + - "email" + - "password" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "createAdmin" + "/auth.createUser": + post: + operationId: "auth-createUser" + tags: + - "auth" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "password": + type: "string" + minLength: 8 + "id": + type: "string" + "token": + type: "string" + minLength: 1 + required: + - "password" + - "id" + - "token" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "create-user" + "/auth.login": + post: + operationId: "auth-login" + tags: + - "auth" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "email": + type: "string" + format: "email" + "password": + type: "string" + minLength: 8 + required: + - "email" + - "password" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "login" + "/auth.get": + get: + operationId: "auth-get" + tags: + - "auth" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "getOne" + "/auth.logout": + post: + operationId: "auth-logout" + tags: + - "auth" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "logout" + "/auth.update": + post: + operationId: "auth-update" + tags: + - "auth" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "id": + type: "string" + "email": + type: "string" + nullable: true + "password": + type: "string" + nullable: true + "rol": + type: "string" + enum: + - "admin" + - "user" + "image": + type: "string" + "secret": + type: "string" + nullable: true + "token": + type: "string" + nullable: true + "is2FAEnabled": + type: "boolean" + "createdAt": + type: "string" + "resetPasswordToken": + type: "string" + nullable: true + "resetPasswordExpiresAt": + type: "string" + nullable: true + "confirmationToken": + type: "string" + nullable: true + "confirmationExpiresAt": + type: "string" + nullable: true + required: + - "email" + - "password" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "update" + "/auth.generateToken": + post: + operationId: "auth-generateToken" + tags: + - "auth" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "generateToken" + "/auth.one": + get: + operationId: "auth-one" + tags: + - "auth" + security: + - Authorization: [] + parameters: + - name: "id" + in: "query" + required: true + schema: + type: "string" + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "get" + "/auth.generate2FASecret": + get: + operationId: "auth-generate2FASecret" + tags: + - "auth" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "generate2FASecret" + "/auth.verify2FASetup": + post: + operationId: "auth-verify2FASetup" + tags: + - "auth" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "pin": + type: "string" + minLength: 6 + "secret": + type: "string" + minLength: 1 + required: + - "pin" + - "secret" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "verify-2fa-setup" + "/auth.verifyLogin2FA": + post: + operationId: "auth-verifyLogin2FA" + tags: + - "auth" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "pin": + type: "string" + minLength: 6 + "id": + type: "string" + required: + - "pin" + - "id" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "verifyLogin2FA" + "/auth.disable2FA": + post: + operationId: "auth-disable2FA" + tags: + - "auth" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "disable2FA" + "/auth.sendResetPasswordEmail": + post: + operationId: "auth-sendResetPasswordEmail" + tags: + - "auth" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "email": + type: "string" + minLength: 1 + format: "email" + required: + - "email" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "sendResetPasswordEmail" + "/auth.resetPassword": + post: + operationId: "auth-resetPassword" + tags: + - "auth" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "resetPasswordToken": + type: "string" + minLength: 1 + "password": + type: "string" + minLength: 1 + required: + - "resetPasswordToken" + - "password" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "reset-password" + "/auth.confirmEmail": + post: + operationId: "auth-confirmEmail" + tags: + - "auth" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "confirmationToken": + type: "string" + minLength: 1 + required: + - "confirmationToken" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "confirm-email" + "/project.create": + post: + operationId: "project-create" + tags: + - "project" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "name": + type: "string" + minLength: 1 + "description": + type: "string" + nullable: true + required: + - "name" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "create" + "/project.one": + get: + operationId: "project-one" + tags: + - "project" + security: + - Authorization: [] + parameters: + - name: "projectId" + in: "query" + required: true + schema: + type: "string" + minLength: 1 + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "get" + "/project.all": + get: + operationId: "project-all" + tags: + - "project" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "all" + "/project.remove": + post: + operationId: "project-remove" + tags: + - "project" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "projectId": + type: "string" + minLength: 1 + required: + - "projectId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "remove" + "/project.update": + post: + operationId: "project-update" + tags: + - "project" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "name": + type: "string" + minLength: 1 + "description": + type: "string" + nullable: true + "projectId": + type: "string" + minLength: 1 + required: + - "name" + - "projectId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "update" + "/application.create": + post: + operationId: "application-create" + tags: + - "application" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "name": + type: "string" + minLength: 1 + "appName": + type: "string" + "description": + type: "string" + nullable: true + "projectId": + type: "string" + "serverId": + type: "string" + nullable: true + required: + - "name" + - "projectId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "create" + "/application.one": + get: + operationId: "application-one" + tags: + - "application" + security: + - Authorization: [] + parameters: + - name: "applicationId" + in: "query" + required: true + schema: + type: "string" + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "getOne" + "/application.reload": + post: + operationId: "application-reload" + tags: + - "application" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "appName": + type: "string" + "applicationId": + type: "string" + required: + - "appName" + - "applicationId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "reload" + "/application.delete": + post: + operationId: "application-delete" + tags: + - "application" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "applicationId": + type: "string" + required: + - "applicationId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "delete" + "/application.stop": + post: + operationId: "application-stop" + tags: + - "application" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "applicationId": + type: "string" + required: + - "applicationId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "stop" + "/application.start": + post: + operationId: "application-start" + tags: + - "application" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "applicationId": + type: "string" + required: + - "applicationId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "start" + "/application.redeploy": + post: + operationId: "application-redeploy" + tags: + - "application" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "applicationId": + type: "string" + required: + - "applicationId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "redeploy" + "/application.saveEnvironment": + post: + operationId: "application-saveEnvironment" + tags: + - "application" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "applicationId": + type: "string" + "env": + type: "string" + nullable: true + "buildArgs": + type: "string" + nullable: true + required: + - "applicationId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "save-environment" + "/application.saveBuildType": + post: + operationId: "application-saveBuildType" + tags: + - "application" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "applicationId": + type: "string" + "buildType": + type: "string" + enum: + - "dockerfile" + - "heroku_buildpacks" + - "paketo_buildpacks" + - "nixpacks" + - "static" + "dockerfile": + type: "string" + nullable: true + "dockerContextPath": + type: "string" + nullable: true + "dockerBuildStage": + type: "string" + nullable: true + "publishDirectory": + type: "string" + nullable: true + required: + - "applicationId" + - "buildType" + - "dockerContextPath" + - "dockerBuildStage" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "saveBuildType" + "/application.saveGithubProvider": + post: + operationId: "application-saveGithubProvider" + tags: + - "application" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "applicationId": + type: "string" + "repository": + type: "string" + nullable: true + "branch": + type: "string" + nullable: true + "owner": + type: "string" + nullable: true + "buildPath": + type: "string" + nullable: true + "githubId": + type: "string" + nullable: true + required: + - "applicationId" + - "owner" + - "githubId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "saveGithubProvider" + "/application.saveGitlabProvider": + post: + operationId: "application-saveGitlabProvider" + tags: + - "application" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "applicationId": + type: "string" + "gitlabBranch": + type: "string" + nullable: true + "gitlabBuildPath": + type: "string" + nullable: true + "gitlabOwner": + type: "string" + nullable: true + "gitlabRepository": + type: "string" + nullable: true + "gitlabId": + type: "string" + nullable: true + "gitlabProjectId": + type: "number" + nullable: true + "gitlabPathNamespace": + type: "string" + nullable: true + required: + - "applicationId" + - "gitlabBranch" + - "gitlabBuildPath" + - "gitlabOwner" + - "gitlabRepository" + - "gitlabId" + - "gitlabProjectId" + - "gitlabPathNamespace" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "save-gitlab-provider" + "/application.saveBitbucketProvider": + post: + operationId: "application-saveBitbucketProvider" + tags: + - "application" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "bitbucketBranch": + type: "string" + nullable: true + "bitbucketBuildPath": + type: "string" + nullable: true + "bitbucketOwner": + type: "string" + nullable: true + "bitbucketRepository": + type: "string" + nullable: true + "bitbucketId": + type: "string" + nullable: true + "applicationId": + type: "string" + required: + - "bitbucketBranch" + - "bitbucketBuildPath" + - "bitbucketOwner" + - "bitbucketRepository" + - "bitbucketId" + - "applicationId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "saveBitbucketProvider" + "/application.saveDockerProvider": + post: + operationId: "application-saveDockerProvider" + tags: + - "application" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "dockerImage": + type: "string" + nullable: true + "applicationId": + type: "string" + "username": + type: "string" + nullable: true + "password": + type: "string" + nullable: true + required: + - "applicationId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "save-docker-provider" + "/application.saveGitProdiver": + post: + operationId: "application-saveGitProdiver" + tags: + - "application" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "customGitBranch": + type: "string" + nullable: true + "applicationId": + type: "string" + "customGitBuildPath": + type: "string" + nullable: true + "customGitUrl": + type: "string" + nullable: true + "customGitSSHKeyId": + type: "string" + nullable: true + required: + - "applicationId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "save-git-prodiver" + "/application.markRunning": + post: + operationId: "application-markRunning" + tags: + - "application" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "applicationId": + type: "string" + required: + - "applicationId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "markRunning" + "/application.update": + post: + operationId: "application-update" + tags: + - "application" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "applicationId": + type: "string" + minLength: 1 + "name": + type: "string" + minLength: 1 + "appName": + type: "string" + "description": + type: "string" + nullable: true + "env": + type: "string" + nullable: true + "buildArgs": + type: "string" + nullable: true + "memoryReservation": + type: "number" + nullable: true + "memoryLimit": + type: "number" + nullable: true + "cpuReservation": + type: "number" + nullable: true + "cpuLimit": + type: "number" + nullable: true + "title": + type: "string" + nullable: true + "enabled": + type: "boolean" + nullable: true + "subtitle": + type: "string" + nullable: true + "command": + type: "string" + nullable: true + "refreshToken": + type: "string" + nullable: true + "sourceType": + type: "string" + enum: + - "github" + - "docker" + - "git" + "repository": + type: "string" + nullable: true + "owner": + type: "string" + nullable: true + "branch": + type: "string" + nullable: true + "buildPath": + type: "string" + nullable: true + "autoDeploy": + type: "boolean" + nullable: true + "gitlabProjectId": + type: "number" + nullable: true + "gitlabRepository": + type: "string" + nullable: true + "gitlabOwner": + type: "string" + nullable: true + "gitlabBranch": + type: "string" + nullable: true + "gitlabBuildPath": + type: "string" + nullable: true + "gitlabPathNamespace": + type: "string" + nullable: true + "bitbucketRepository": + type: "string" + nullable: true + "bitbucketOwner": + type: "string" + nullable: true + "bitbucketBranch": + type: "string" + nullable: true + "bitbucketBuildPath": + type: "string" + nullable: true + "username": + type: "string" + nullable: true + "password": + type: "string" + nullable: true + "dockerImage": + type: "string" + nullable: true + "customGitUrl": + type: "string" + nullable: true + "customGitBranch": + type: "string" + nullable: true + "customGitBuildPath": + type: "string" + nullable: true + "customGitSSHKeyId": + type: "string" + nullable: true + "dockerfile": + type: "string" + nullable: true + "dockerContextPath": + type: "string" + nullable: true + "dockerBuildStage": + type: "string" + nullable: true + "dropBuildPath": + type: "string" + nullable: true + "healthCheckSwarm": + type: "object" + properties: + "Test": + type: "array" + items: + type: "string" + "Interval": + type: "number" + "Timeout": + type: "number" + "StartPeriod": + type: "number" + "Retries": + type: "number" + additionalProperties: false + nullable: true + "restartPolicySwarm": + type: "object" + properties: + "Condition": + type: "string" + "Delay": + type: "number" + "MaxAttempts": + type: "number" + "Window": + type: "number" + additionalProperties: false + nullable: true + "placementSwarm": + type: "object" + properties: + "Constraints": + type: "array" + items: + type: "string" + "Preferences": + type: "array" + items: + type: "object" + properties: + "Spread": + type: "object" + properties: + "SpreadDescriptor": + type: "string" + required: + - "SpreadDescriptor" + additionalProperties: false + required: + - "Spread" + additionalProperties: false + "MaxReplicas": + type: "number" + "Platforms": + type: "array" + items: + type: "object" + properties: + "Architecture": + type: "string" + "OS": + type: "string" + required: + - "Architecture" + - "OS" + additionalProperties: false + additionalProperties: false + nullable: true + "updateConfigSwarm": + type: "object" + properties: + "Parallelism": + type: "number" + "Delay": + type: "number" + "FailureAction": + type: "string" + "Monitor": + type: "number" + "MaxFailureRatio": + type: "number" + "Order": + type: "string" + required: + - "Parallelism" + - "Order" + additionalProperties: false + nullable: true + "rollbackConfigSwarm": + type: "object" + properties: + "Parallelism": + type: "number" + "Delay": + type: "number" + "FailureAction": + type: "string" + "Monitor": + type: "number" + "MaxFailureRatio": + type: "number" + "Order": + type: "string" + required: + - "Parallelism" + - "Order" + additionalProperties: false + nullable: true + "modeSwarm": + type: "object" + properties: + "Replicated": + type: "object" + properties: + "Replicas": + type: "number" + additionalProperties: false + "Global": + type: "object" + additionalProperties: false + "ReplicatedJob": + type: "object" + properties: + "MaxConcurrent": + type: "number" + "TotalCompletions": + type: "number" + additionalProperties: false + "GlobalJob": + type: "object" + additionalProperties: false + additionalProperties: false + nullable: true + "labelsSwarm": + type: "object" + additionalProperties: + type: "string" + nullable: true + "networkSwarm": + type: "array" + items: + type: "object" + properties: + "Target": + type: "string" + "Aliases": + type: "array" + items: + type: "string" + "DriverOpts": + type: "object" + additionalProperties: false + additionalProperties: false + nullable: true + "replicas": + type: "number" + "applicationStatus": + type: "string" + enum: + - "idle" + - "running" + - "done" + - "error" + "buildType": + type: "string" + enum: + - "dockerfile" + - "heroku_buildpacks" + - "paketo_buildpacks" + - "nixpacks" + - "static" + "publishDirectory": + type: "string" + nullable: true + "createdAt": + type: "string" + "registryId": + type: "string" + nullable: true + "projectId": + type: "string" + "githubId": + type: "string" + nullable: true + "gitlabId": + type: "string" + nullable: true + "bitbucketId": + type: "string" + nullable: true + required: + - "applicationId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "update" + "/application.refreshToken": + post: + operationId: "application-refreshToken" + tags: + - "application" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "applicationId": + type: "string" + required: + - "applicationId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "refresh-token" + "/application.deploy": + post: + operationId: "application-deploy" + tags: + - "application" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "applicationId": + type: "string" + required: + - "applicationId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "deploy" + "/application.cleanQueues": + post: + operationId: "application-cleanQueues" + tags: + - "application" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "applicationId": + type: "string" + required: + - "applicationId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "clean-queues" + "/application.readTraefikConfig": + get: + operationId: "application-readTraefikConfig" + tags: + - "application" + security: + - Authorization: [] + parameters: + - name: "applicationId" + in: "query" + required: true + schema: + type: "string" + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "readTraefikConfig" + "/application.updateTraefikConfig": + post: + operationId: "application-updateTraefikConfig" + tags: + - "application" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "applicationId": + type: "string" + "traefikConfig": + type: "string" + required: + - "applicationId" + - "traefikConfig" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "updateTraefikConfig" + "/application.readAppMonitoring": + get: + operationId: "application-readAppMonitoring" + tags: + - "application" + security: + - Authorization: [] + parameters: + - name: "appName" + in: "query" + required: true + schema: + type: "string" + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "read-app-monitoring" + "/mysql.create": + post: + operationId: "mysql-create" + tags: + - "mysql" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "name": + type: "string" + minLength: 1 + "appName": + type: "string" + minLength: 1 + "dockerImage": + type: "string" + default: "mysql:8" + "projectId": + type: "string" + "description": + type: "string" + nullable: true + "databaseName": + type: "string" + minLength: 1 + "databaseUser": + type: "string" + minLength: 1 + "databasePassword": + type: "string" + "databaseRootPassword": + type: "string" + "serverId": + type: "string" + nullable: true + required: + - "name" + - "appName" + - "projectId" + - "databaseName" + - "databaseUser" + - "databasePassword" + - "databaseRootPassword" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "create" + "/mysql.one": + get: + operationId: "mysql-one" + tags: + - "mysql" + security: + - Authorization: [] + parameters: + - name: "mysqlId" + in: "query" + required: true + schema: + type: "string" + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "get" + "/mysql.start": + post: + operationId: "mysql-start" + tags: + - "mysql" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "mysqlId": + type: "string" + required: + - "mysqlId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "start" + "/mysql.stop": + post: + operationId: "mysql-stop" + tags: + - "mysql" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "mysqlId": + type: "string" + required: + - "mysqlId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "stop" + "/mysql.saveExternalPort": + post: + operationId: "mysql-saveExternalPort" + tags: + - "mysql" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "mysqlId": + type: "string" + "externalPort": + type: "number" + nullable: true + required: + - "mysqlId" + - "externalPort" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "saveExternalPort" + "/mysql.deploy": + post: + operationId: "mysql-deploy" + tags: + - "mysql" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "mysqlId": + type: "string" + required: + - "mysqlId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "deploy" + "/mysql.changeStatus": + post: + operationId: "mysql-changeStatus" + tags: + - "mysql" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "mysqlId": + type: "string" + "applicationStatus": + type: "string" + enum: + - "idle" + - "running" + - "done" + - "error" + required: + - "mysqlId" + - "applicationStatus" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "changeStatus" + "/mysql.reload": + post: + operationId: "mysql-reload" + tags: + - "mysql" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "mysqlId": + type: "string" + "appName": + type: "string" + minLength: 1 + required: + - "mysqlId" + - "appName" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "reload" + "/mysql.remove": + post: + operationId: "mysql-remove" + tags: + - "mysql" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "mysqlId": + type: "string" + required: + - "mysqlId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "remove" + "/mysql.saveEnvironment": + post: + operationId: "mysql-saveEnvironment" + tags: + - "mysql" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "mysqlId": + type: "string" + "env": + type: "string" + nullable: true + required: + - "mysqlId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "save-environment" + "/mysql.update": + post: + operationId: "mysql-update" + tags: + - "mysql" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "mysqlId": + type: "string" + minLength: 1 + "name": + type: "string" + minLength: 1 + "appName": + type: "string" + minLength: 1 + "description": + type: "string" + nullable: true + "databaseName": + type: "string" + minLength: 1 + "databaseUser": + type: "string" + minLength: 1 + "databasePassword": + type: "string" + "databaseRootPassword": + type: "string" + "dockerImage": + type: "string" + default: "mysql:8" + "command": + type: "string" + nullable: true + "env": + type: "string" + nullable: true + "memoryReservation": + type: "number" + nullable: true + "memoryLimit": + type: "number" + nullable: true + "cpuReservation": + type: "number" + nullable: true + "cpuLimit": + type: "number" + nullable: true + "externalPort": + type: "number" + nullable: true + "applicationStatus": + type: "string" + enum: + - "idle" + - "running" + - "done" + - "error" + "createdAt": + type: "string" + "projectId": + type: "string" + required: + - "mysqlId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "update" + "/postgres.create": + post: + operationId: "postgres-create" + tags: + - "postgres" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "name": + type: "string" + minLength: 1 + "appName": + type: "string" + "databaseName": + type: "string" + minLength: 1 + "databaseUser": + type: "string" + minLength: 1 + "databasePassword": + type: "string" + "dockerImage": + type: "string" + default: "postgres:15" + "projectId": + type: "string" + "description": + type: "string" + nullable: true + "serverId": + type: "string" + nullable: true + required: + - "name" + - "appName" + - "databaseName" + - "databaseUser" + - "databasePassword" + - "projectId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "create" + "/postgres.one": + get: + operationId: "postgres-one" + tags: + - "postgres" + security: + - Authorization: [] + parameters: + - name: "postgresId" + in: "query" + required: true + schema: + type: "string" + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "get" + "/postgres.start": + post: + operationId: "postgres-start" + tags: + - "postgres" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "postgresId": + type: "string" + required: + - "postgresId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "start" + "/postgres.stop": + post: + operationId: "postgres-stop" + tags: + - "postgres" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "postgresId": + type: "string" + required: + - "postgresId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "stop" + "/postgres.saveExternalPort": + post: + operationId: "postgres-saveExternalPort" + tags: + - "postgres" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "postgresId": + type: "string" + "externalPort": + type: "number" + nullable: true + required: + - "postgresId" + - "externalPort" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "save-external-port" + "/postgres.deploy": + post: + operationId: "postgres-deploy" + tags: + - "postgres" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "postgresId": + type: "string" + required: + - "postgresId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "deploy" + "/postgres.changeStatus": + post: + operationId: "postgres-changeStatus" + tags: + - "postgres" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "postgresId": + type: "string" + "applicationStatus": + type: "string" + enum: + - "idle" + - "running" + - "done" + - "error" + required: + - "postgresId" + - "applicationStatus" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "changeStatus" + "/postgres.remove": + post: + operationId: "postgres-remove" + tags: + - "postgres" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "postgresId": + type: "string" + required: + - "postgresId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "remove" + "/postgres.saveEnvironment": + post: + operationId: "postgres-saveEnvironment" + tags: + - "postgres" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "postgresId": + type: "string" + "env": + type: "string" + nullable: true + required: + - "postgresId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "saveEnvironment" + "/postgres.reload": + post: + operationId: "postgres-reload" + tags: + - "postgres" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "postgresId": + type: "string" + "appName": + type: "string" + required: + - "postgresId" + - "appName" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "reload" + "/postgres.update": + post: + operationId: "postgres-update" + tags: + - "postgres" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "postgresId": + type: "string" + minLength: 1 + "name": + type: "string" + minLength: 1 + "appName": + type: "string" + "databaseName": + type: "string" + minLength: 1 + "databaseUser": + type: "string" + minLength: 1 + "databasePassword": + type: "string" + "description": + type: "string" + nullable: true + "dockerImage": + type: "string" + default: "postgres:15" + "command": + type: "string" + nullable: true + "env": + type: "string" + nullable: true + "memoryReservation": + type: "number" + nullable: true + "externalPort": + type: "number" + nullable: true + "memoryLimit": + type: "number" + nullable: true + "cpuReservation": + type: "number" + nullable: true + "cpuLimit": + type: "number" + nullable: true + "applicationStatus": + type: "string" + enum: + - "idle" + - "running" + - "done" + - "error" + "createdAt": + type: "string" + "projectId": + type: "string" + required: + - "postgresId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "update" + "/redis.create": + post: + operationId: "redis-create" + tags: + - "redis" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "name": + type: "string" + minLength: 1 + "appName": + type: "string" + minLength: 1 + "databasePassword": + type: "string" + "dockerImage": + type: "string" + default: "redis:8" + "projectId": + type: "string" + "description": + type: "string" + nullable: true + "serverId": + type: "string" + nullable: true + required: + - "name" + - "appName" + - "databasePassword" + - "projectId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "create" + "/redis.one": + get: + operationId: "redis-one" + tags: + - "redis" + security: + - Authorization: [] + parameters: + - name: "redisId" + in: "query" + required: true + schema: + type: "string" + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "get" + "/redis.start": + post: + operationId: "redis-start" + tags: + - "redis" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "redisId": + type: "string" + required: + - "redisId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "start" + "/redis.reload": + post: + operationId: "redis-reload" + tags: + - "redis" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "redisId": + type: "string" + "appName": + type: "string" + minLength: 1 + required: + - "redisId" + - "appName" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "reload" + "/redis.stop": + post: + operationId: "redis-stop" + tags: + - "redis" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "redisId": + type: "string" + required: + - "redisId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "stop" + "/redis.saveExternalPort": + post: + operationId: "redis-saveExternalPort" + tags: + - "redis" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "redisId": + type: "string" + "externalPort": + type: "number" + nullable: true + required: + - "redisId" + - "externalPort" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "save-external-port" + "/redis.deploy": + post: + operationId: "redis-deploy" + tags: + - "redis" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "redisId": + type: "string" + required: + - "redisId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "deploy" + "/redis.changeStatus": + post: + operationId: "redis-changeStatus" + tags: + - "redis" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "redisId": + type: "string" + "applicationStatus": + type: "string" + enum: + - "idle" + - "running" + - "done" + - "error" + required: + - "redisId" + - "applicationStatus" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "changeStatus" + "/redis.remove": + post: + operationId: "redis-remove" + tags: + - "redis" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "redisId": + type: "string" + required: + - "redisId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "remove" + "/redis.saveEnvironment": + post: + operationId: "redis-saveEnvironment" + tags: + - "redis" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "redisId": + type: "string" + "env": + type: "string" + nullable: true + required: + - "redisId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "save-environment" + "/redis.update": + post: + operationId: "redis-update" + tags: + - "redis" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "redisId": + type: "string" + minLength: 1 + "name": + type: "string" + minLength: 1 + "appName": + type: "string" + minLength: 1 + "description": + type: "string" + nullable: true + "databasePassword": + type: "string" + "dockerImage": + type: "string" + default: "redis:8" + "command": + type: "string" + nullable: true + "env": + type: "string" + nullable: true + "memoryReservation": + type: "number" + nullable: true + "memoryLimit": + type: "number" + nullable: true + "cpuReservation": + type: "number" + nullable: true + "cpuLimit": + type: "number" + nullable: true + "externalPort": + type: "number" + nullable: true + "createdAt": + type: "string" + "applicationStatus": + type: "string" + enum: + - "idle" + - "running" + - "done" + - "error" + "projectId": + type: "string" + required: + - "redisId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "update" + "/mongo.create": + post: + operationId: "mongo-create" + tags: + - "mongo" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "name": + type: "string" + minLength: 1 + "appName": + type: "string" + minLength: 1 + "dockerImage": + type: "string" + default: "mongo:15" + "projectId": + type: "string" + "description": + type: "string" + nullable: true + "databaseUser": + type: "string" + minLength: 1 + "databasePassword": + type: "string" + "serverId": + type: "string" + nullable: true + required: + - "name" + - "appName" + - "projectId" + - "databaseUser" + - "databasePassword" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "create" + "/mongo.one": + get: + operationId: "mongo-one" + tags: + - "mongo" + security: + - Authorization: [] + parameters: + - name: "mongoId" + in: "query" + required: true + schema: + type: "string" + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "get" + "/mongo.start": + post: + operationId: "mongo-start" + tags: + - "mongo" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "mongoId": + type: "string" + required: + - "mongoId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "start" + "/mongo.stop": + post: + operationId: "mongo-stop" + tags: + - "mongo" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "mongoId": + type: "string" + required: + - "mongoId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "stop" + "/mongo.saveExternalPort": + post: + operationId: "mongo-saveExternalPort" + tags: + - "mongo" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "mongoId": + type: "string" + "externalPort": + type: "number" + nullable: true + required: + - "mongoId" + - "externalPort" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "save-external-port" + "/mongo.deploy": + post: + operationId: "mongo-deploy" + tags: + - "mongo" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "mongoId": + type: "string" + required: + - "mongoId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "deploy" + "/mongo.changeStatus": + post: + operationId: "mongo-changeStatus" + tags: + - "mongo" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "mongoId": + type: "string" + "applicationStatus": + type: "string" + enum: + - "idle" + - "running" + - "done" + - "error" + required: + - "mongoId" + - "applicationStatus" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "change-status" + "/mongo.reload": + post: + operationId: "mongo-reload" + tags: + - "mongo" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "mongoId": + type: "string" + "appName": + type: "string" + minLength: 1 + required: + - "mongoId" + - "appName" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "reload" + "/mongo.remove": + post: + operationId: "mongo-remove" + tags: + - "mongo" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "mongoId": + type: "string" + required: + - "mongoId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "remove" + "/mongo.saveEnvironment": + post: + operationId: "mongo-saveEnvironment" + tags: + - "mongo" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "mongoId": + type: "string" + "env": + type: "string" + nullable: true + required: + - "mongoId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "save-environment" + "/mongo.update": + post: + operationId: "mongo-update" + tags: + - "mongo" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "mongoId": + type: "string" + minLength: 1 + "name": + type: "string" + minLength: 1 + "appName": + type: "string" + minLength: 1 + "description": + type: "string" + nullable: true + "databaseUser": + type: "string" + minLength: 1 + "databasePassword": + type: "string" + "dockerImage": + type: "string" + default: "mongo:15" + "command": + type: "string" + nullable: true + "env": + type: "string" + nullable: true + "memoryReservation": + type: "number" + nullable: true + "memoryLimit": + type: "number" + nullable: true + "cpuReservation": + type: "number" + nullable: true + "cpuLimit": + type: "number" + nullable: true + "externalPort": + type: "number" + nullable: true + "applicationStatus": + type: "string" + enum: + - "idle" + - "running" + - "done" + - "error" + "createdAt": + type: "string" + "projectId": + type: "string" + required: + - "mongoId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "update" + "/mariadb.create": + post: + operationId: "mariadb-create" + tags: + - "mariadb" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "name": + type: "string" + minLength: 1 + "appName": + type: "string" + minLength: 1 + "dockerImage": + type: "string" + default: "mariadb:6" + "databaseRootPassword": + type: "string" + "projectId": + type: "string" + "description": + type: "string" + nullable: true + "databaseName": + type: "string" + minLength: 1 + "databaseUser": + type: "string" + minLength: 1 + "databasePassword": + type: "string" + "serverId": + type: "string" + nullable: true + required: + - "name" + - "appName" + - "databaseRootPassword" + - "projectId" + - "databaseName" + - "databaseUser" + - "databasePassword" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "create" + "/mariadb.one": + get: + operationId: "mariadb-one" + tags: + - "mariadb" + security: + - Authorization: [] + parameters: + - name: "mariadbId" + in: "query" + required: true + schema: + type: "string" + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "get" + "/mariadb.start": + post: + operationId: "mariadb-start" + tags: + - "mariadb" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "mariadbId": + type: "string" + required: + - "mariadbId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "start" + "/mariadb.stop": + post: + operationId: "mariadb-stop" + tags: + - "mariadb" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "mariadbId": + type: "string" + required: + - "mariadbId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "stop" + "/mariadb.saveExternalPort": + post: + operationId: "mariadb-saveExternalPort" + tags: + - "mariadb" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "mariadbId": + type: "string" + "externalPort": + type: "number" + nullable: true + required: + - "mariadbId" + - "externalPort" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "saveExternalPort" + "/mariadb.deploy": + post: + operationId: "mariadb-deploy" + tags: + - "mariadb" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "mariadbId": + type: "string" + required: + - "mariadbId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "deploy" + "/mariadb.changeStatus": + post: + operationId: "mariadb-changeStatus" + tags: + - "mariadb" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "mariadbId": + type: "string" + "applicationStatus": + type: "string" + enum: + - "idle" + - "running" + - "done" + - "error" + required: + - "mariadbId" + - "applicationStatus" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "changeStatus" + "/mariadb.remove": + post: + operationId: "mariadb-remove" + tags: + - "mariadb" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "mariadbId": + type: "string" + required: + - "mariadbId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "remove" + "/mariadb.saveEnvironment": + post: + operationId: "mariadb-saveEnvironment" + tags: + - "mariadb" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "mariadbId": + type: "string" + "env": + type: "string" + nullable: true + required: + - "mariadbId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "saveEnvironment" + "/mariadb.reload": + post: + operationId: "mariadb-reload" + tags: + - "mariadb" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "mariadbId": + type: "string" + "appName": + type: "string" + minLength: 1 + required: + - "mariadbId" + - "appName" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "reload" + "/mariadb.update": + post: + operationId: "mariadb-update" + tags: + - "mariadb" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "mariadbId": + type: "string" + minLength: 1 + "name": + type: "string" + minLength: 1 + "appName": + type: "string" + minLength: 1 + "description": + type: "string" + nullable: true + "databaseName": + type: "string" + minLength: 1 + "databaseUser": + type: "string" + minLength: 1 + "databasePassword": + type: "string" + "databaseRootPassword": + type: "string" + "dockerImage": + type: "string" + default: "mariadb:6" + "command": + type: "string" + nullable: true + "env": + type: "string" + nullable: true + "memoryReservation": + type: "number" + nullable: true + "memoryLimit": + type: "number" + nullable: true + "cpuReservation": + type: "number" + nullable: true + "cpuLimit": + type: "number" + nullable: true + "externalPort": + type: "number" + nullable: true + "applicationStatus": + type: "string" + enum: + - "idle" + - "running" + - "done" + - "error" + "createdAt": + type: "string" + "projectId": + type: "string" + required: + - "mariadbId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "update" + "/compose.create": + post: + operationId: "compose-create" + tags: + - "compose" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "name": + type: "string" + minLength: 1 + "description": + type: "string" + nullable: true + "projectId": + type: "string" + "composeType": + type: "string" + enum: + - "docker-compose" + - "stack" + "appName": + type: "string" + "serverId": + type: "string" + nullable: true + required: + - "name" + - "projectId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "create" + "/compose.one": + get: + operationId: "compose-one" + tags: + - "compose" + security: + - Authorization: [] + parameters: + - name: "composeId" + in: "query" + required: true + schema: + type: "string" + minLength: 1 + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "getOne" + "/compose.update": + post: + operationId: "compose-update" + tags: + - "compose" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "composeId": + type: "string" + "name": + type: "string" + minLength: 1 + "appName": + type: "string" + "description": + type: "string" + nullable: true + "env": + type: "string" + nullable: true + "composeFile": + type: "string" + "refreshToken": + type: "string" + nullable: true + "sourceType": + type: "string" + enum: + - "git" + - "github" + - "gitlab" + - "bitbucket" + - "raw" + "composeType": + type: "string" + enum: + - "docker-compose" + - "stack" + "repository": + type: "string" + nullable: true + "owner": + type: "string" + nullable: true + "branch": + type: "string" + nullable: true + "autoDeploy": + type: "boolean" + nullable: true + "gitlabProjectId": + type: "number" + nullable: true + "gitlabRepository": + type: "string" + nullable: true + "gitlabOwner": + type: "string" + nullable: true + "gitlabBranch": + type: "string" + nullable: true + "gitlabPathNamespace": + type: "string" + nullable: true + "bitbucketRepository": + type: "string" + nullable: true + "bitbucketOwner": + type: "string" + nullable: true + "bitbucketBranch": + type: "string" + nullable: true + "customGitUrl": + type: "string" + nullable: true + "customGitBranch": + type: "string" + nullable: true + "customGitSSHKeyId": + type: "string" + nullable: true + "command": + type: "string" + "composePath": + type: "string" + minLength: 1 + "suffix": + type: "string" + "randomize": + type: "boolean" + "composeStatus": + type: "string" + enum: + - "idle" + - "running" + - "done" + - "error" + "projectId": + type: "string" + "createdAt": + type: "string" + "githubId": + type: "string" + nullable: true + "gitlabId": + type: "string" + nullable: true + "bitbucketId": + type: "string" + nullable: true + required: + - "composeId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "update" + "/compose.delete": + post: + operationId: "compose-delete" + tags: + - "compose" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "composeId": + type: "string" + minLength: 1 + required: + - "composeId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "delete" + "/compose.cleanQueues": + post: + operationId: "compose-cleanQueues" + tags: + - "compose" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "composeId": + type: "string" + minLength: 1 + required: + - "composeId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "cleanQueues" + "/compose.loadServices": + get: + operationId: "compose-loadServices" + tags: + - "compose" + security: + - Authorization: [] + parameters: + - name: "composeId" + in: "query" + required: true + schema: + type: "string" + minLength: 1 + - name: "type" + in: "query" + required: false + schema: + anyOf: + - not: {} + - type: "string" + enum: + - "fetch" + - "cache" + default: "cache" + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "load-services" + "/compose.fetchSourceType": + post: + operationId: "compose-fetchSourceType" + tags: + - "compose" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "composeId": + type: "string" + minLength: 1 + required: + - "composeId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "fetch-source-type" + "/compose.randomizeCompose": + post: + operationId: "compose-randomizeCompose" + tags: + - "compose" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "composeId": + type: "string" + minLength: 1 + "suffix": + type: "string" + required: + - "composeId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "randomize-compose" + "/compose.getConvertedCompose": + get: + operationId: "compose-getConvertedCompose" + tags: + - "compose" + security: + - Authorization: [] + parameters: + - name: "composeId" + in: "query" + required: true + schema: + type: "string" + minLength: 1 + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "get-converted" + "/compose.deploy": + post: + operationId: "compose-deploy" + tags: + - "compose" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "composeId": + type: "string" + minLength: 1 + required: + - "composeId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "deploy" + "/compose.redeploy": + post: + operationId: "compose-redeploy" + tags: + - "compose" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "composeId": + type: "string" + minLength: 1 + required: + - "composeId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "redeploy" + "/compose.stop": + post: + operationId: "compose-stop" + tags: + - "compose" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "composeId": + type: "string" + minLength: 1 + required: + - "composeId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "stop" + "/compose.getDefaultCommand": + get: + operationId: "compose-getDefaultCommand" + tags: + - "compose" + security: + - Authorization: [] + parameters: + - name: "composeId" + in: "query" + required: true + schema: + type: "string" + minLength: 1 + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "get-default-command" + "/compose.refreshToken": + post: + operationId: "compose-refreshToken" + tags: + - "compose" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "composeId": + type: "string" + minLength: 1 + required: + - "composeId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "refresh-token" + "/compose.deployTemplate": + post: + operationId: "compose-deployTemplate" + tags: + - "compose" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "projectId": + type: "string" + "id": + type: "string" + minLength: 1 + "serverId": + type: "string" + required: + - "projectId" + - "id" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "deploy-template" + "/compose.templates": + get: + operationId: "compose-templates" + tags: + - "compose" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "get-templates" + "/compose.getTags": + get: + operationId: "compose-getTags" + tags: + - "compose" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "get-tags" + "/user.all": + get: + operationId: "user-all" + tags: + - "user" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "getAll" + "/user.byAuthId": + get: + operationId: "user-byAuthId" + tags: + - "user" + security: + - Authorization: [] + parameters: + - name: "authId" + in: "query" + required: true + schema: + type: "string" + minLength: 1 + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "by-auth-id" + "/user.byUserId": + get: + operationId: "user-byUserId" + tags: + - "user" + security: + - Authorization: [] + parameters: + - name: "userId" + in: "query" + required: true + schema: + type: "string" + minLength: 1 + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "by-user-id" + "/domain.create": + post: + operationId: "domain-create" + tags: + - "domain" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "host": + type: "string" + minLength: 1 + "path": + type: "string" + minLength: 1 + nullable: true + "port": + type: "number" + minimum: 1 + maximum: 65535 + nullable: true + "https": + type: "boolean" + "applicationId": + type: "string" + nullable: true + "certificateType": + type: "string" + enum: + - "letsencrypt" + - "none" + "composeId": + type: "string" + nullable: true + "serviceName": + type: "string" + nullable: true + "domainType": + type: "string" + enum: + - "compose" + - "application" + nullable: true + required: + - "host" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "create" + "/domain.byApplicationId": + get: + operationId: "domain-byApplicationId" + tags: + - "domain" + security: + - Authorization: [] + parameters: + - name: "applicationId" + in: "query" + required: true + schema: + type: "string" + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "by-application-id" + "/domain.byComposeId": + get: + operationId: "domain-byComposeId" + tags: + - "domain" + security: + - Authorization: [] + parameters: + - name: "composeId" + in: "query" + required: true + schema: + type: "string" + minLength: 1 + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "byComposeId" + "/domain.generateDomain": + post: + operationId: "domain-generateDomain" + tags: + - "domain" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "appName": + type: "string" + "serverId": + type: "string" + required: + - "appName" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "generateDomain" + "/domain.update": + post: + operationId: "domain-update" + tags: + - "domain" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "host": + type: "string" + minLength: 1 + "path": + type: "string" + minLength: 1 + nullable: true + "port": + type: "number" + minimum: 1 + maximum: 65535 + nullable: true + "https": + type: "boolean" + "certificateType": + type: "string" + enum: + - "letsencrypt" + - "none" + "serviceName": + type: "string" + nullable: true + "domainType": + type: "string" + enum: + - "compose" + - "application" + nullable: true + "domainId": + type: "string" + required: + - "host" + - "domainId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "update" + "/domain.one": + get: + operationId: "domain-one" + tags: + - "domain" + security: + - Authorization: [] + parameters: + - name: "domainId" + in: "query" + required: true + schema: + type: "string" + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "get" + "/domain.delete": + post: + operationId: "domain-delete" + tags: + - "domain" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "domainId": + type: "string" + required: + - "domainId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "delete" + "/destination.create": + post: + operationId: "destination-create" + tags: + - "destination" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "name": + type: "string" + minLength: 1 + "accessKey": + type: "string" + "bucket": + type: "string" + "region": + type: "string" + "endpoint": + type: "string" + "secretAccessKey": + type: "string" + "serverId": + type: "string" + required: + - "name" + - "accessKey" + - "bucket" + - "region" + - "endpoint" + - "secretAccessKey" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "create" + "/destination.testConnection": + post: + operationId: "destination-testConnection" + tags: + - "destination" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "name": + type: "string" + minLength: 1 + "accessKey": + type: "string" + "bucket": + type: "string" + "region": + type: "string" + "endpoint": + type: "string" + "secretAccessKey": + type: "string" + "serverId": + type: "string" + required: + - "name" + - "accessKey" + - "bucket" + - "region" + - "endpoint" + - "secretAccessKey" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "test-connection" + "/destination.one": + get: + operationId: "destination-one" + tags: + - "destination" + security: + - Authorization: [] + parameters: + - name: "destinationId" + in: "query" + required: true + schema: + type: "string" + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "getOne" + "/destination.all": + get: + operationId: "destination-all" + tags: + - "destination" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "get" + "/destination.remove": + post: + operationId: "destination-remove" + tags: + - "destination" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "destinationId": + type: "string" + required: + - "destinationId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "remove" + "/destination.update": + post: + operationId: "destination-update" + tags: + - "destination" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "name": + type: "string" + minLength: 1 + "accessKey": + type: "string" + "bucket": + type: "string" + "region": + type: "string" + "endpoint": + type: "string" + "secretAccessKey": + type: "string" + "destinationId": + type: "string" + "serverId": + type: "string" + required: + - "name" + - "accessKey" + - "bucket" + - "region" + - "endpoint" + - "secretAccessKey" + - "destinationId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "update" + "/backup.create": + post: + operationId: "backup-create" + tags: + - "backup" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "schedule": + type: "string" + "enabled": + type: "boolean" + nullable: true + "prefix": + type: "string" + minLength: 1 + "destinationId": + type: "string" + "database": + type: "string" + minLength: 1 + "mariadbId": + type: "string" + nullable: true + "mysqlId": + type: "string" + nullable: true + "postgresId": + type: "string" + nullable: true + "mongoId": + type: "string" + nullable: true + "databaseType": + type: "string" + enum: + - "postgres" + - "mariadb" + - "mysql" + - "mongo" + required: + - "schedule" + - "prefix" + - "destinationId" + - "database" + - "databaseType" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "create" + "/backup.one": + get: + operationId: "backup-one" + tags: + - "backup" + security: + - Authorization: [] + parameters: + - name: "backupId" + in: "query" + required: true + schema: + type: "string" + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "get" + "/backup.update": + post: + operationId: "backup-update" + tags: + - "backup" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "schedule": + type: "string" + "enabled": + type: "boolean" + nullable: true + "prefix": + type: "string" + minLength: 1 + "backupId": + type: "string" + "destinationId": + type: "string" + "database": + type: "string" + minLength: 1 + required: + - "schedule" + - "prefix" + - "backupId" + - "destinationId" + - "database" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "update" + "/backup.remove": + post: + operationId: "backup-remove" + tags: + - "backup" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "backupId": + type: "string" + required: + - "backupId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "remove" + "/backup.manualBackupPostgres": + post: + operationId: "backup-manualBackupPostgres" + tags: + - "backup" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "backupId": + type: "string" + required: + - "backupId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "manual-backup-postgres" + "/backup.manualBackupMySql": + post: + operationId: "backup-manualBackupMySql" + tags: + - "backup" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "backupId": + type: "string" + required: + - "backupId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "manual-backup-mysql" + "/backup.manualBackupMariadb": + post: + operationId: "backup-manualBackupMariadb" + tags: + - "backup" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "backupId": + type: "string" + required: + - "backupId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "manual-backup-mariadb" + "/backup.manualBackupMongo": + post: + operationId: "backup-manualBackupMongo" + tags: + - "backup" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "backupId": + type: "string" + required: + - "backupId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "manual-backup-mongo" + "/deployment.all": + get: + operationId: "deployment-all" + tags: + - "deployment" + security: + - Authorization: [] + parameters: + - name: "applicationId" + in: "query" + required: true + schema: + type: "string" + minLength: 1 + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "get" + "/deployment.allByCompose": + get: + operationId: "deployment-allByCompose" + tags: + - "deployment" + security: + - Authorization: [] + parameters: + - name: "composeId" + in: "query" + required: true + schema: + type: "string" + minLength: 1 + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "all-by-compose" + "/deployment.allByServer": + get: + operationId: "deployment-allByServer" + tags: + - "deployment" + security: + - Authorization: [] + parameters: + - name: "serverId" + in: "query" + required: true + schema: + type: "string" + minLength: 1 + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "all-by-server" + "/mounts.create": + post: + operationId: "mounts-create" + tags: + - "mounts" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "type": + type: "string" + enum: + - "bind" + - "volume" + - "file" + "hostPath": + type: "string" + nullable: true + "volumeName": + type: "string" + nullable: true + "content": + type: "string" + nullable: true + "mountPath": + type: "string" + minLength: 1 + "serviceType": + type: "string" + enum: + - "application" + - "postgres" + - "mysql" + - "mariadb" + - "mongo" + - "redis" + - "compose" + default: "application" + "filePath": + type: "string" + nullable: true + "serviceId": + type: "string" + minLength: 1 + required: + - "type" + - "mountPath" + - "serviceId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "create" + "/mounts.remove": + post: + operationId: "mounts-remove" + tags: + - "mounts" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "mountId": + type: "string" + required: + - "mountId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "remove" + "/mounts.one": + get: + operationId: "mounts-one" + tags: + - "mounts" + security: + - Authorization: [] + parameters: + - name: "mountId" + in: "query" + required: true + schema: + type: "string" + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "get" + "/mounts.update": + post: + operationId: "mounts-update" + tags: + - "mounts" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "mountId": + type: "string" + minLength: 1 + "type": + type: "string" + enum: + - "bind" + - "volume" + - "file" + "hostPath": + type: "string" + nullable: true + "volumeName": + type: "string" + nullable: true + "filePath": + type: "string" + nullable: true + "content": + type: "string" + nullable: true + "serviceType": + type: "string" + enum: + - "application" + - "postgres" + - "mysql" + - "mariadb" + - "mongo" + - "redis" + - "compose" + default: "application" + "mountPath": + type: "string" + minLength: 1 + "applicationId": + type: "string" + nullable: true + "postgresId": + type: "string" + nullable: true + "mariadbId": + type: "string" + nullable: true + "mongoId": + type: "string" + nullable: true + "mysqlId": + type: "string" + nullable: true + "redisId": + type: "string" + nullable: true + "composeId": + type: "string" + nullable: true + required: + - "mountId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "update" + "/certificates.create": + post: + operationId: "certificates-create" + tags: + - "certificates" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "certificateId": + type: "string" + "name": + type: "string" + minLength: 1 + "certificateData": + type: "string" + minLength: 1 + "privateKey": + type: "string" + minLength: 1 + "certificatePath": + type: "string" + "autoRenew": + type: "boolean" + nullable: true + "adminId": + type: "string" + nullable: true + "serverId": + type: "string" + nullable: true + required: + - "name" + - "certificateData" + - "privateKey" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "create" + "/certificates.one": + get: + operationId: "certificates-one" + tags: + - "certificates" + security: + - Authorization: [] + parameters: + - name: "certificateId" + in: "query" + required: true + schema: + type: "string" + minLength: 1 + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "get" + "/certificates.remove": + post: + operationId: "certificates-remove" + tags: + - "certificates" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "certificateId": + type: "string" + minLength: 1 + required: + - "certificateId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "remove" + "/certificates.all": + get: + operationId: "certificates-all" + tags: + - "certificates" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "all" + "/settings.reloadServer": + post: + operationId: "settings-reloadServer" + tags: + - "settings" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "reload-server" + "/settings.reloadTraefik": + post: + operationId: "settings-reloadTraefik" + tags: + - "settings" + security: + - Authorization: [] + requestBody: + required: false + content: + "application/json": + schema: + type: "object" + properties: + "serverId": + type: "string" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "reload-traefik" + "/settings.toggleDashboard": + post: + operationId: "settings-toggleDashboard" + tags: + - "settings" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "enableDashboard": + type: "boolean" + "serverId": + type: "string" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "toggle-dashboard" + "/settings.cleanUnusedImages": + post: + operationId: "settings-cleanUnusedImages" + tags: + - "settings" + security: + - Authorization: [] + requestBody: + required: false + content: + "application/json": + schema: + type: "object" + properties: + "serverId": + type: "string" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "cleanUnusedImages" + "/settings.cleanUnusedVolumes": + post: + operationId: "settings-cleanUnusedVolumes" + tags: + - "settings" + security: + - Authorization: [] + requestBody: + required: false + content: + "application/json": + schema: + type: "object" + properties: + "serverId": + type: "string" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "clean-unused-volumes" + "/settings.cleanStoppedContainers": + post: + operationId: "settings-cleanStoppedContainers" + tags: + - "settings" + security: + - Authorization: [] + requestBody: + required: false + content: + "application/json": + schema: + type: "object" + properties: + "serverId": + type: "string" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "clean-stopped-containers" + "/settings.cleanDockerBuilder": + post: + operationId: "settings-cleanDockerBuilder" + tags: + - "settings" + security: + - Authorization: [] + requestBody: + required: false + content: + "application/json": + schema: + type: "object" + properties: + "serverId": + type: "string" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "cleanDockerBuilder" + "/settings.cleanDockerPrune": + post: + operationId: "settings-cleanDockerPrune" + tags: + - "settings" + security: + - Authorization: [] + requestBody: + required: false + content: + "application/json": + schema: + type: "object" + properties: + "serverId": + type: "string" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "clean-docker-prune" + "/settings.cleanAll": + post: + operationId: "settings-cleanAll" + tags: + - "settings" + security: + - Authorization: [] + requestBody: + required: false + content: + "application/json": + schema: + type: "object" + properties: + "serverId": + type: "string" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "cleanAll" + "/settings.cleanMonitoring": + post: + operationId: "settings-cleanMonitoring" + tags: + - "settings" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "clean-monitoring" + "/settings.saveSSHPrivateKey": + post: + operationId: "settings-saveSSHPrivateKey" + tags: + - "settings" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "sshPrivateKey": + type: "string" + nullable: true + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "save-ssh-private-key" + "/settings.assignDomainServer": + post: + operationId: "settings-assignDomainServer" + tags: + - "settings" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "host": + type: "string" + nullable: true + "certificateType": + type: "string" + enum: + - "letsencrypt" + - "none" + default: "none" + "letsEncryptEmail": + type: "string" + nullable: true + required: + - "host" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "assignDomainServer" + "/settings.cleanSSHPrivateKey": + post: + operationId: "settings-cleanSSHPrivateKey" + tags: + - "settings" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "clean-ssh-private-key" + "/settings.updateDockerCleanup": + post: + operationId: "settings-updateDockerCleanup" + tags: + - "settings" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "enableDockerCleanup": + type: "boolean" + "serverId": + type: "string" + required: + - "enableDockerCleanup" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "update-docker-cleanup" + "/settings.readTraefikConfig": + get: + operationId: "settings-readTraefikConfig" + tags: + - "settings" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "readTraefikConfig" + "/settings.updateTraefikConfig": + post: + operationId: "settings-updateTraefikConfig" + tags: + - "settings" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "traefikConfig": + type: "string" + minLength: 1 + required: + - "traefikConfig" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "updateTraefikConfig" + "/settings.readWebServerTraefikConfig": + get: + operationId: "settings-readWebServerTraefikConfig" + tags: + - "settings" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "read-web-server-traefik-config" + "/settings.updateWebServerTraefikConfig": + post: + operationId: "settings-updateWebServerTraefikConfig" + tags: + - "settings" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "traefikConfig": + type: "string" + minLength: 1 + required: + - "traefikConfig" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "update-web-server-traefik-config" + "/settings.readMiddlewareTraefikConfig": + get: + operationId: "settings-readMiddlewareTraefikConfig" + tags: + - "settings" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "read-middleware-traefik-config" + "/settings.updateMiddlewareTraefikConfig": + post: + operationId: "settings-updateMiddlewareTraefikConfig" + tags: + - "settings" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "traefikConfig": + type: "string" + minLength: 1 + required: + - "traefikConfig" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "update-middleware-traefik-config" + "/settings.checkAndUpdateImage": + post: + operationId: "settings-checkAndUpdateImage" + tags: + - "settings" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "check-and-update-image" + "/settings.updateServer": + post: + operationId: "settings-updateServer" + tags: + - "settings" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "update-server" + "/settings.getDokployVersion": + get: + operationId: "settings-getDokployVersion" + tags: + - "settings" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "getDokployVersion" + "/settings.readDirectories": + get: + operationId: "settings-readDirectories" + tags: + - "settings" + security: + - Authorization: [] + parameters: + - name: "serverId" + in: "query" + required: false + schema: + type: "string" + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "read-directories" + "/settings.updateTraefikFile": + post: + operationId: "settings-updateTraefikFile" + tags: + - "settings" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "path": + type: "string" + minLength: 1 + "traefikConfig": + type: "string" + minLength: 1 + "serverId": + type: "string" + required: + - "path" + - "traefikConfig" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "update-traefik-file" + "/settings.readTraefikFile": + get: + operationId: "settings-readTraefikFile" + tags: + - "settings" + security: + - Authorization: [] + parameters: + - name: "path" + in: "query" + required: true + schema: + type: "string" + minLength: 1 + - name: "serverId" + in: "query" + required: false + schema: + type: "string" + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "readTraefikFile" + "/settings.getIp": + get: + operationId: "settings-getIp" + tags: + - "settings" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "get-ip" + "/settings.getOpenApiDocument": + get: + operationId: "settings-getOpenApiDocument" + tags: + - "settings" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "get-open-api-document" + "/settings.readTraefikEnv": + get: + operationId: "settings-readTraefikEnv" + tags: + - "settings" + security: + - Authorization: [] + parameters: + - name: "serverId" + in: "query" + required: false + schema: + type: "string" + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "read-traefik-env" + "/settings.writeTraefikEnv": + post: + operationId: "settings-writeTraefikEnv" + tags: + - "settings" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "env": + type: "string" + "serverId": + type: "string" + required: + - "env" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "writeTraefikEnv" + "/settings.haveTraefikDashboardPortEnabled": + get: + operationId: "settings-haveTraefikDashboardPortEnabled" + tags: + - "settings" + security: + - Authorization: [] + parameters: + - name: "serverId" + in: "query" + required: false + schema: + type: "string" + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "haveTraefikDashboardPortEnabled" + "/settings.readStats": + get: + operationId: "settings-readStats" + tags: + - "settings" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "readStats" + "/settings.getLogRotateStatus": + get: + operationId: "settings-getLogRotateStatus" + tags: + - "settings" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "get-log-rotate-status" + "/settings.toggleLogRotate": + post: + operationId: "settings-toggleLogRotate" + tags: + - "settings" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "enable": + type: "boolean" + required: + - "enable" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "toggle-log-rotate" + "/settings.haveActivateRequests": + get: + operationId: "settings-haveActivateRequests" + tags: + - "settings" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "have-activate-requests" + "/settings.toggleRequests": + post: + operationId: "settings-toggleRequests" + tags: + - "settings" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "enable": + type: "boolean" + required: + - "enable" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "toggle-requests" + "/settings.isCloud": + get: + operationId: "settings-isCloud" + tags: + - "settings" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "isCloud" + "/settings.health": + get: + operationId: "settings-health" + tags: + - "settings" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "health" + "/security.create": + post: + operationId: "security-create" + tags: + - "security" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "applicationId": + type: "string" + "username": + type: "string" + minLength: 1 + "password": + type: "string" + minLength: 1 + required: + - "applicationId" + - "username" + - "password" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "create" + "/security.one": + get: + operationId: "security-one" + tags: + - "security" + security: + - Authorization: [] + parameters: + - name: "securityId" + in: "query" + required: true + schema: + type: "string" + minLength: 1 + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "get" + "/security.delete": + post: + operationId: "security-delete" + tags: + - "security" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "securityId": + type: "string" + minLength: 1 + required: + - "securityId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "delete" + "/security.update": + post: + operationId: "security-update" + tags: + - "security" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "securityId": + type: "string" + minLength: 1 + "username": + type: "string" + minLength: 1 + "password": + type: "string" + minLength: 1 + required: + - "securityId" + - "username" + - "password" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "update" + "/redirects.create": + post: + operationId: "redirects-create" + tags: + - "redirects" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "regex": + type: "string" + minLength: 1 + "replacement": + type: "string" + minLength: 1 + "permanent": + type: "boolean" + "applicationId": + type: "string" + required: + - "regex" + - "replacement" + - "permanent" + - "applicationId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "create" + "/redirects.one": + get: + operationId: "redirects-one" + tags: + - "redirects" + security: + - Authorization: [] + parameters: + - name: "redirectId" + in: "query" + required: true + schema: + type: "string" + minLength: 1 + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "getOne" + "/redirects.delete": + post: + operationId: "redirects-delete" + tags: + - "redirects" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "redirectId": + type: "string" + minLength: 1 + required: + - "redirectId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "delete" + "/redirects.update": + post: + operationId: "redirects-update" + tags: + - "redirects" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "redirectId": + type: "string" + minLength: 1 + "regex": + type: "string" + minLength: 1 + "replacement": + type: "string" + minLength: 1 + "permanent": + type: "boolean" + required: + - "redirectId" + - "regex" + - "replacement" + - "permanent" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "update" + "/port.create": + post: + operationId: "port-create" + tags: + - "port" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "publishedPort": + type: "number" + "targetPort": + type: "number" + "protocol": + type: "string" + enum: + - "tcp" + - "udp" + default: "tcp" + "applicationId": + type: "string" + minLength: 1 + required: + - "publishedPort" + - "targetPort" + - "applicationId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "create" + "/port.one": + get: + operationId: "port-one" + tags: + - "port" + security: + - Authorization: [] + parameters: + - name: "portId" + in: "query" + required: true + schema: + type: "string" + minLength: 1 + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "get" + "/port.delete": + post: + operationId: "port-delete" + tags: + - "port" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "portId": + type: "string" + minLength: 1 + required: + - "portId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "delete" + "/port.update": + post: + operationId: "port-update" + tags: + - "port" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "portId": + type: "string" + minLength: 1 + "publishedPort": + type: "number" + "targetPort": + type: "number" + "protocol": + type: "string" + enum: + - "tcp" + - "udp" + default: "tcp" + required: + - "portId" + - "publishedPort" + - "targetPort" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "update" + "/registry.create": + post: + operationId: "registry-create" + tags: + - "registry" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "registryName": + type: "string" + minLength: 1 + "username": + type: "string" + minLength: 1 + "password": + type: "string" + minLength: 1 + "registryUrl": + type: "string" + "registryType": + type: "string" + enum: + - "cloud" + "imagePrefix": + type: "string" + nullable: true + "serverId": + type: "string" + required: + - "registryName" + - "username" + - "password" + - "registryUrl" + - "registryType" + - "imagePrefix" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "create" + "/registry.remove": + post: + operationId: "registry-remove" + tags: + - "registry" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "registryId": + type: "string" + minLength: 1 + required: + - "registryId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "remove" + "/registry.update": + post: + operationId: "registry-update" + tags: + - "registry" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "registryId": + type: "string" + minLength: 1 + "registryName": + type: "string" + minLength: 1 + "imagePrefix": + type: "string" + nullable: true + "username": + type: "string" + minLength: 1 + "password": + type: "string" + minLength: 1 + "registryUrl": + type: "string" + "createdAt": + type: "string" + "registryType": + type: "string" + enum: + - "cloud" + "adminId": + type: "string" + minLength: 1 + "serverId": + type: "string" + required: + - "registryId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "update" + "/registry.all": + get: + operationId: "registry-all" + tags: + - "registry" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "getAll" + "/registry.one": + get: + operationId: "registry-one" + tags: + - "registry" + security: + - Authorization: [] + parameters: + - name: "registryId" + in: "query" + required: true + schema: + type: "string" + minLength: 1 + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "get" + "/registry.testRegistry": + post: + operationId: "registry-testRegistry" + tags: + - "registry" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "registryName": + type: "string" + minLength: 1 + "username": + type: "string" + minLength: 1 + "password": + type: "string" + minLength: 1 + "registryUrl": + type: "string" + "registryType": + type: "string" + enum: + - "cloud" + "imagePrefix": + type: "string" + nullable: true + "serverId": + type: "string" + required: + - "registryName" + - "username" + - "password" + - "registryUrl" + - "registryType" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "test-registry" + "/cluster.getNodes": + get: + operationId: "cluster-getNodes" + tags: + - "cluster" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "getNodes" + "/cluster.removeWorker": + post: + operationId: "cluster-removeWorker" + tags: + - "cluster" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "nodeId": + type: "string" + required: + - "nodeId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "remove-worker" + "/cluster.addWorker": + get: + operationId: "cluster-addWorker" + tags: + - "cluster" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "add-worker" + "/cluster.addManager": + get: + operationId: "cluster-addManager" + tags: + - "cluster" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "addManager" + "/notification.createSlack": + post: + operationId: "notification-createSlack" + tags: + - "notification" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "appBuildError": + type: "boolean" + "databaseBackup": + type: "boolean" + "dokployRestart": + type: "boolean" + "name": + type: "string" + "appDeploy": + type: "boolean" + "dockerCleanup": + type: "boolean" + "webhookUrl": + type: "string" + minLength: 1 + "channel": + type: "string" + required: + - "appBuildError" + - "databaseBackup" + - "dokployRestart" + - "name" + - "appDeploy" + - "dockerCleanup" + - "webhookUrl" + - "channel" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "create-slack" + "/notification.updateSlack": + post: + operationId: "notification-updateSlack" + tags: + - "notification" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "appBuildError": + type: "boolean" + "databaseBackup": + type: "boolean" + "dokployRestart": + type: "boolean" + "name": + type: "string" + "appDeploy": + type: "boolean" + "dockerCleanup": + type: "boolean" + "webhookUrl": + type: "string" + minLength: 1 + "channel": + type: "string" + "notificationId": + type: "string" + minLength: 1 + "slackId": + type: "string" + "adminId": + type: "string" + required: + - "notificationId" + - "slackId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "updateSlack" + "/notification.testSlackConnection": + post: + operationId: "notification-testSlackConnection" + tags: + - "notification" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "webhookUrl": + type: "string" + minLength: 1 + "channel": + type: "string" + required: + - "webhookUrl" + - "channel" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "test-slack-connection" + "/notification.createTelegram": + post: + operationId: "notification-createTelegram" + tags: + - "notification" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "appBuildError": + type: "boolean" + "databaseBackup": + type: "boolean" + "dokployRestart": + type: "boolean" + "name": + type: "string" + "appDeploy": + type: "boolean" + "dockerCleanup": + type: "boolean" + "botToken": + type: "string" + minLength: 1 + "chatId": + type: "string" + minLength: 1 + required: + - "appBuildError" + - "databaseBackup" + - "dokployRestart" + - "name" + - "appDeploy" + - "dockerCleanup" + - "botToken" + - "chatId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "create-telegram" + "/notification.updateTelegram": + post: + operationId: "notification-updateTelegram" + tags: + - "notification" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "appBuildError": + type: "boolean" + "databaseBackup": + type: "boolean" + "dokployRestart": + type: "boolean" + "name": + type: "string" + "appDeploy": + type: "boolean" + "dockerCleanup": + type: "boolean" + "botToken": + type: "string" + minLength: 1 + "chatId": + type: "string" + minLength: 1 + "notificationId": + type: "string" + minLength: 1 + "telegramId": + type: "string" + minLength: 1 + "adminId": + type: "string" + required: + - "notificationId" + - "telegramId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "update-telegram" + "/notification.testTelegramConnection": + post: + operationId: "notification-testTelegramConnection" + tags: + - "notification" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "botToken": + type: "string" + minLength: 1 + "chatId": + type: "string" + minLength: 1 + required: + - "botToken" + - "chatId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "testTelegramConnection" + "/notification.createDiscord": + post: + operationId: "notification-createDiscord" + tags: + - "notification" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "appBuildError": + type: "boolean" + "databaseBackup": + type: "boolean" + "dokployRestart": + type: "boolean" + "name": + type: "string" + "appDeploy": + type: "boolean" + "dockerCleanup": + type: "boolean" + "webhookUrl": + type: "string" + minLength: 1 + required: + - "appBuildError" + - "databaseBackup" + - "dokployRestart" + - "name" + - "appDeploy" + - "dockerCleanup" + - "webhookUrl" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "createDiscord" + "/notification.updateDiscord": + post: + operationId: "notification-updateDiscord" + tags: + - "notification" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "appBuildError": + type: "boolean" + "databaseBackup": + type: "boolean" + "dokployRestart": + type: "boolean" + "name": + type: "string" + "appDeploy": + type: "boolean" + "dockerCleanup": + type: "boolean" + "webhookUrl": + type: "string" + minLength: 1 + "notificationId": + type: "string" + minLength: 1 + "discordId": + type: "string" + minLength: 1 + "adminId": + type: "string" + required: + - "notificationId" + - "discordId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "updateDiscord" + "/notification.testDiscordConnection": + post: + operationId: "notification-testDiscordConnection" + tags: + - "notification" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "webhookUrl": + type: "string" + minLength: 1 + required: + - "webhookUrl" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "test-discord-connection" + "/notification.createEmail": + post: + operationId: "notification-createEmail" + tags: + - "notification" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "appBuildError": + type: "boolean" + "databaseBackup": + type: "boolean" + "dokployRestart": + type: "boolean" + "name": + type: "string" + "appDeploy": + type: "boolean" + "dockerCleanup": + type: "boolean" + "smtpServer": + type: "string" + minLength: 1 + "smtpPort": + type: "number" + minimum: 1 + "username": + type: "string" + minLength: 1 + "password": + type: "string" + minLength: 1 + "fromAddress": + type: "string" + minLength: 1 + "toAddresses": + type: "array" + items: + type: "string" + minItems: 1 + required: + - "appBuildError" + - "databaseBackup" + - "dokployRestart" + - "name" + - "appDeploy" + - "dockerCleanup" + - "smtpServer" + - "smtpPort" + - "username" + - "password" + - "fromAddress" + - "toAddresses" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "create-email" + "/notification.updateEmail": + post: + operationId: "notification-updateEmail" + tags: + - "notification" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "appBuildError": + type: "boolean" + "databaseBackup": + type: "boolean" + "dokployRestart": + type: "boolean" + "name": + type: "string" + "appDeploy": + type: "boolean" + "dockerCleanup": + type: "boolean" + "smtpServer": + type: "string" + minLength: 1 + "smtpPort": + type: "number" + minimum: 1 + "username": + type: "string" + minLength: 1 + "password": + type: "string" + minLength: 1 + "fromAddress": + type: "string" + minLength: 1 + "toAddresses": + type: "array" + items: + type: "string" + minItems: 1 + "notificationId": + type: "string" + minLength: 1 + "emailId": + type: "string" + minLength: 1 + "adminId": + type: "string" + required: + - "notificationId" + - "emailId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "updateEmail" + "/notification.testEmailConnection": + post: + operationId: "notification-testEmailConnection" + tags: + - "notification" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "smtpServer": + type: "string" + minLength: 1 + "smtpPort": + type: "number" + minimum: 1 + "username": + type: "string" + minLength: 1 + "password": + type: "string" + minLength: 1 + "toAddresses": + type: "array" + items: + type: "string" + minItems: 1 + "fromAddress": + type: "string" + minLength: 1 + required: + - "smtpServer" + - "smtpPort" + - "username" + - "password" + - "toAddresses" + - "fromAddress" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "testEmailConnection" + "/notification.remove": + post: + operationId: "notification-remove" + tags: + - "notification" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "notificationId": + type: "string" + required: + - "notificationId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "remove" + "/notification.one": + get: + operationId: "notification-one" + tags: + - "notification" + security: + - Authorization: [] + parameters: + - name: "notificationId" + in: "query" + required: true + schema: + type: "string" + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-group: "notifications" + x-speakeasy-name-override: "get" + "/notification.all": + get: + operationId: "notification-all" + tags: + - "notification" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "get-all" + "/sshKey.create": + post: + operationId: "sshKey-create" + tags: + - "sshKey" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "name": + type: "string" + minLength: 1 + "description": + type: "string" + nullable: true + "privateKey": + type: "string" + "publicKey": + type: "string" + "adminId": + type: "string" + nullable: true + required: + - "name" + - "privateKey" + - "publicKey" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-group: "ssh-keys" + x-speakeasy-name-override: "create" + "/sshKey.remove": + post: + operationId: "sshKey-remove" + tags: + - "sshKey" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "sshKeyId": + type: "string" + required: + - "sshKeyId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-group: "ssh-key" + x-speakeasy-name-override: "remove" + "/sshKey.one": + get: + operationId: "sshKey-one" + tags: + - "sshKey" + security: + - Authorization: [] + parameters: + - name: "sshKeyId" + in: "query" + required: true + schema: + type: "string" + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "get" + "/sshKey.all": + get: + operationId: "sshKey-all" + tags: + - "sshKey" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-group: "sshKeys" + x-speakeasy-name-override: "all" + "/sshKey.generate": + post: + operationId: "sshKey-generate" + tags: + - "sshKey" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "type": + type: "string" + enum: + - "rsa" + - "ed25519" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "generate" + "/sshKey.update": + post: + operationId: "sshKey-update" + tags: + - "sshKey" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "name": + type: "string" + minLength: 1 + "description": + type: "string" + nullable: true + "lastUsedAt": + type: "string" + nullable: true + "sshKeyId": + type: "string" + required: + - "sshKeyId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "update" + "/gitProvider.getAll": + get: + operationId: "gitProvider-getAll" + tags: + - "gitProvider" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "getAll" + "/gitProvider.remove": + post: + operationId: "gitProvider-remove" + tags: + - "gitProvider" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "gitProviderId": + type: "string" + minLength: 1 + required: + - "gitProviderId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "remove" + "/bitbucket.create": + post: + operationId: "bitbucket-create" + tags: + - "bitbucket" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "bitbucketId": + type: "string" + "bitbucketUsername": + type: "string" + "appPassword": + type: "string" + "bitbucketWorkspaceName": + type: "string" + "gitProviderId": + type: "string" + "authId": + type: "string" + minLength: 1 + "name": + type: "string" + minLength: 1 + required: + - "authId" + - "name" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "create" + "/bitbucket.one": + get: + operationId: "bitbucket-one" + tags: + - "bitbucket" + security: + - Authorization: [] + parameters: + - name: "bitbucketId" + in: "query" + required: true + schema: + type: "string" + minLength: 1 + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "get" + "/bitbucket.bitbucketProviders": + get: + operationId: "bitbucket-bitbucketProviders" + tags: + - "bitbucket" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "providers" + "/bitbucket.getBitbucketRepositories": + get: + operationId: "bitbucket-getBitbucketRepositories" + tags: + - "bitbucket" + security: + - Authorization: [] + parameters: + - name: "bitbucketId" + in: "query" + required: true + schema: + type: "string" + minLength: 1 + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "get-repositories" + "/bitbucket.getBitbucketBranches": + get: + operationId: "bitbucket-getBitbucketBranches" + tags: + - "bitbucket" + security: + - Authorization: [] + parameters: + - name: "owner" + in: "query" + required: true + schema: + type: "string" + - name: "repo" + in: "query" + required: true + schema: + type: "string" + - name: "bitbucketId" + in: "query" + required: false + schema: + type: "string" + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "getBranches" + "/bitbucket.testConnection": + post: + operationId: "bitbucket-testConnection" + tags: + - "bitbucket" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "bitbucketId": + type: "string" + minLength: 1 + "bitbucketUsername": + type: "string" + "workspaceName": + type: "string" + required: + - "bitbucketId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "testConnection" + "/bitbucket.update": + post: + operationId: "bitbucket-update" + tags: + - "bitbucket" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "bitbucketId": + type: "string" + minLength: 1 + "bitbucketUsername": + type: "string" + "appPassword": + type: "string" + nullable: true + "bitbucketWorkspaceName": + type: "string" + "gitProviderId": + type: "string" + "name": + type: "string" + minLength: 1 + "adminId": + type: "string" + required: + - "bitbucketId" + - "gitProviderId" + - "name" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "update" + "/gitlab.create": + post: + operationId: "gitlab-create" + tags: + - "gitlab" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "gitlabId": + type: "string" + "applicationId": + type: "string" + "redirectUri": + type: "string" + "secret": + type: "string" + "accessToken": + type: "string" + nullable: true + "refreshToken": + type: "string" + nullable: true + "groupName": + type: "string" + "expiresAt": + type: "number" + nullable: true + "gitProviderId": + type: "string" + "authId": + type: "string" + minLength: 1 + "name": + type: "string" + minLength: 1 + required: + - "authId" + - "name" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "create" + "/gitlab.one": + get: + operationId: "gitlab-one" + tags: + - "gitlab" + security: + - Authorization: [] + parameters: + - name: "gitlabId" + in: "query" + required: true + schema: + type: "string" + minLength: 1 + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "one" + "/gitlab.gitlabProviders": + get: + operationId: "gitlab-gitlabProviders" + tags: + - "gitlab" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "providers" + "/gitlab.getGitlabRepositories": + get: + operationId: "gitlab-getGitlabRepositories" + tags: + - "gitlab" + security: + - Authorization: [] + parameters: + - name: "gitlabId" + in: "query" + required: true + schema: + type: "string" + minLength: 1 + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "getGitlabRepositories" + "/gitlab.getGitlabBranches": + get: + operationId: "gitlab-getGitlabBranches" + tags: + - "gitlab" + security: + - Authorization: [] + parameters: + - name: "id" + in: "query" + required: false + schema: + type: "number" + - name: "owner" + in: "query" + required: true + schema: + type: "string" + - name: "repo" + in: "query" + required: true + schema: + type: "string" + - name: "gitlabId" + in: "query" + required: false + schema: + type: "string" + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "get-gitlab-branches" + "/gitlab.testConnection": + post: + operationId: "gitlab-testConnection" + tags: + - "gitlab" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "gitlabId": + type: "string" + "groupName": + type: "string" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "testConnection" + "/gitlab.update": + post: + operationId: "gitlab-update" + tags: + - "gitlab" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "gitlabId": + type: "string" + minLength: 1 + "applicationId": + type: "string" + "redirectUri": + type: "string" + "secret": + type: "string" + "accessToken": + type: "string" + nullable: true + "refreshToken": + type: "string" + nullable: true + "groupName": + type: "string" + "expiresAt": + type: "number" + nullable: true + "gitProviderId": + type: "string" + "name": + type: "string" + minLength: 1 + required: + - "gitlabId" + - "gitProviderId" + - "name" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "update" + "/github.one": + get: + operationId: "github-one" + tags: + - "github" + security: + - Authorization: [] + parameters: + - name: "githubId" + in: "query" + required: true + schema: + type: "string" + minLength: 1 + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "one" + "/github.getGithubRepositories": + get: + operationId: "github-getGithubRepositories" + tags: + - "github" + security: + - Authorization: [] + parameters: + - name: "githubId" + in: "query" + required: true + schema: + type: "string" + minLength: 1 + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "getRepositories" + "/github.getGithubBranches": + get: + operationId: "github-getGithubBranches" + tags: + - "github" + security: + - Authorization: [] + parameters: + - name: "repo" + in: "query" + required: true + schema: + type: "string" + minLength: 1 + - name: "owner" + in: "query" + required: true + schema: + type: "string" + minLength: 1 + - name: "githubId" + in: "query" + required: false + schema: + type: "string" + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "getBranches" + "/github.githubProviders": + get: + operationId: "github-githubProviders" + tags: + - "github" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "getProviders" + "/github.testConnection": + post: + operationId: "github-testConnection" + tags: + - "github" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "githubId": + type: "string" + minLength: 1 + required: + - "githubId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "testConnection" + "/github.update": + post: + operationId: "github-update" + tags: + - "github" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "githubId": + type: "string" + minLength: 1 + "githubAppName": + type: "string" + nullable: true + "githubAppId": + type: "number" + nullable: true + "githubClientId": + type: "string" + nullable: true + "githubClientSecret": + type: "string" + nullable: true + "githubInstallationId": + type: "string" + nullable: true + "githubPrivateKey": + type: "string" + nullable: true + "githubWebhookSecret": + type: "string" + nullable: true + "gitProviderId": + type: "string" + minLength: 1 + "name": + type: "string" + minLength: 1 + required: + - "githubId" + - "gitProviderId" + - "name" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "update" + "/server.create": + post: + operationId: "server-create" + tags: + - "server" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "name": + type: "string" + minLength: 1 + "description": + type: "string" + nullable: true + "ipAddress": + type: "string" + "port": + type: "number" + "username": + type: "string" + "sshKeyId": + type: "string" + nullable: true + required: + - "name" + - "ipAddress" + - "port" + - "username" + - "sshKeyId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "create" + "/server.one": + get: + operationId: "server-one" + tags: + - "server" + security: + - Authorization: [] + parameters: + - name: "serverId" + in: "query" + required: true + schema: + type: "string" + minLength: 1 + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-group: "servers" + x-speakeasy-name-override: "get" + "/server.all": + get: + operationId: "server-all" + tags: + - "server" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "all" + "/server.withSSHKey": + get: + operationId: "server-withSSHKey" + tags: + - "server" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "withSSHKey" + "/server.setup": + post: + operationId: "server-setup" + tags: + - "server" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "serverId": + type: "string" + minLength: 1 + required: + - "serverId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "setup" + "/server.remove": + post: + operationId: "server-remove" + tags: + - "server" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "serverId": + type: "string" + minLength: 1 + required: + - "serverId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "remove" + "/server.update": + post: + operationId: "server-update" + tags: + - "server" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "name": + type: "string" + minLength: 1 + "description": + type: "string" + nullable: true + "serverId": + type: "string" + minLength: 1 + "ipAddress": + type: "string" + "port": + type: "number" + "username": + type: "string" + "sshKeyId": + type: "string" + nullable: true + required: + - "name" + - "serverId" + - "ipAddress" + - "port" + - "username" + - "sshKeyId" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "update" + "/stripe.getProducts": + get: + operationId: "stripe-getProducts" + tags: + - "stripe" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "getProducts" + "/stripe.createCheckoutSession": + post: + operationId: "stripe-createCheckoutSession" + tags: + - "stripe" + security: + - Authorization: [] + requestBody: + required: true + content: + "application/json": + schema: + type: "object" + properties: + "productId": + type: "string" + "serverQuantity": + type: "number" + minimum: 1 + "isAnnual": + type: "boolean" + required: + - "productId" + - "serverQuantity" + - "isAnnual" + additionalProperties: false + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "createCheckoutSession" + "/stripe.createCustomerPortalSession": + post: + operationId: "stripe-createCustomerPortalSession" + tags: + - "stripe" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "createCustomerPortalSession" + "/stripe.canCreateMoreServers": + get: + operationId: "stripe-canCreateMoreServers" + tags: + - "stripe" + security: + - Authorization: [] + responses: + "200": + description: "Successful response" + content: + "application/json": {} + default: {"$ref": "#/components/responses/error"} + x-speakeasy-name-override: "can-create-more-servers" +components: + securitySchemes: + "Authorization": + type: "http" + scheme: "bearer" + responses: + "error": + description: "Error response" + content: + "application/json": + schema: + type: "object" + properties: + "message": + type: "string" + "code": + type: "string" + "issues": + type: "array" + items: + type: "object" + properties: + "message": + type: "string" + required: + - "message" + additionalProperties: false + required: + - "message" + - "code" + additionalProperties: false +tags: + - name: "admin" + - name: "docker" + - name: "compose" + - name: "registry" + - name: "cluster" + - name: "user" + - name: "domain" + - name: "destination" + - name: "backup" + - name: "deployment" + - name: "mounts" + - name: "certificates" + - name: "settings" + - name: "security" + - name: "redirects" + - name: "port" + - name: "project" + - name: "application" + - name: "mysql" + - name: "postgres" + - name: "redis" + - name: "mongo" + - name: "mariadb" + - name: "sshRouter" + - name: "gitProvider" + - name: "bitbucket" + - name: "github" + - name: "gitlab" +externalDocs: + url: "http://app.dokploy.com/api/settings.getOpenApiDocument" diff --git a/.speakeasy/speakeasy-modifications-overlay.yaml b/.speakeasy/speakeasy-modifications-overlay.yaml new file mode 100644 index 0000000..857ca30 --- /dev/null +++ b/.speakeasy/speakeasy-modifications-overlay.yaml @@ -0,0 +1,2472 @@ +overlay: 1.0.0 +x-speakeasy-jsonpath: rfc9535 +info: + title: Speakeasy Modifications + version: 0.0.2 + x-speakeasy-metadata: + after: "" + before: "" + type: speakeasy-modifications +actions: + - target: $["paths"]["/settings.haveActivateRequests"]["get"] + update: + x-speakeasy-name-override: have-activate-requests + x-speakeasy-metadata: + after: sdk.settings.have-activate-requests() + before: sdk.settings.settings-haveActivateRequests() + created_at: 1758853667521 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/mongo.saveExternalPort"]["post"] + update: + x-speakeasy-name-override: save-external-port + x-speakeasy-metadata: + after: sdk.mongo.save-external-port() + before: sdk.mongo.mongo-saveExternalPort() + created_at: 1758853667521 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/application.saveEnvironment"]["post"] + update: + x-speakeasy-name-override: save-environment + x-speakeasy-metadata: + after: sdk.application.save-environment() + before: sdk.application.application-saveEnvironment() + created_at: 1758853667521 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/bitbucket.update"]["post"] + update: + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.bitbucket.update() + before: sdk.bitbucket.bitbucket-update() + created_at: 1758853667521 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/bitbucket.bitbucketProviders"]["get"] + update: + x-speakeasy-name-override: providers + x-speakeasy-metadata: + after: sdk.bitbucket.providers() + before: sdk.bitbucket.bitbucket-bitbucketProviders() + created_at: 1758853667521 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/stripe.getProducts"]["get"] + update: + x-speakeasy-name-override: getProducts + x-speakeasy-metadata: + after: sdk.stripe.getProducts() + before: sdk.stripe.stripe-getProducts() + created_at: 1758853667521 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/settings.haveTraefikDashboardPortEnabled"]["get"] + update: + x-speakeasy-name-override: haveTraefikDashboardPortEnabled + x-speakeasy-metadata: + after: sdk.settings.haveTraefikDashboardPortEnabled() + before: sdk.settings.settings-haveTraefikDashboardPortEnabled() + created_at: 1758853667521 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/mariadb.deploy"]["post"] + update: + x-speakeasy-name-override: deploy + x-speakeasy-metadata: + after: sdk.mariadb.deploy() + before: sdk.mariadb.mariadb-deploy() + created_at: 1758853667521 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/backup.manualBackupMongo"]["post"] + update: + x-speakeasy-name-override: manual-backup-mongo + x-speakeasy-metadata: + after: sdk.backup.manual-backup-mongo() + before: sdk.backup.backup-manualBackupMongo() + created_at: 1758853667521 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/domain.generateDomain"]["post"] + update: + x-speakeasy-name-override: generateDomain + x-speakeasy-metadata: + after: sdk.domain.generateDomain() + before: sdk.domain.domain-generateDomain() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/bitbucket.one"]["get"] + update: + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.bitbucket.get() + before: sdk.bitbucket.bitbucket-one() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/compose.getConvertedCompose"]["get"] + update: + x-speakeasy-name-override: get-converted + x-speakeasy-metadata: + after: sdk.compose.get-converted() + before: sdk.compose.compose-getConvertedCompose() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/auth.one"]["get"] + update: + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.auth.get() + before: sdk.auth.auth-one() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/mariadb.reload"]["post"] + update: + x-speakeasy-name-override: reload + x-speakeasy-metadata: + after: sdk.mariadb.reload() + before: sdk.mariadb.mariadb-reload() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/application.update"]["post"] + update: + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.application.update() + before: sdk.application.application-update() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/mariadb.update"]["post"] + update: + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.mariadb.update() + before: sdk.mariadb.mariadb-update() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/application.saveBitbucketProvider"]["post"] + update: + x-speakeasy-name-override: saveBitbucketProvider + x-speakeasy-metadata: + after: sdk.application.saveBitbucketProvider() + before: sdk.application.application-saveBitbucketProvider() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/redis.start"]["post"] + update: + x-speakeasy-name-override: start + x-speakeasy-metadata: + after: sdk.redis.start() + before: sdk.redis.redis-start() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/project.remove"]["post"] + update: + x-speakeasy-name-override: remove + x-speakeasy-metadata: + after: sdk.project.remove() + before: sdk.project.project-remove() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/settings.reloadServer"]["post"] + update: + x-speakeasy-name-override: reload-server + x-speakeasy-metadata: + after: sdk.settings.reload-server() + before: sdk.settings.settings-reloadServer() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/settings.updateTraefikConfig"]["post"] + update: + x-speakeasy-name-override: updateTraefikConfig + x-speakeasy-metadata: + after: sdk.settings.updateTraefikConfig() + before: sdk.settings.settings-updateTraefikConfig() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/auth.verify2FASetup"]["post"] + update: + x-speakeasy-name-override: verify-2fa-setup + x-speakeasy-metadata: + after: sdk.auth.verify-2fa-setup() + before: sdk.auth.auth-verify2FASetup() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/redis.remove"]["post"] + update: + x-speakeasy-name-override: remove + x-speakeasy-metadata: + after: sdk.redis.remove() + before: sdk.redis.redis-remove() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/notification.createDiscord"]["post"] + update: + x-speakeasy-name-override: createDiscord + x-speakeasy-metadata: + after: sdk.notification.createDiscord() + before: sdk.notification.notification-createDiscord() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/application.create"]["post"] + update: + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.application.create() + before: sdk.application.application-create() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/registry.testRegistry"]["post"] + update: + x-speakeasy-name-override: test-registry + x-speakeasy-metadata: + after: sdk.registry.test-registry() + before: sdk.registry.registry-testRegistry() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/notification.createEmail"]["post"] + update: + x-speakeasy-name-override: create-email + x-speakeasy-metadata: + after: sdk.notification.create-email() + before: sdk.notification.notification-createEmail() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/mariadb.saveExternalPort"]["post"] + update: + x-speakeasy-name-override: saveExternalPort + x-speakeasy-metadata: + after: sdk.mariadb.saveExternalPort() + before: sdk.mariadb.mariadb-saveExternalPort() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/auth.logout"]["post"] + update: + x-speakeasy-name-override: logout + x-speakeasy-metadata: + after: sdk.auth.logout() + before: sdk.auth.auth-logout() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/compose.cleanQueues"]["post"] + update: + x-speakeasy-name-override: cleanQueues + x-speakeasy-metadata: + after: sdk.compose.cleanQueues() + before: sdk.compose.compose-cleanQueues() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/auth.createAdmin"]["post"] + update: + x-speakeasy-name-override: createAdmin + x-speakeasy-metadata: + after: sdk.auth.createAdmin() + before: sdk.auth.auth-createAdmin() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/mysql.deploy"]["post"] + update: + x-speakeasy-name-override: deploy + x-speakeasy-metadata: + after: sdk.mysql.deploy() + before: sdk.mysql.mysql-deploy() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/mysql.stop"]["post"] + update: + x-speakeasy-name-override: stop + x-speakeasy-metadata: + after: sdk.mysql.stop() + before: sdk.mysql.mysql-stop() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/domain.create"]["post"] + update: + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.domain.create() + before: sdk.domain.domain-create() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/settings.getDokployVersion"]["get"] + update: + x-speakeasy-name-override: getDokployVersion + x-speakeasy-metadata: + after: sdk.settings.getDokployVersion() + before: sdk.settings.settings-getDokployVersion() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/github.update"]["post"] + update: + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.github.update() + before: sdk.github.github-update() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/compose.templates"]["get"] + update: + x-speakeasy-name-override: get-templates + x-speakeasy-metadata: + after: sdk.compose.get-templates() + before: sdk.compose.compose-templates() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/backup.manualBackupMariadb"]["post"] + update: + x-speakeasy-name-override: manual-backup-mariadb + x-speakeasy-metadata: + after: sdk.backup.manual-backup-mariadb() + before: sdk.backup.backup-manualBackupMariadb() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/gitlab.create"]["post"] + update: + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.gitlab.create() + before: sdk.gitlab.gitlab-create() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/application.saveDockerProvider"]["post"] + update: + x-speakeasy-name-override: save-docker-provider + x-speakeasy-metadata: + after: sdk.application.save-docker-provider() + before: sdk.application.application-saveDockerProvider() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/application.markRunning"]["post"] + update: + x-speakeasy-name-override: markRunning + x-speakeasy-metadata: + after: sdk.application.markRunning() + before: sdk.application.application-markRunning() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/domain.byComposeId"]["get"] + update: + x-speakeasy-name-override: byComposeId + x-speakeasy-metadata: + after: sdk.domain.byComposeId() + before: sdk.domain.domain-byComposeId() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/deployment.allByCompose"]["get"] + update: + x-speakeasy-name-override: all-by-compose + x-speakeasy-metadata: + after: sdk.deployment.all-by-compose() + before: sdk.deployment.deployment-allByCompose() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/deployment.all"]["get"] + update: + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.deployment.get() + before: sdk.deployment.deployment-all() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/settings.getLogRotateStatus"]["get"] + update: + x-speakeasy-name-override: get-log-rotate-status + x-speakeasy-metadata: + after: sdk.settings.get-log-rotate-status() + before: sdk.settings.settings-getLogRotateStatus() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/gitlab.getGitlabBranches"]["get"] + update: + x-speakeasy-name-override: get-gitlab-branches + x-speakeasy-metadata: + after: sdk.gitlab.get-gitlab-branches() + before: sdk.gitlab.gitlab-getGitlabBranches() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/server.one"]["get"] + update: + x-speakeasy-group: servers + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.servers.get() + before: sdk.server.server-one() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/project.update"]["post"] + update: + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.project.update() + before: sdk.project.project-update() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/redirects.delete"]["post"] + update: + x-speakeasy-name-override: delete + x-speakeasy-metadata: + after: sdk.redirects.delete() + before: sdk.redirects.redirects-delete() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/settings.updateTraefikFile"]["post"] + update: + x-speakeasy-name-override: update-traefik-file + x-speakeasy-metadata: + after: sdk.settings.update-traefik-file() + before: sdk.settings.settings-updateTraefikFile() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/compose.update"]["post"] + update: + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.compose.update() + before: sdk.compose.compose-update() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/backup.create"]["post"] + update: + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.backup.create() + before: sdk.backup.backup-create() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/mariadb.remove"]["post"] + update: + x-speakeasy-name-override: remove + x-speakeasy-metadata: + after: sdk.mariadb.remove() + before: sdk.mariadb.mariadb-remove() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/destination.remove"]["post"] + update: + x-speakeasy-name-override: remove + x-speakeasy-metadata: + after: sdk.destination.remove() + before: sdk.destination.destination-remove() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/compose.delete"]["post"] + update: + x-speakeasy-name-override: delete + x-speakeasy-metadata: + after: sdk.compose.delete() + before: sdk.compose.compose-delete() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/postgres.reload"]["post"] + update: + x-speakeasy-name-override: reload + x-speakeasy-metadata: + after: sdk.postgres.reload() + before: sdk.postgres.postgres-reload() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/bitbucket.create"]["post"] + update: + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.bitbucket.create() + before: sdk.bitbucket.bitbucket-create() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/docker.getConfig"]["get"] + update: + x-speakeasy-name-override: get-config + x-speakeasy-metadata: + after: sdk.docker.get-config() + before: sdk.docker.docker-getConfig() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/settings.updateWebServerTraefikConfig"]["post"] + update: + x-speakeasy-name-override: update-web-server-traefik-config + x-speakeasy-metadata: + after: sdk.settings.update-web-server-traefik-config() + before: sdk.settings.settings-updateWebServerTraefikConfig() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/compose.getTags"]["get"] + update: + x-speakeasy-name-override: get-tags + x-speakeasy-metadata: + after: sdk.compose.get-tags() + before: sdk.compose.compose-getTags() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/auth.sendResetPasswordEmail"]["post"] + update: + x-speakeasy-name-override: sendResetPasswordEmail + x-speakeasy-metadata: + after: sdk.auth.sendResetPasswordEmail() + before: sdk.auth.auth-sendResetPasswordEmail() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/settings.readWebServerTraefikConfig"]["get"] + update: + x-speakeasy-name-override: read-web-server-traefik-config + x-speakeasy-metadata: + after: sdk.settings.read-web-server-traefik-config() + before: sdk.settings.settings-readWebServerTraefikConfig() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/mongo.reload"]["post"] + update: + x-speakeasy-name-override: reload + x-speakeasy-metadata: + after: sdk.mongo.reload() + before: sdk.mongo.mongo-reload() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/domain.byApplicationId"]["get"] + update: + x-speakeasy-name-override: by-application-id + x-speakeasy-metadata: + after: sdk.domain.by-application-id() + before: sdk.domain.domain-byApplicationId() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/mysql.remove"]["post"] + update: + x-speakeasy-name-override: remove + x-speakeasy-metadata: + after: sdk.mysql.remove() + before: sdk.mysql.mysql-remove() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/gitlab.one"]["get"] + update: + x-speakeasy-name-override: one + x-speakeasy-metadata: + after: sdk.gitlab.one() + before: sdk.gitlab.gitlab-one() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/admin.createUserInvitation"]["post"] + update: + x-speakeasy-name-override: createUserInvitation + x-speakeasy-metadata: + after: sdk.admin.createUserInvitation() + before: sdk.admin.admin-createUserInvitation() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/port.delete"]["post"] + update: + x-speakeasy-name-override: delete + x-speakeasy-metadata: + after: sdk.port.delete() + before: sdk.port.port-delete() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/sshKey.remove"]["post"] + update: + x-speakeasy-group: ssh-key + x-speakeasy-name-override: remove + x-speakeasy-metadata: + after: sdk.ssh-key.remove() + before: sdk.sshKey.sshKey-remove() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/compose.fetchSourceType"]["post"] + update: + x-speakeasy-name-override: fetch-source-type + x-speakeasy-metadata: + after: sdk.compose.fetch-source-type() + before: sdk.compose.compose-fetchSourceType() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/settings.cleanUnusedImages"]["post"] + update: + x-speakeasy-name-override: cleanUnusedImages + x-speakeasy-metadata: + after: sdk.settings.cleanUnusedImages() + before: sdk.settings.settings-cleanUnusedImages() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/application.reload"]["post"] + update: + x-speakeasy-name-override: reload + x-speakeasy-metadata: + after: sdk.application.reload() + before: sdk.application.application-reload() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/backup.remove"]["post"] + update: + x-speakeasy-name-override: remove + x-speakeasy-metadata: + after: sdk.backup.remove() + before: sdk.backup.backup-remove() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/mongo.remove"]["post"] + update: + x-speakeasy-name-override: remove + x-speakeasy-metadata: + after: sdk.mongo.remove() + before: sdk.mongo.mongo-remove() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/settings.updateDockerCleanup"]["post"] + update: + x-speakeasy-name-override: update-docker-cleanup + x-speakeasy-metadata: + after: sdk.settings.update-docker-cleanup() + before: sdk.settings.settings-updateDockerCleanup() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/mongo.create"]["post"] + update: + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.mongo.create() + before: sdk.mongo.mongo-create() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/registry.create"]["post"] + update: + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.registry.create() + before: sdk.registry.registry-create() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/redirects.one"]["get"] + update: + x-speakeasy-name-override: getOne + x-speakeasy-metadata: + after: sdk.redirects.getOne() + before: sdk.redirects.redirects-one() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/application.one"]["get"] + update: + x-speakeasy-name-override: getOne + x-speakeasy-metadata: + after: sdk.application.getOne() + before: sdk.application.application-one() + created_at: 1758853667522 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/github.one"]["get"] + update: + x-speakeasy-name-override: one + x-speakeasy-metadata: + after: sdk.github.one() + before: sdk.github.github-one() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/destination.update"]["post"] + update: + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.destination.update() + before: sdk.destination.destination-update() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/postgres.stop"]["post"] + update: + x-speakeasy-name-override: stop + x-speakeasy-metadata: + after: sdk.postgres.stop() + before: sdk.postgres.postgres-stop() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/mysql.saveExternalPort"]["post"] + update: + x-speakeasy-name-override: saveExternalPort + x-speakeasy-metadata: + after: sdk.mysql.saveExternalPort() + before: sdk.mysql.mysql-saveExternalPort() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/mounts.remove"]["post"] + update: + x-speakeasy-name-override: remove + x-speakeasy-metadata: + after: sdk.mounts.remove() + before: sdk.mounts.mounts-remove() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/redis.changeStatus"]["post"] + update: + x-speakeasy-name-override: changeStatus + x-speakeasy-metadata: + after: sdk.redis.changeStatus() + before: sdk.redis.redis-changeStatus() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/settings.readMiddlewareTraefikConfig"]["get"] + update: + x-speakeasy-name-override: read-middleware-traefik-config + x-speakeasy-metadata: + after: sdk.settings.read-middleware-traefik-config() + before: sdk.settings.settings-readMiddlewareTraefikConfig() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/project.one"]["get"] + update: + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.project.get() + before: sdk.project.project-one() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/server.update"]["post"] + update: + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.server.update() + before: sdk.server.server-update() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/auth.createUser"]["post"] + update: + x-speakeasy-name-override: create-user + x-speakeasy-metadata: + after: sdk.auth.create-user() + before: sdk.auth.auth-createUser() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/certificates.remove"]["post"] + update: + x-speakeasy-name-override: remove + x-speakeasy-metadata: + after: sdk.certificates.remove() + before: sdk.certificates.certificates-remove() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/port.create"]["post"] + update: + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.port.create() + before: sdk.port.port-create() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/compose.stop"]["post"] + update: + x-speakeasy-name-override: stop + x-speakeasy-metadata: + after: sdk.compose.stop() + before: sdk.compose.compose-stop() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/server.setup"]["post"] + update: + x-speakeasy-name-override: setup + x-speakeasy-metadata: + after: sdk.server.setup() + before: sdk.server.server-setup() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/auth.confirmEmail"]["post"] + update: + x-speakeasy-name-override: confirm-email + x-speakeasy-metadata: + after: sdk.auth.confirm-email() + before: sdk.auth.auth-confirmEmail() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/mounts.create"]["post"] + update: + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.mounts.create() + before: sdk.mounts.mounts-create() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/destination.create"]["post"] + update: + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.destination.create() + before: sdk.destination.destination-create() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/auth.get"]["get"] + update: + x-speakeasy-name-override: getOne + x-speakeasy-metadata: + after: sdk.auth.getOne() + before: sdk.auth.auth-get() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/admin.one"]["get"] + update: + x-speakeasy-name-override: get-one + x-speakeasy-metadata: + after: sdk.admin.get-one() + before: sdk.admin.admin-one() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/postgres.deploy"]["post"] + update: + x-speakeasy-name-override: deploy + x-speakeasy-metadata: + after: sdk.postgres.deploy() + before: sdk.postgres.postgres-deploy() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/user.byAuthId"]["get"] + update: + x-speakeasy-name-override: by-auth-id + x-speakeasy-metadata: + after: sdk.user.by-auth-id() + before: sdk.user.user-byAuthId() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/settings.checkAndUpdateImage"]["post"] + update: + x-speakeasy-name-override: check-and-update-image + x-speakeasy-metadata: + after: sdk.settings.check-and-update-image() + before: sdk.settings.settings-checkAndUpdateImage() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/settings.cleanSSHPrivateKey"]["post"] + update: + x-speakeasy-name-override: clean-ssh-private-key + x-speakeasy-metadata: + after: sdk.settings.clean-ssh-private-key() + before: sdk.settings.settings-cleanSSHPrivateKey() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/destination.all"]["get"] + update: + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.destination.get() + before: sdk.destination.destination-all() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/domain.update"]["post"] + update: + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.domain.update() + before: sdk.domain.domain-update() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/backup.one"]["get"] + update: + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.backup.get() + before: sdk.backup.backup-one() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/server.create"]["post"] + update: + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.server.create() + before: sdk.server.server-create() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/auth.generateToken"]["post"] + update: + x-speakeasy-name-override: generateToken + x-speakeasy-metadata: + after: sdk.auth.generateToken() + before: sdk.auth.auth-generateToken() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/notification.createSlack"]["post"] + update: + x-speakeasy-name-override: create-slack + x-speakeasy-metadata: + after: sdk.notification.create-slack() + before: sdk.notification.notification-createSlack() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/compose.deployTemplate"]["post"] + update: + x-speakeasy-name-override: deploy-template + x-speakeasy-metadata: + after: sdk.compose.deploy-template() + before: sdk.compose.compose-deployTemplate() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/sshKey.create"]["post"] + update: + x-speakeasy-group: ssh-keys + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.ssh-keys.create() + before: sdk.sshKey.sshKey-create() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/settings.cleanAll"]["post"] + update: + x-speakeasy-name-override: cleanAll + x-speakeasy-metadata: + after: sdk.settings.cleanAll() + before: sdk.settings.settings-cleanAll() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/bitbucket.getBitbucketBranches"]["get"] + update: + x-speakeasy-name-override: getBranches + x-speakeasy-metadata: + after: sdk.bitbucket.getBranches() + before: sdk.bitbucket.bitbucket-getBitbucketBranches() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/sshKey.generate"]["post"] + update: + x-speakeasy-name-override: generate + x-speakeasy-metadata: + after: sdk.sshKey.generate() + before: sdk.sshKey.sshKey-generate() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/backup.manualBackupMySql"]["post"] + update: + x-speakeasy-name-override: manual-backup-mysql + x-speakeasy-metadata: + after: sdk.backup.manual-backup-mysql() + before: sdk.backup.backup-manualBackupMySql() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/cluster.addWorker"]["get"] + update: + x-speakeasy-name-override: add-worker + x-speakeasy-metadata: + after: sdk.cluster.add-worker() + before: sdk.cluster.cluster-addWorker() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/backup.manualBackupPostgres"]["post"] + update: + x-speakeasy-name-override: manual-backup-postgres + x-speakeasy-metadata: + after: sdk.backup.manual-backup-postgres() + before: sdk.backup.backup-manualBackupPostgres() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/docker.getContainersByAppNameMatch"]["get"] + update: + x-speakeasy-name-override: getContainersByAppNameMatch + x-speakeasy-metadata: + after: sdk.docker.getContainersByAppNameMatch() + before: sdk.docker.docker-getContainersByAppNameMatch() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/application.stop"]["post"] + update: + x-speakeasy-name-override: stop + x-speakeasy-metadata: + after: sdk.application.stop() + before: sdk.application.application-stop() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/mongo.changeStatus"]["post"] + update: + x-speakeasy-name-override: change-status + x-speakeasy-metadata: + after: sdk.mongo.change-status() + before: sdk.mongo.mongo-changeStatus() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/settings.readStats"]["get"] + update: + x-speakeasy-name-override: readStats + x-speakeasy-metadata: + after: sdk.settings.readStats() + before: sdk.settings.settings-readStats() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/mysql.one"]["get"] + update: + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.mysql.get() + before: sdk.mysql.mysql-one() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/domain.delete"]["post"] + update: + x-speakeasy-name-override: delete + x-speakeasy-metadata: + after: sdk.domain.delete() + before: sdk.domain.domain-delete() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/sshKey.all"]["get"] + update: + x-speakeasy-group: sshKeys + x-speakeasy-name-override: all + x-speakeasy-metadata: + after: sdk.sshKeys.all() + before: sdk.sshKey.sshKey-all() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/mysql.reload"]["post"] + update: + x-speakeasy-name-override: reload + x-speakeasy-metadata: + after: sdk.mysql.reload() + before: sdk.mysql.mysql-reload() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/sshKey.one"]["get"] + update: + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.sshKey.get() + before: sdk.sshKey.sshKey-one() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/gitlab.gitlabProviders"]["get"] + update: + x-speakeasy-name-override: providers + x-speakeasy-metadata: + after: sdk.gitlab.providers() + before: sdk.gitlab.gitlab-gitlabProviders() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/docker.restartContainer"]["post"] + update: + x-speakeasy-name-override: restartContainer + x-speakeasy-metadata: + after: sdk.docker.restartContainer() + before: sdk.docker.docker-restartContainer() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/compose.loadServices"]["get"] + update: + x-speakeasy-name-override: load-services + x-speakeasy-metadata: + after: sdk.compose.load-services() + before: sdk.compose.compose-loadServices() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/mongo.one"]["get"] + update: + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.mongo.get() + before: sdk.mongo.mongo-one() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/notification.testDiscordConnection"]["post"] + update: + x-speakeasy-name-override: test-discord-connection + x-speakeasy-metadata: + after: sdk.notification.test-discord-connection() + before: sdk.notification.notification-testDiscordConnection() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/sshKey.update"]["post"] + update: + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.sshKey.update() + before: sdk.sshKey.sshKey-update() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/settings.getOpenApiDocument"]["get"] + update: + x-speakeasy-name-override: get-open-api-document + x-speakeasy-metadata: + after: sdk.settings.get-open-api-document() + before: sdk.settings.settings-getOpenApiDocument() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/notification.all"]["get"] + update: + x-speakeasy-name-override: get-all + x-speakeasy-metadata: + after: sdk.notification.get-all() + before: sdk.notification.notification-all() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/user.all"]["get"] + update: + x-speakeasy-name-override: getAll + x-speakeasy-metadata: + after: sdk.user.getAll() + before: sdk.user.user-all() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/port.one"]["get"] + update: + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.port.get() + before: sdk.port.port-one() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/settings.health"]["get"] + update: + x-speakeasy-name-override: health + x-speakeasy-metadata: + after: sdk.settings.health() + before: sdk.settings.settings-health() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/notification.testTelegramConnection"]["post"] + update: + x-speakeasy-name-override: testTelegramConnection + x-speakeasy-metadata: + after: sdk.notification.testTelegramConnection() + before: sdk.notification.notification-testTelegramConnection() + created_at: 1758853667523 + reviewed_at: 1758853750377 + type: method-name + - target: $["paths"]["/deployment.allByServer"]["get"] + update: + x-speakeasy-name-override: all-by-server + x-speakeasy-metadata: + after: sdk.deployment.all-by-server() + before: sdk.deployment.deployment-allByServer() + created_at: 1758853667523 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/settings.toggleRequests"]["post"] + update: + x-speakeasy-name-override: toggle-requests + x-speakeasy-metadata: + after: sdk.settings.toggle-requests() + before: sdk.settings.settings-toggleRequests() + created_at: 1758853667523 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/project.all"]["get"] + update: + x-speakeasy-name-override: all + x-speakeasy-metadata: + after: sdk.project.all() + before: sdk.project.project-all() + created_at: 1758853667523 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/notification.createTelegram"]["post"] + update: + x-speakeasy-name-override: create-telegram + x-speakeasy-metadata: + after: sdk.notification.create-telegram() + before: sdk.notification.notification-createTelegram() + created_at: 1758853667523 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/redirects.update"]["post"] + update: + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.redirects.update() + before: sdk.redirects.redirects-update() + created_at: 1758853667523 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/mariadb.start"]["post"] + update: + x-speakeasy-name-override: start + x-speakeasy-metadata: + after: sdk.mariadb.start() + before: sdk.mariadb.mariadb-start() + created_at: 1758853667523 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/stripe.createCheckoutSession"]["post"] + update: + x-speakeasy-name-override: createCheckoutSession + x-speakeasy-metadata: + after: sdk.stripe.createCheckoutSession() + before: sdk.stripe.stripe-createCheckoutSession() + created_at: 1758853667523 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/settings.cleanUnusedVolumes"]["post"] + update: + x-speakeasy-name-override: clean-unused-volumes + x-speakeasy-metadata: + after: sdk.settings.clean-unused-volumes() + before: sdk.settings.settings-cleanUnusedVolumes() + created_at: 1758853667523 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/settings.assignDomainServer"]["post"] + update: + x-speakeasy-name-override: assignDomainServer + x-speakeasy-metadata: + after: sdk.settings.assignDomainServer() + before: sdk.settings.settings-assignDomainServer() + created_at: 1758853667523 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/settings.updateMiddlewareTraefikConfig"]["post"] + update: + x-speakeasy-name-override: update-middleware-traefik-config + x-speakeasy-metadata: + after: sdk.settings.update-middleware-traefik-config() + before: sdk.settings.settings-updateMiddlewareTraefikConfig() + created_at: 1758853667523 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/mongo.stop"]["post"] + update: + x-speakeasy-name-override: stop + x-speakeasy-metadata: + after: sdk.mongo.stop() + before: sdk.mongo.mongo-stop() + created_at: 1758853667523 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/registry.all"]["get"] + update: + x-speakeasy-name-override: getAll + x-speakeasy-metadata: + after: sdk.registry.getAll() + before: sdk.registry.registry-all() + created_at: 1758853667523 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/security.update"]["post"] + update: + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.security.update() + before: sdk.security.security-update() + created_at: 1758853667523 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/cluster.getNodes"]["get"] + update: + x-speakeasy-name-override: getNodes + x-speakeasy-metadata: + after: sdk.cluster.getNodes() + before: sdk.cluster.cluster-getNodes() + created_at: 1758853667523 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/redis.update"]["post"] + update: + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.redis.update() + before: sdk.redis.redis-update() + created_at: 1758853667523 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/notification.testSlackConnection"]["post"] + update: + x-speakeasy-name-override: test-slack-connection + x-speakeasy-metadata: + after: sdk.notification.test-slack-connection() + before: sdk.notification.notification-testSlackConnection() + created_at: 1758853667523 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/compose.refreshToken"]["post"] + update: + x-speakeasy-name-override: refresh-token + x-speakeasy-metadata: + after: sdk.compose.refresh-token() + before: sdk.compose.compose-refreshToken() + created_at: 1758853667523 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/application.delete"]["post"] + update: + x-speakeasy-name-override: delete + x-speakeasy-metadata: + after: sdk.application.delete() + before: sdk.application.application-delete() + created_at: 1758853667523 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/security.one"]["get"] + update: + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.security.get() + before: sdk.security.security-one() + created_at: 1758853667523 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/gitlab.getGitlabRepositories"]["get"] + update: + x-speakeasy-name-override: getGitlabRepositories + x-speakeasy-metadata: + after: sdk.gitlab.getGitlabRepositories() + before: sdk.gitlab.gitlab-getGitlabRepositories() + created_at: 1758853667523 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/mongo.saveEnvironment"]["post"] + update: + x-speakeasy-name-override: save-environment + x-speakeasy-metadata: + after: sdk.mongo.save-environment() + before: sdk.mongo.mongo-saveEnvironment() + created_at: 1758853667523 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/notification.updateTelegram"]["post"] + update: + x-speakeasy-name-override: update-telegram + x-speakeasy-metadata: + after: sdk.notification.update-telegram() + before: sdk.notification.notification-updateTelegram() + created_at: 1758853667523 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/notification.one"]["get"] + update: + x-speakeasy-group: notifications + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.notifications.get() + before: sdk.notification.notification-one() + created_at: 1758853667523 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/project.create"]["post"] + update: + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.project.create() + before: sdk.project.project-create() + created_at: 1758853667523 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/mysql.changeStatus"]["post"] + update: + x-speakeasy-name-override: changeStatus + x-speakeasy-metadata: + after: sdk.mysql.changeStatus() + before: sdk.mysql.mysql-changeStatus() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/postgres.saveExternalPort"]["post"] + update: + x-speakeasy-name-override: save-external-port + x-speakeasy-metadata: + after: sdk.postgres.save-external-port() + before: sdk.postgres.postgres-saveExternalPort() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/github.testConnection"]["post"] + update: + x-speakeasy-name-override: testConnection + x-speakeasy-metadata: + after: sdk.github.testConnection() + before: sdk.github.github-testConnection() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/notification.updateDiscord"]["post"] + update: + x-speakeasy-name-override: updateDiscord + x-speakeasy-metadata: + after: sdk.notification.updateDiscord() + before: sdk.notification.notification-updateDiscord() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/settings.isCloud"]["get"] + update: + x-speakeasy-name-override: isCloud + x-speakeasy-metadata: + after: sdk.settings.isCloud() + before: sdk.settings.settings-isCloud() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/server.withSSHKey"]["get"] + update: + x-speakeasy-name-override: withSSHKey + x-speakeasy-metadata: + after: sdk.server.withSSHKey() + before: sdk.server.server-withSSHKey() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/mysql.update"]["post"] + update: + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.mysql.update() + before: sdk.mysql.mysql-update() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/stripe.canCreateMoreServers"]["get"] + update: + x-speakeasy-name-override: can-create-more-servers + x-speakeasy-metadata: + after: sdk.stripe.can-create-more-servers() + before: sdk.stripe.stripe-canCreateMoreServers() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/mysql.create"]["post"] + update: + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.mysql.create() + before: sdk.mysql.mysql-create() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/application.refreshToken"]["post"] + update: + x-speakeasy-name-override: refresh-token + x-speakeasy-metadata: + after: sdk.application.refresh-token() + before: sdk.application.application-refreshToken() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/gitlab.testConnection"]["post"] + update: + x-speakeasy-name-override: testConnection + x-speakeasy-metadata: + after: sdk.gitlab.testConnection() + before: sdk.gitlab.gitlab-testConnection() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/domain.one"]["get"] + update: + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.domain.get() + before: sdk.domain.domain-one() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/certificates.one"]["get"] + update: + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.certificates.get() + before: sdk.certificates.certificates-one() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/mariadb.stop"]["post"] + update: + x-speakeasy-name-override: stop + x-speakeasy-metadata: + after: sdk.mariadb.stop() + before: sdk.mariadb.mariadb-stop() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/application.redeploy"]["post"] + update: + x-speakeasy-name-override: redeploy + x-speakeasy-metadata: + after: sdk.application.redeploy() + before: sdk.application.application-redeploy() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/notification.remove"]["post"] + update: + x-speakeasy-name-override: remove + x-speakeasy-metadata: + after: sdk.notification.remove() + before: sdk.notification.notification-remove() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/settings.cleanDockerPrune"]["post"] + update: + x-speakeasy-name-override: clean-docker-prune + x-speakeasy-metadata: + after: sdk.settings.clean-docker-prune() + before: sdk.settings.settings-cleanDockerPrune() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/mariadb.create"]["post"] + update: + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.mariadb.create() + before: sdk.mariadb.mariadb-create() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/settings.cleanDockerBuilder"]["post"] + update: + x-speakeasy-name-override: cleanDockerBuilder + x-speakeasy-metadata: + after: sdk.settings.cleanDockerBuilder() + before: sdk.settings.settings-cleanDockerBuilder() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/settings.toggleDashboard"]["post"] + update: + x-speakeasy-name-override: toggle-dashboard + x-speakeasy-metadata: + after: sdk.settings.toggle-dashboard() + before: sdk.settings.settings-toggleDashboard() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/destination.one"]["get"] + update: + x-speakeasy-name-override: getOne + x-speakeasy-metadata: + after: sdk.destination.getOne() + before: sdk.destination.destination-one() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/admin.removeUser"]["post"] + update: + x-speakeasy-name-override: remove-user + x-speakeasy-metadata: + after: sdk.admin.remove-user() + before: sdk.admin.admin-removeUser() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/auth.disable2FA"]["post"] + update: + x-speakeasy-name-override: disable2FA + x-speakeasy-metadata: + after: sdk.auth.disable2FA() + before: sdk.auth.auth-disable2FA() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/compose.getDefaultCommand"]["get"] + update: + x-speakeasy-name-override: get-default-command + x-speakeasy-metadata: + after: sdk.compose.get-default-command() + before: sdk.compose.compose-getDefaultCommand() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/settings.updateServer"]["post"] + update: + x-speakeasy-name-override: update-server + x-speakeasy-metadata: + after: sdk.settings.update-server() + before: sdk.settings.settings-updateServer() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/mongo.update"]["post"] + update: + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.mongo.update() + before: sdk.mongo.mongo-update() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/stripe.createCustomerPortalSession"]["post"] + update: + x-speakeasy-name-override: createCustomerPortalSession + x-speakeasy-metadata: + after: sdk.stripe.createCustomerPortalSession() + before: sdk.stripe.stripe-createCustomerPortalSession() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/application.saveBuildType"]["post"] + update: + x-speakeasy-name-override: saveBuildType + x-speakeasy-metadata: + after: sdk.application.saveBuildType() + before: sdk.application.application-saveBuildType() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/certificates.create"]["post"] + update: + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.certificates.create() + before: sdk.certificates.certificates-create() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/postgres.saveEnvironment"]["post"] + update: + x-speakeasy-name-override: saveEnvironment + x-speakeasy-metadata: + after: sdk.postgres.saveEnvironment() + before: sdk.postgres.postgres-saveEnvironment() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/settings.getIp"]["get"] + update: + x-speakeasy-name-override: get-ip + x-speakeasy-metadata: + after: sdk.settings.get-ip() + before: sdk.settings.settings-getIp() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/port.update"]["post"] + update: + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.port.update() + before: sdk.port.port-update() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/docker.getContainers"]["get"] + update: + x-speakeasy-name-override: get-containers + x-speakeasy-metadata: + after: sdk.docker.get-containers() + before: sdk.docker.docker-getContainers() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/admin.assignPermissions"]["post"] + update: + x-speakeasy-name-override: assignPermissions + x-speakeasy-metadata: + after: sdk.admin.assignPermissions() + before: sdk.admin.admin-assignPermissions() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/auth.resetPassword"]["post"] + update: + x-speakeasy-name-override: reset-password + x-speakeasy-metadata: + after: sdk.auth.reset-password() + before: sdk.auth.auth-resetPassword() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/security.create"]["post"] + update: + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.security.create() + before: sdk.security.security-create() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/application.saveGithubProvider"]["post"] + update: + x-speakeasy-name-override: saveGithubProvider + x-speakeasy-metadata: + after: sdk.application.saveGithubProvider() + before: sdk.application.application-saveGithubProvider() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/postgres.update"]["post"] + update: + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.postgres.update() + before: sdk.postgres.postgres-update() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/mariadb.one"]["get"] + update: + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.mariadb.get() + before: sdk.mariadb.mariadb-one() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/compose.deploy"]["post"] + update: + x-speakeasy-name-override: deploy + x-speakeasy-metadata: + after: sdk.compose.deploy() + before: sdk.compose.compose-deploy() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/mariadb.changeStatus"]["post"] + update: + x-speakeasy-name-override: changeStatus + x-speakeasy-metadata: + after: sdk.mariadb.changeStatus() + before: sdk.mariadb.mariadb-changeStatus() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/settings.saveSSHPrivateKey"]["post"] + update: + x-speakeasy-name-override: save-ssh-private-key + x-speakeasy-metadata: + after: sdk.settings.save-ssh-private-key() + before: sdk.settings.settings-saveSSHPrivateKey() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/mongo.start"]["post"] + update: + x-speakeasy-name-override: start + x-speakeasy-metadata: + after: sdk.mongo.start() + before: sdk.mongo.mongo-start() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/github.githubProviders"]["get"] + update: + x-speakeasy-name-override: getProviders + x-speakeasy-metadata: + after: sdk.github.getProviders() + before: sdk.github.github-githubProviders() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/settings.reloadTraefik"]["post"] + update: + x-speakeasy-name-override: reload-traefik + x-speakeasy-metadata: + after: sdk.settings.reload-traefik() + before: sdk.settings.settings-reloadTraefik() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/compose.randomizeCompose"]["post"] + update: + x-speakeasy-name-override: randomize-compose + x-speakeasy-metadata: + after: sdk.compose.randomize-compose() + before: sdk.compose.compose-randomizeCompose() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/application.readTraefikConfig"]["get"] + update: + x-speakeasy-name-override: readTraefikConfig + x-speakeasy-metadata: + after: sdk.application.readTraefikConfig() + before: sdk.application.application-readTraefikConfig() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/cluster.removeWorker"]["post"] + update: + x-speakeasy-name-override: remove-worker + x-speakeasy-metadata: + after: sdk.cluster.remove-worker() + before: sdk.cluster.cluster-removeWorker() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/application.readAppMonitoring"]["get"] + update: + x-speakeasy-name-override: read-app-monitoring + x-speakeasy-metadata: + after: sdk.application.read-app-monitoring() + before: sdk.application.application-readAppMonitoring() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/bitbucket.testConnection"]["post"] + update: + x-speakeasy-name-override: testConnection + x-speakeasy-metadata: + after: sdk.bitbucket.testConnection() + before: sdk.bitbucket.bitbucket-testConnection() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/compose.redeploy"]["post"] + update: + x-speakeasy-name-override: redeploy + x-speakeasy-metadata: + after: sdk.compose.redeploy() + before: sdk.compose.compose-redeploy() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/redis.saveExternalPort"]["post"] + update: + x-speakeasy-name-override: save-external-port + x-speakeasy-metadata: + after: sdk.redis.save-external-port() + before: sdk.redis.redis-saveExternalPort() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/redis.deploy"]["post"] + update: + x-speakeasy-name-override: deploy + x-speakeasy-metadata: + after: sdk.redis.deploy() + before: sdk.redis.redis-deploy() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/settings.cleanStoppedContainers"]["post"] + update: + x-speakeasy-name-override: clean-stopped-containers + x-speakeasy-metadata: + after: sdk.settings.clean-stopped-containers() + before: sdk.settings.settings-cleanStoppedContainers() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/registry.one"]["get"] + update: + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.registry.get() + before: sdk.registry.registry-one() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/server.all"]["get"] + update: + x-speakeasy-name-override: all + x-speakeasy-metadata: + after: sdk.server.all() + before: sdk.server.server-all() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/auth.login"]["post"] + update: + x-speakeasy-name-override: login + x-speakeasy-metadata: + after: sdk.auth.login() + before: sdk.auth.auth-login() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/redis.one"]["get"] + update: + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.redis.get() + before: sdk.redis.redis-one() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/auth.generate2FASecret"]["get"] + update: + x-speakeasy-name-override: generate2FASecret + x-speakeasy-metadata: + after: sdk.auth.generate2FASecret() + before: sdk.auth.auth-generate2FASecret() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/notification.testEmailConnection"]["post"] + update: + x-speakeasy-name-override: testEmailConnection + x-speakeasy-metadata: + after: sdk.notification.testEmailConnection() + before: sdk.notification.notification-testEmailConnection() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/destination.testConnection"]["post"] + update: + x-speakeasy-name-override: test-connection + x-speakeasy-metadata: + after: sdk.destination.test-connection() + before: sdk.destination.destination-testConnection() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/application.deploy"]["post"] + update: + x-speakeasy-name-override: deploy + x-speakeasy-metadata: + after: sdk.application.deploy() + before: sdk.application.application-deploy() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/mounts.update"]["post"] + update: + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.mounts.update() + before: sdk.mounts.mounts-update() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/gitProvider.remove"]["post"] + update: + x-speakeasy-name-override: remove + x-speakeasy-metadata: + after: sdk.gitProvider.remove() + before: sdk.gitProvider.gitProvider-remove() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/cluster.addManager"]["get"] + update: + x-speakeasy-name-override: addManager + x-speakeasy-metadata: + after: sdk.cluster.addManager() + before: sdk.cluster.cluster-addManager() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/settings.readTraefikEnv"]["get"] + update: + x-speakeasy-name-override: read-traefik-env + x-speakeasy-metadata: + after: sdk.settings.read-traefik-env() + before: sdk.settings.settings-readTraefikEnv() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/application.saveGitlabProvider"]["post"] + update: + x-speakeasy-name-override: save-gitlab-provider + x-speakeasy-metadata: + after: sdk.application.save-gitlab-provider() + before: sdk.application.application-saveGitlabProvider() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/auth.verifyLogin2FA"]["post"] + update: + x-speakeasy-name-override: verifyLogin2FA + x-speakeasy-metadata: + after: sdk.auth.verifyLogin2FA() + before: sdk.auth.auth-verifyLogin2FA() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/user.byUserId"]["get"] + update: + x-speakeasy-name-override: by-user-id + x-speakeasy-metadata: + after: sdk.user.by-user-id() + before: sdk.user.user-byUserId() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/docker.getContainersByAppLabel"]["get"] + update: + x-speakeasy-name-override: get-containers-by-app-label + x-speakeasy-metadata: + after: sdk.docker.get-containers-by-app-label() + before: sdk.docker.docker-getContainersByAppLabel() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/redis.saveEnvironment"]["post"] + update: + x-speakeasy-name-override: save-environment + x-speakeasy-metadata: + after: sdk.redis.save-environment() + before: sdk.redis.redis-saveEnvironment() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/gitlab.update"]["post"] + update: + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.gitlab.update() + before: sdk.gitlab.gitlab-update() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/postgres.one"]["get"] + update: + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.postgres.get() + before: sdk.postgres.postgres-one() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/mongo.deploy"]["post"] + update: + x-speakeasy-name-override: deploy + x-speakeasy-metadata: + after: sdk.mongo.deploy() + before: sdk.mongo.mongo-deploy() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/settings.writeTraefikEnv"]["post"] + update: + x-speakeasy-name-override: writeTraefikEnv + x-speakeasy-metadata: + after: sdk.settings.writeTraefikEnv() + before: sdk.settings.settings-writeTraefikEnv() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/gitProvider.getAll"]["get"] + update: + x-speakeasy-name-override: getAll + x-speakeasy-metadata: + after: sdk.gitProvider.getAll() + before: sdk.gitProvider.gitProvider-getAll() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/settings.readTraefikConfig"]["get"] + update: + x-speakeasy-name-override: readTraefikConfig + x-speakeasy-metadata: + after: sdk.settings.readTraefikConfig() + before: sdk.settings.settings-readTraefikConfig() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/postgres.remove"]["post"] + update: + x-speakeasy-name-override: remove + x-speakeasy-metadata: + after: sdk.postgres.remove() + before: sdk.postgres.postgres-remove() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/compose.create"]["post"] + update: + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.compose.create() + before: sdk.compose.compose-create() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/mysql.start"]["post"] + update: + x-speakeasy-name-override: start + x-speakeasy-metadata: + after: sdk.mysql.start() + before: sdk.mysql.mysql-start() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/registry.remove"]["post"] + update: + x-speakeasy-name-override: remove + x-speakeasy-metadata: + after: sdk.registry.remove() + before: sdk.registry.registry-remove() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/application.updateTraefikConfig"]["post"] + update: + x-speakeasy-name-override: updateTraefikConfig + x-speakeasy-metadata: + after: sdk.application.updateTraefikConfig() + before: sdk.application.application-updateTraefikConfig() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/bitbucket.getBitbucketRepositories"]["get"] + update: + x-speakeasy-name-override: get-repositories + x-speakeasy-metadata: + after: sdk.bitbucket.get-repositories() + before: sdk.bitbucket.bitbucket-getBitbucketRepositories() + created_at: 1758853667524 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/application.cleanQueues"]["post"] + update: + x-speakeasy-name-override: clean-queues + x-speakeasy-metadata: + after: sdk.application.clean-queues() + before: sdk.application.application-cleanQueues() + created_at: 1758853667525 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/mariadb.saveEnvironment"]["post"] + update: + x-speakeasy-name-override: saveEnvironment + x-speakeasy-metadata: + after: sdk.mariadb.saveEnvironment() + before: sdk.mariadb.mariadb-saveEnvironment() + created_at: 1758853667525 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/postgres.changeStatus"]["post"] + update: + x-speakeasy-name-override: changeStatus + x-speakeasy-metadata: + after: sdk.postgres.changeStatus() + before: sdk.postgres.postgres-changeStatus() + created_at: 1758853667525 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/compose.one"]["get"] + update: + x-speakeasy-name-override: getOne + x-speakeasy-metadata: + after: sdk.compose.getOne() + before: sdk.compose.compose-one() + created_at: 1758853667525 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/settings.readDirectories"]["get"] + update: + x-speakeasy-name-override: read-directories + x-speakeasy-metadata: + after: sdk.settings.read-directories() + before: sdk.settings.settings-readDirectories() + created_at: 1758853667525 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/github.getGithubBranches"]["get"] + update: + x-speakeasy-name-override: getBranches + x-speakeasy-metadata: + after: sdk.github.getBranches() + before: sdk.github.github-getGithubBranches() + created_at: 1758853667525 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/certificates.all"]["get"] + update: + x-speakeasy-name-override: all + x-speakeasy-metadata: + after: sdk.certificates.all() + before: sdk.certificates.certificates-all() + created_at: 1758853667525 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/mounts.one"]["get"] + update: + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.mounts.get() + before: sdk.mounts.mounts-one() + created_at: 1758853667525 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/redis.create"]["post"] + update: + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.redis.create() + before: sdk.redis.redis-create() + created_at: 1758853667525 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/registry.update"]["post"] + update: + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.registry.update() + before: sdk.registry.registry-update() + created_at: 1758853667525 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/postgres.create"]["post"] + update: + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.postgres.create() + before: sdk.postgres.postgres-create() + created_at: 1758853667525 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/settings.toggleLogRotate"]["post"] + update: + x-speakeasy-name-override: toggle-log-rotate + x-speakeasy-metadata: + after: sdk.settings.toggle-log-rotate() + before: sdk.settings.settings-toggleLogRotate() + created_at: 1758853667525 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/settings.cleanMonitoring"]["post"] + update: + x-speakeasy-name-override: clean-monitoring + x-speakeasy-metadata: + after: sdk.settings.clean-monitoring() + before: sdk.settings.settings-cleanMonitoring() + created_at: 1758853667525 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/notification.updateSlack"]["post"] + update: + x-speakeasy-name-override: updateSlack + x-speakeasy-metadata: + after: sdk.notification.updateSlack() + before: sdk.notification.notification-updateSlack() + created_at: 1758853667525 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/backup.update"]["post"] + update: + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.backup.update() + before: sdk.backup.backup-update() + created_at: 1758853667525 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/auth.update"]["post"] + update: + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.auth.update() + before: sdk.auth.auth-update() + created_at: 1758853667525 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/security.delete"]["post"] + update: + x-speakeasy-name-override: delete + x-speakeasy-metadata: + after: sdk.security.delete() + before: sdk.security.security-delete() + created_at: 1758853667525 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/server.remove"]["post"] + update: + x-speakeasy-name-override: remove + x-speakeasy-metadata: + after: sdk.server.remove() + before: sdk.server.server-remove() + created_at: 1758853667525 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/redirects.create"]["post"] + update: + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.redirects.create() + before: sdk.redirects.redirects-create() + created_at: 1758853667525 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/postgres.start"]["post"] + update: + x-speakeasy-name-override: start + x-speakeasy-metadata: + after: sdk.postgres.start() + before: sdk.postgres.postgres-start() + created_at: 1758853667525 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/admin.getUserByToken"]["get"] + update: + x-speakeasy-name-override: getUserByToken + x-speakeasy-metadata: + after: sdk.admin.getUserByToken() + before: sdk.admin.admin-getUserByToken() + created_at: 1758853667525 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/redis.stop"]["post"] + update: + x-speakeasy-name-override: stop + x-speakeasy-metadata: + after: sdk.redis.stop() + before: sdk.redis.redis-stop() + created_at: 1758853667525 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/mysql.saveEnvironment"]["post"] + update: + x-speakeasy-name-override: save-environment + x-speakeasy-metadata: + after: sdk.mysql.save-environment() + before: sdk.mysql.mysql-saveEnvironment() + created_at: 1758853667525 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/application.start"]["post"] + update: + x-speakeasy-name-override: start + x-speakeasy-metadata: + after: sdk.application.start() + before: sdk.application.application-start() + created_at: 1758853667525 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/application.saveGitProdiver"]["post"] + update: + x-speakeasy-name-override: save-git-prodiver + x-speakeasy-metadata: + after: sdk.application.save-git-prodiver() + before: sdk.application.application-saveGitProdiver() + created_at: 1758853667525 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/settings.readTraefikFile"]["get"] + update: + x-speakeasy-name-override: readTraefikFile + x-speakeasy-metadata: + after: sdk.settings.readTraefikFile() + before: sdk.settings.settings-readTraefikFile() + created_at: 1758853667525 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/notification.updateEmail"]["post"] + update: + x-speakeasy-name-override: updateEmail + x-speakeasy-metadata: + after: sdk.notification.updateEmail() + before: sdk.notification.notification-updateEmail() + created_at: 1758853667525 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/redis.reload"]["post"] + update: + x-speakeasy-name-override: reload + x-speakeasy-metadata: + after: sdk.redis.reload() + before: sdk.redis.redis-reload() + created_at: 1758853667525 + reviewed_at: 1758853750378 + type: method-name + - target: $["paths"]["/github.getGithubRepositories"]["get"] + update: + x-speakeasy-name-override: getRepositories + x-speakeasy-metadata: + after: sdk.github.getRepositories() + before: sdk.github.github-getGithubRepositories() + created_at: 1758853667525 + reviewed_at: 1758853750378 + type: method-name diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock new file mode 100644 index 0000000..dbf0d81 --- /dev/null +++ b/.speakeasy/workflow.lock @@ -0,0 +1,39 @@ +speakeasyVersion: 1.630.0 +sources: + Dokploy API: + sourceNamespace: dokploy-api + sourceRevisionDigest: sha256:7ac5274bd5509dd1006ed9ace9e17bce4c557b8e89d82fa048dfc86226fa95b5 + sourceBlobDigest: sha256:8c1ea93c1f069744eb7f61c88e56dc9762a1d46f01af0945c14e88c895cebc5f + tags: + - latest + - 1.0.0 +targets: + dokploy: + source: Dokploy API + sourceNamespace: dokploy-api + sourceRevisionDigest: sha256:7ac5274bd5509dd1006ed9ace9e17bce4c557b8e89d82fa048dfc86226fa95b5 + sourceBlobDigest: sha256:8c1ea93c1f069744eb7f61c88e56dc9762a1d46f01af0945c14e88c895cebc5f + codeSamplesNamespace: dokploy-api-typescript-code-samples + codeSamplesRevisionDigest: sha256:c4530b7e7d63959fa0f5c119c30d6eef3d93f8512ff3e3182f50827b59d9e883 +workflow: + workflowVersion: 1.0.0 + speakeasyVersion: latest + sources: + Dokploy API: + inputs: + - location: https://raw.githubusercontent.com/Dokploy/website/refs/heads/main/apps/docs/api.json + overlays: + - location: .speakeasy/speakeasy-modifications-overlay.yaml + output: .speakeasy/out.openapi.yaml + registry: + location: registry.speakeasyapi.dev/lukehagar/lukehagar/dokploy-api + targets: + dokploy: + target: typescript + source: Dokploy API + codeSamples: + registry: + location: registry.speakeasyapi.dev/lukehagar/lukehagar/dokploy-api-typescript-code-samples + labelOverride: + fixedValue: Typescript (SDK) + blocking: false diff --git a/.speakeasy/workflow.yaml b/.speakeasy/workflow.yaml new file mode 100644 index 0000000..be9ff23 --- /dev/null +++ b/.speakeasy/workflow.yaml @@ -0,0 +1,21 @@ +workflowVersion: 1.0.0 +speakeasyVersion: latest +sources: + Dokploy API: + inputs: + - location: https://raw.githubusercontent.com/Dokploy/website/refs/heads/main/apps/docs/api.json + overlays: + - location: .speakeasy/speakeasy-modifications-overlay.yaml + output: .speakeasy/out.openapi.yaml + registry: + location: registry.speakeasyapi.dev/lukehagar/lukehagar/dokploy-api +targets: + dokploy: + target: typescript + source: Dokploy API + codeSamples: + registry: + location: registry.speakeasyapi.dev/lukehagar/lukehagar/dokploy-api-typescript-code-samples + labelOverride: + fixedValue: Typescript (SDK) + blocking: false diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..d585717 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,26 @@ +# Contributing to This Repository + +Thank you for your interest in contributing to this repository. Please note that this repository contains generated code. As such, we do not accept direct changes or pull requests. Instead, we encourage you to follow the guidelines below to report issues and suggest improvements. + +## How to Report Issues + +If you encounter any bugs or have suggestions for improvements, please open an issue on GitHub. When reporting an issue, please provide as much detail as possible to help us reproduce the problem. This includes: + +- A clear and descriptive title +- Steps to reproduce the issue +- Expected and actual behavior +- Any relevant logs, screenshots, or error messages +- Information about your environment (e.g., operating system, software versions) + - For example can be collected using the `npx envinfo` command from your terminal if you have Node.js installed + +## Issue Triage and Upstream Fixes + +We will review and triage issues as quickly as possible. Our goal is to address bugs and incorporate improvements in the upstream source code. Fixes will be included in the next generation of the generated code. + +## Contact + +If you have any questions or need further assistance, please feel free to reach out by opening an issue. + +Thank you for your understanding and cooperation! + +The Maintainers diff --git a/FUNCTIONS.md b/FUNCTIONS.md new file mode 100644 index 0000000..c06120d --- /dev/null +++ b/FUNCTIONS.md @@ -0,0 +1,87 @@ +# Standalone Functions + +> [!NOTE] +> This section is useful if you are using a bundler and targetting browsers and +> runtimes where the size of an application affects performance and load times. + +Every method in this SDK is also available as a standalone function. This +alternative API is suitable when targetting the browser or serverless runtimes +and using a bundler to build your application since all unused functionality +will be tree-shaken away. This includes code for unused methods, Zod schemas, +encoding helpers and response handlers. The result is dramatically smaller +impact on the application's final bundle size which grows very slowly as you use +more and more functionality from this SDK. + +Calling methods through the main SDK class remains a valid and generally more +more ergonomic option. Standalone functions represent an optimisation for a +specific category of applications. + +## Example + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { adminGetOne } from "dokploy/funcs/adminGetOne.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await adminGetOne(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("adminGetOne failed:", res.error); + } +} + +run(); +``` + +## Result types + +Standalone functions differ from SDK methods in that they return a +`Result` type to capture _known errors_ and document them using +the type system. By avoiding throwing errors, application code maintains clear +control flow and error-handling become part of the regular flow of application +code. + +> We use the term "known errors" because standalone functions, and JavaScript +> code in general, can still throw unexpected errors such as `TypeError`s, +> `RangeError`s and `DOMException`s. Exhaustively catching all errors may be +> something this SDK addresses in the future. Nevertheless, there is still a lot +> of benefit from capturing most errors and turning them into values. + +The second reason for this style of programming is because these functions will +typically be used in front-end applications where exception throwing is +sometimes discouraged or considered unidiomatic. React and similar ecosystems +and libraries tend to promote this style of programming so that components +render useful content under all states (loading, success, error and so on). + +The general pattern when calling standalone functions looks like this: + +```typescript +import { Core } from ""; +import { fetchSomething } from "/funcs/fetchSomething.js"; + +const client = new Core(); + +async function run() { + const result = await fetchSomething(client, { id: "123" }); + if (!result.ok) { + // You can throw the error or handle it. It's your choice now. + throw result.error; + } + + console.log(result.value); +} + +run(); +``` + +Notably, `result.error` above will have an explicit type compared to a try-catch +variation where the error in the catch block can only be of type `unknown` (or +`any` depending on your TypeScript settings). \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..518acd8 --- /dev/null +++ b/README.md @@ -0,0 +1,1054 @@ +# dokploy + +Developer-friendly & type-safe Typescript SDK specifically catered to leverage *dokploy* API. + +
+ + + + +
+ + +

+> [!IMPORTANT] +> This SDK is not yet ready for production use. To complete setup please follow the steps outlined in your [workspace](https://app.speakeasy.com/org/lukehagar/lukehagar). Delete this section before > publishing to a package manager. + + +## Summary + +Dokploy API: Endpoints for dokploy + +More information about the API can be found at http://app.dokploy.com/api/settings.getOpenApiDocument + + + +## Table of Contents + +* [dokploy](#dokploy) + * [SDK Installation](#sdk-installation) + * [Requirements](#requirements) + * [SDK Example Usage](#sdk-example-usage) + * [Authentication](#authentication) + * [Available Resources and Operations](#available-resources-and-operations) + * [Standalone functions](#standalone-functions) + * [Retries](#retries) + * [Error Handling](#error-handling) + * [Server Selection](#server-selection) + * [Custom HTTP Client](#custom-http-client) + * [Debugging](#debugging) +* [Development](#development) + * [Maturity](#maturity) + * [Contributions](#contributions) + + + + +## SDK Installation + +> [!TIP] +> To finish publishing your SDK to npm and others you must [run your first generation action](https://www.speakeasy.com/docs/github-setup#step-by-step-guide). + + +The SDK can be installed with either [npm](https://www.npmjs.com/), [pnpm](https://pnpm.io/), [bun](https://bun.sh/) or [yarn](https://classic.yarnpkg.com/en/) package managers. + +### NPM + +```bash +npm add +``` + +### PNPM + +```bash +pnpm add +``` + +### Bun + +```bash +bun add +``` + +### Yarn + +```bash +yarn add +``` + +> [!NOTE] +> This package is published with CommonJS and ES Modules (ESM) support. + + + +## Requirements + +For supported JavaScript runtimes, please consult [RUNTIMES.md](RUNTIMES.md). + + + +## SDK Example Usage + +### Example + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.admin.getOne(); + + console.log(result); +} + +run(); + +``` + + + +## Authentication + +### Per-Client Security Schemes + +This SDK supports the following security scheme globally: + +| Name | Type | Scheme | Environment Variable | +| --------------- | ---- | ----------- | ----------------------- | +| `authorization` | http | HTTP Bearer | `DOKPLOY_AUTHORIZATION` | + +To authenticate with the API the `authorization` parameter must be set when initializing the SDK client instance. For example: +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.admin.getOne(); + + console.log(result); +} + +run(); + +``` + + + +## Available Resources and Operations + +
+Available methods + +### [admin](docs/sdks/admin/README.md) + +* [getOne](docs/sdks/admin/README.md#getone) +* [createUserInvitation](docs/sdks/admin/README.md#createuserinvitation) +* [removeUser](docs/sdks/admin/README.md#removeuser) +* [getUserByToken](docs/sdks/admin/README.md#getuserbytoken) +* [assignPermissions](docs/sdks/admin/README.md#assignpermissions) + +### [application](docs/sdks/application/README.md) + +* [create](docs/sdks/application/README.md#create) +* [getOne](docs/sdks/application/README.md#getone) +* [reload](docs/sdks/application/README.md#reload) +* [delete](docs/sdks/application/README.md#delete) +* [stop](docs/sdks/application/README.md#stop) +* [start](docs/sdks/application/README.md#start) +* [redeploy](docs/sdks/application/README.md#redeploy) +* [saveEnvironment](docs/sdks/application/README.md#saveenvironment) +* [saveBuildType](docs/sdks/application/README.md#savebuildtype) +* [saveGithubProvider](docs/sdks/application/README.md#savegithubprovider) +* [saveGitlabProvider](docs/sdks/application/README.md#savegitlabprovider) +* [saveBitbucketProvider](docs/sdks/application/README.md#savebitbucketprovider) +* [saveDockerProvider](docs/sdks/application/README.md#savedockerprovider) +* [saveGitProdiver](docs/sdks/application/README.md#savegitprodiver) +* [markRunning](docs/sdks/application/README.md#markrunning) +* [update](docs/sdks/application/README.md#update) +* [refreshToken](docs/sdks/application/README.md#refreshtoken) +* [deploy](docs/sdks/application/README.md#deploy) +* [cleanQueues](docs/sdks/application/README.md#cleanqueues) +* [readTraefikConfig](docs/sdks/application/README.md#readtraefikconfig) +* [updateTraefikConfig](docs/sdks/application/README.md#updatetraefikconfig) +* [readAppMonitoring](docs/sdks/application/README.md#readappmonitoring) + +### [auth](docs/sdks/auth/README.md) + +* [createAdmin](docs/sdks/auth/README.md#createadmin) +* [createUser](docs/sdks/auth/README.md#createuser) +* [login](docs/sdks/auth/README.md#login) +* [getOne](docs/sdks/auth/README.md#getone) +* [logout](docs/sdks/auth/README.md#logout) +* [update](docs/sdks/auth/README.md#update) +* [generateToken](docs/sdks/auth/README.md#generatetoken) +* [get](docs/sdks/auth/README.md#get) +* [generate2FASecret](docs/sdks/auth/README.md#generate2fasecret) +* [verify2faSetup](docs/sdks/auth/README.md#verify2fasetup) +* [verifyLogin2FA](docs/sdks/auth/README.md#verifylogin2fa) +* [disable2FA](docs/sdks/auth/README.md#disable2fa) +* [sendResetPasswordEmail](docs/sdks/auth/README.md#sendresetpasswordemail) +* [resetPassword](docs/sdks/auth/README.md#resetpassword) +* [confirmEmail](docs/sdks/auth/README.md#confirmemail) + +### [backup](docs/sdks/backup/README.md) + +* [create](docs/sdks/backup/README.md#create) +* [get](docs/sdks/backup/README.md#get) +* [update](docs/sdks/backup/README.md#update) +* [remove](docs/sdks/backup/README.md#remove) +* [manualBackupPostgres](docs/sdks/backup/README.md#manualbackuppostgres) +* [manualBackupMysql](docs/sdks/backup/README.md#manualbackupmysql) +* [manualBackupMariadb](docs/sdks/backup/README.md#manualbackupmariadb) +* [manualBackupMongo](docs/sdks/backup/README.md#manualbackupmongo) + +### [bitbucket](docs/sdks/bitbucket/README.md) + +* [create](docs/sdks/bitbucket/README.md#create) +* [get](docs/sdks/bitbucket/README.md#get) +* [providers](docs/sdks/bitbucket/README.md#providers) +* [getRepositories](docs/sdks/bitbucket/README.md#getrepositories) +* [getBranches](docs/sdks/bitbucket/README.md#getbranches) +* [testConnection](docs/sdks/bitbucket/README.md#testconnection) +* [update](docs/sdks/bitbucket/README.md#update) + +### [certificates](docs/sdks/certificates/README.md) + +* [create](docs/sdks/certificates/README.md#create) +* [get](docs/sdks/certificates/README.md#get) +* [remove](docs/sdks/certificates/README.md#remove) +* [all](docs/sdks/certificates/README.md#all) + +### [cluster](docs/sdks/cluster/README.md) + +* [getNodes](docs/sdks/cluster/README.md#getnodes) +* [removeWorker](docs/sdks/cluster/README.md#removeworker) +* [addWorker](docs/sdks/cluster/README.md#addworker) +* [addManager](docs/sdks/cluster/README.md#addmanager) + +### [compose](docs/sdks/compose/README.md) + +* [create](docs/sdks/compose/README.md#create) +* [getOne](docs/sdks/compose/README.md#getone) +* [update](docs/sdks/compose/README.md#update) +* [delete](docs/sdks/compose/README.md#delete) +* [cleanQueues](docs/sdks/compose/README.md#cleanqueues) +* [fetchSourceType](docs/sdks/compose/README.md#fetchsourcetype) +* [randomizeCompose](docs/sdks/compose/README.md#randomizecompose) +* [getConverted](docs/sdks/compose/README.md#getconverted) +* [deploy](docs/sdks/compose/README.md#deploy) +* [redeploy](docs/sdks/compose/README.md#redeploy) +* [stop](docs/sdks/compose/README.md#stop) +* [getDefaultCommand](docs/sdks/compose/README.md#getdefaultcommand) +* [refreshToken](docs/sdks/compose/README.md#refreshtoken) +* [deployTemplate](docs/sdks/compose/README.md#deploytemplate) +* [getTemplates](docs/sdks/compose/README.md#gettemplates) +* [getTags](docs/sdks/compose/README.md#gettags) + +### [deployment](docs/sdks/deployment/README.md) + +* [get](docs/sdks/deployment/README.md#get) +* [allByCompose](docs/sdks/deployment/README.md#allbycompose) +* [allByServer](docs/sdks/deployment/README.md#allbyserver) + +### [destination](docs/sdks/destination/README.md) + +* [create](docs/sdks/destination/README.md#create) +* [testConnection](docs/sdks/destination/README.md#testconnection) +* [getOne](docs/sdks/destination/README.md#getone) +* [get](docs/sdks/destination/README.md#get) +* [remove](docs/sdks/destination/README.md#remove) +* [update](docs/sdks/destination/README.md#update) + +### [docker](docs/sdks/docker/README.md) + +* [getContainers](docs/sdks/docker/README.md#getcontainers) +* [restartContainer](docs/sdks/docker/README.md#restartcontainer) +* [getConfig](docs/sdks/docker/README.md#getconfig) +* [getContainersByAppNameMatch](docs/sdks/docker/README.md#getcontainersbyappnamematch) +* [getContainersByAppLabel](docs/sdks/docker/README.md#getcontainersbyapplabel) + + +### [domain](docs/sdks/domain/README.md) + +* [create](docs/sdks/domain/README.md#create) +* [byApplicationId](docs/sdks/domain/README.md#byapplicationid) +* [byComposeId](docs/sdks/domain/README.md#bycomposeid) +* [generateDomain](docs/sdks/domain/README.md#generatedomain) +* [update](docs/sdks/domain/README.md#update) +* [get](docs/sdks/domain/README.md#get) +* [delete](docs/sdks/domain/README.md#delete) + +### [github](docs/sdks/github/README.md) + +* [one](docs/sdks/github/README.md#one) +* [getRepositories](docs/sdks/github/README.md#getrepositories) +* [getBranches](docs/sdks/github/README.md#getbranches) +* [getProviders](docs/sdks/github/README.md#getproviders) +* [testConnection](docs/sdks/github/README.md#testconnection) +* [update](docs/sdks/github/README.md#update) + +### [gitlab](docs/sdks/gitlab/README.md) + +* [create](docs/sdks/gitlab/README.md#create) +* [one](docs/sdks/gitlab/README.md#one) +* [providers](docs/sdks/gitlab/README.md#providers) +* [getGitlabRepositories](docs/sdks/gitlab/README.md#getgitlabrepositories) +* [getGitlabBranches](docs/sdks/gitlab/README.md#getgitlabbranches) +* [testConnection](docs/sdks/gitlab/README.md#testconnection) +* [update](docs/sdks/gitlab/README.md#update) + +### [gitProvider](docs/sdks/gitprovider/README.md) + +* [getAll](docs/sdks/gitprovider/README.md#getall) +* [remove](docs/sdks/gitprovider/README.md#remove) + +### [mariadb](docs/sdks/mariadb/README.md) + +* [create](docs/sdks/mariadb/README.md#create) +* [get](docs/sdks/mariadb/README.md#get) +* [start](docs/sdks/mariadb/README.md#start) +* [stop](docs/sdks/mariadb/README.md#stop) +* [saveExternalPort](docs/sdks/mariadb/README.md#saveexternalport) +* [deploy](docs/sdks/mariadb/README.md#deploy) +* [changeStatus](docs/sdks/mariadb/README.md#changestatus) +* [remove](docs/sdks/mariadb/README.md#remove) +* [saveEnvironment](docs/sdks/mariadb/README.md#saveenvironment) +* [reload](docs/sdks/mariadb/README.md#reload) +* [update](docs/sdks/mariadb/README.md#update) + +### [mongo](docs/sdks/mongo/README.md) + +* [create](docs/sdks/mongo/README.md#create) +* [get](docs/sdks/mongo/README.md#get) +* [start](docs/sdks/mongo/README.md#start) +* [stop](docs/sdks/mongo/README.md#stop) +* [saveExternalPort](docs/sdks/mongo/README.md#saveexternalport) +* [deploy](docs/sdks/mongo/README.md#deploy) +* [changeStatus](docs/sdks/mongo/README.md#changestatus) +* [reload](docs/sdks/mongo/README.md#reload) +* [remove](docs/sdks/mongo/README.md#remove) +* [saveEnvironment](docs/sdks/mongo/README.md#saveenvironment) +* [update](docs/sdks/mongo/README.md#update) + +### [mounts](docs/sdks/mounts/README.md) + +* [create](docs/sdks/mounts/README.md#create) +* [remove](docs/sdks/mounts/README.md#remove) +* [get](docs/sdks/mounts/README.md#get) +* [update](docs/sdks/mounts/README.md#update) + +### [mysql](docs/sdks/mysql/README.md) + +* [create](docs/sdks/mysql/README.md#create) +* [get](docs/sdks/mysql/README.md#get) +* [start](docs/sdks/mysql/README.md#start) +* [stop](docs/sdks/mysql/README.md#stop) +* [saveExternalPort](docs/sdks/mysql/README.md#saveexternalport) +* [deploy](docs/sdks/mysql/README.md#deploy) +* [changeStatus](docs/sdks/mysql/README.md#changestatus) +* [reload](docs/sdks/mysql/README.md#reload) +* [remove](docs/sdks/mysql/README.md#remove) +* [saveEnvironment](docs/sdks/mysql/README.md#saveenvironment) +* [update](docs/sdks/mysql/README.md#update) + +### [notification](docs/sdks/notification/README.md) + +* [createSlack](docs/sdks/notification/README.md#createslack) +* [updateSlack](docs/sdks/notification/README.md#updateslack) +* [testSlackConnection](docs/sdks/notification/README.md#testslackconnection) +* [createTelegram](docs/sdks/notification/README.md#createtelegram) +* [updateTelegram](docs/sdks/notification/README.md#updatetelegram) +* [testTelegramConnection](docs/sdks/notification/README.md#testtelegramconnection) +* [createDiscord](docs/sdks/notification/README.md#creatediscord) +* [updateDiscord](docs/sdks/notification/README.md#updatediscord) +* [testDiscordConnection](docs/sdks/notification/README.md#testdiscordconnection) +* [createEmail](docs/sdks/notification/README.md#createemail) +* [updateEmail](docs/sdks/notification/README.md#updateemail) +* [testEmailConnection](docs/sdks/notification/README.md#testemailconnection) +* [remove](docs/sdks/notification/README.md#remove) +* [getAll](docs/sdks/notification/README.md#getall) + +### [notifications](docs/sdks/notifications/README.md) + +* [get](docs/sdks/notifications/README.md#get) + +### [port](docs/sdks/port/README.md) + +* [create](docs/sdks/port/README.md#create) +* [get](docs/sdks/port/README.md#get) +* [delete](docs/sdks/port/README.md#delete) +* [update](docs/sdks/port/README.md#update) + +### [postgres](docs/sdks/postgres/README.md) + +* [create](docs/sdks/postgres/README.md#create) +* [get](docs/sdks/postgres/README.md#get) +* [start](docs/sdks/postgres/README.md#start) +* [stop](docs/sdks/postgres/README.md#stop) +* [saveExternalPort](docs/sdks/postgres/README.md#saveexternalport) +* [deploy](docs/sdks/postgres/README.md#deploy) +* [changeStatus](docs/sdks/postgres/README.md#changestatus) +* [remove](docs/sdks/postgres/README.md#remove) +* [saveEnvironment](docs/sdks/postgres/README.md#saveenvironment) +* [reload](docs/sdks/postgres/README.md#reload) +* [update](docs/sdks/postgres/README.md#update) + +### [project](docs/sdks/project/README.md) + +* [create](docs/sdks/project/README.md#create) +* [get](docs/sdks/project/README.md#get) +* [all](docs/sdks/project/README.md#all) +* [remove](docs/sdks/project/README.md#remove) +* [update](docs/sdks/project/README.md#update) + +### [redirects](docs/sdks/redirects/README.md) + +* [create](docs/sdks/redirects/README.md#create) +* [getOne](docs/sdks/redirects/README.md#getone) +* [delete](docs/sdks/redirects/README.md#delete) +* [update](docs/sdks/redirects/README.md#update) + +### [redis](docs/sdks/redis/README.md) + +* [create](docs/sdks/redis/README.md#create) +* [get](docs/sdks/redis/README.md#get) +* [start](docs/sdks/redis/README.md#start) +* [reload](docs/sdks/redis/README.md#reload) +* [stop](docs/sdks/redis/README.md#stop) +* [saveExternalPort](docs/sdks/redis/README.md#saveexternalport) +* [deploy](docs/sdks/redis/README.md#deploy) +* [changeStatus](docs/sdks/redis/README.md#changestatus) +* [remove](docs/sdks/redis/README.md#remove) +* [saveEnvironment](docs/sdks/redis/README.md#saveenvironment) +* [update](docs/sdks/redis/README.md#update) + +### [registry](docs/sdks/registry/README.md) + +* [create](docs/sdks/registry/README.md#create) +* [remove](docs/sdks/registry/README.md#remove) +* [update](docs/sdks/registry/README.md#update) +* [getAll](docs/sdks/registry/README.md#getall) +* [get](docs/sdks/registry/README.md#get) +* [testRegistry](docs/sdks/registry/README.md#testregistry) + +### [security](docs/sdks/security/README.md) + +* [create](docs/sdks/security/README.md#create) +* [get](docs/sdks/security/README.md#get) +* [delete](docs/sdks/security/README.md#delete) +* [update](docs/sdks/security/README.md#update) + +### [server](docs/sdks/server/README.md) + +* [create](docs/sdks/server/README.md#create) +* [all](docs/sdks/server/README.md#all) +* [withSSHKey](docs/sdks/server/README.md#withsshkey) +* [setup](docs/sdks/server/README.md#setup) +* [remove](docs/sdks/server/README.md#remove) +* [update](docs/sdks/server/README.md#update) + +### [servers](docs/sdks/servers/README.md) + +* [get](docs/sdks/servers/README.md#get) + +### [settings](docs/sdks/settings/README.md) + +* [reloadServer](docs/sdks/settings/README.md#reloadserver) +* [reloadTraefik](docs/sdks/settings/README.md#reloadtraefik) +* [toggleDashboard](docs/sdks/settings/README.md#toggledashboard) +* [cleanUnusedImages](docs/sdks/settings/README.md#cleanunusedimages) +* [cleanUnusedVolumes](docs/sdks/settings/README.md#cleanunusedvolumes) +* [cleanStoppedContainers](docs/sdks/settings/README.md#cleanstoppedcontainers) +* [cleanDockerBuilder](docs/sdks/settings/README.md#cleandockerbuilder) +* [cleanDockerPrune](docs/sdks/settings/README.md#cleandockerprune) +* [cleanAll](docs/sdks/settings/README.md#cleanall) +* [cleanMonitoring](docs/sdks/settings/README.md#cleanmonitoring) +* [saveSshPrivateKey](docs/sdks/settings/README.md#savesshprivatekey) +* [assignDomainServer](docs/sdks/settings/README.md#assigndomainserver) +* [cleanSshPrivateKey](docs/sdks/settings/README.md#cleansshprivatekey) +* [updateDockerCleanup](docs/sdks/settings/README.md#updatedockercleanup) +* [readTraefikConfig](docs/sdks/settings/README.md#readtraefikconfig) +* [updateTraefikConfig](docs/sdks/settings/README.md#updatetraefikconfig) +* [readWebServerTraefikConfig](docs/sdks/settings/README.md#readwebservertraefikconfig) +* [updateWebServerTraefikConfig](docs/sdks/settings/README.md#updatewebservertraefikconfig) +* [readMiddlewareTraefikConfig](docs/sdks/settings/README.md#readmiddlewaretraefikconfig) +* [updateMiddlewareTraefikConfig](docs/sdks/settings/README.md#updatemiddlewaretraefikconfig) +* [checkAndUpdateImage](docs/sdks/settings/README.md#checkandupdateimage) +* [updateServer](docs/sdks/settings/README.md#updateserver) +* [getDokployVersion](docs/sdks/settings/README.md#getdokployversion) +* [readDirectories](docs/sdks/settings/README.md#readdirectories) +* [updateTraefikFile](docs/sdks/settings/README.md#updatetraefikfile) +* [readTraefikFile](docs/sdks/settings/README.md#readtraefikfile) +* [getIp](docs/sdks/settings/README.md#getip) +* [getOpenApiDocument](docs/sdks/settings/README.md#getopenapidocument) +* [readTraefikEnv](docs/sdks/settings/README.md#readtraefikenv) +* [writeTraefikEnv](docs/sdks/settings/README.md#writetraefikenv) +* [haveTraefikDashboardPortEnabled](docs/sdks/settings/README.md#havetraefikdashboardportenabled) +* [readStats](docs/sdks/settings/README.md#readstats) +* [getLogRotateStatus](docs/sdks/settings/README.md#getlogrotatestatus) +* [toggleLogRotate](docs/sdks/settings/README.md#togglelogrotate) +* [haveActivateRequests](docs/sdks/settings/README.md#haveactivaterequests) +* [toggleRequests](docs/sdks/settings/README.md#togglerequests) +* [isCloud](docs/sdks/settings/README.md#iscloud) +* [health](docs/sdks/settings/README.md#health) + +### [sshKey](docs/sdks/sshkey/README.md) + +* [remove](docs/sdks/sshkey/README.md#remove) +* [get](docs/sdks/sshkey/README.md#get) +* [generate](docs/sdks/sshkey/README.md#generate) +* [update](docs/sdks/sshkey/README.md#update) + +### [sshKeys](docs/sdks/sshkeys/README.md) + +* [create](docs/sdks/sshkeys/README.md#create) +* [all](docs/sdks/sshkeys/README.md#all) + +### [stripe](docs/sdks/stripe/README.md) + +* [getProducts](docs/sdks/stripe/README.md#getproducts) +* [createCheckoutSession](docs/sdks/stripe/README.md#createcheckoutsession) +* [createCustomerPortalSession](docs/sdks/stripe/README.md#createcustomerportalsession) +* [canCreateMoreServers](docs/sdks/stripe/README.md#cancreatemoreservers) + +### [user](docs/sdks/user/README.md) + +* [getAll](docs/sdks/user/README.md#getall) +* [byAuthId](docs/sdks/user/README.md#byauthid) +* [byUserId](docs/sdks/user/README.md#byuserid) + +
+ + + +## Standalone functions + +All the methods listed above are available as standalone functions. These +functions are ideal for use in applications running in the browser, serverless +runtimes or other environments where application bundle size is a primary +concern. When using a bundler to build your application, all unused +functionality will be either excluded from the final bundle or tree-shaken away. + +To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md). + +
+ +Available standalone functions + +- [`adminAssignPermissions`](docs/sdks/admin/README.md#assignpermissions) +- [`adminCreateUserInvitation`](docs/sdks/admin/README.md#createuserinvitation) +- [`adminGetOne`](docs/sdks/admin/README.md#getone) +- [`adminGetUserByToken`](docs/sdks/admin/README.md#getuserbytoken) +- [`adminRemoveUser`](docs/sdks/admin/README.md#removeuser) +- [`applicationCleanQueues`](docs/sdks/application/README.md#cleanqueues) +- [`applicationCreate`](docs/sdks/application/README.md#create) +- [`applicationDelete`](docs/sdks/application/README.md#delete) +- [`applicationDeploy`](docs/sdks/application/README.md#deploy) +- [`applicationGetOne`](docs/sdks/application/README.md#getone) +- [`applicationMarkRunning`](docs/sdks/application/README.md#markrunning) +- [`applicationReadAppMonitoring`](docs/sdks/application/README.md#readappmonitoring) +- [`applicationReadTraefikConfig`](docs/sdks/application/README.md#readtraefikconfig) +- [`applicationRedeploy`](docs/sdks/application/README.md#redeploy) +- [`applicationRefreshToken`](docs/sdks/application/README.md#refreshtoken) +- [`applicationReload`](docs/sdks/application/README.md#reload) +- [`applicationSaveBitbucketProvider`](docs/sdks/application/README.md#savebitbucketprovider) +- [`applicationSaveBuildType`](docs/sdks/application/README.md#savebuildtype) +- [`applicationSaveDockerProvider`](docs/sdks/application/README.md#savedockerprovider) +- [`applicationSaveEnvironment`](docs/sdks/application/README.md#saveenvironment) +- [`applicationSaveGithubProvider`](docs/sdks/application/README.md#savegithubprovider) +- [`applicationSaveGitlabProvider`](docs/sdks/application/README.md#savegitlabprovider) +- [`applicationSaveGitProdiver`](docs/sdks/application/README.md#savegitprodiver) +- [`applicationStart`](docs/sdks/application/README.md#start) +- [`applicationStop`](docs/sdks/application/README.md#stop) +- [`applicationUpdate`](docs/sdks/application/README.md#update) +- [`applicationUpdateTraefikConfig`](docs/sdks/application/README.md#updatetraefikconfig) +- [`authConfirmEmail`](docs/sdks/auth/README.md#confirmemail) +- [`authCreateAdmin`](docs/sdks/auth/README.md#createadmin) +- [`authCreateUser`](docs/sdks/auth/README.md#createuser) +- [`authDisable2FA`](docs/sdks/auth/README.md#disable2fa) +- [`authGenerate2FASecret`](docs/sdks/auth/README.md#generate2fasecret) +- [`authGenerateToken`](docs/sdks/auth/README.md#generatetoken) +- [`authGet`](docs/sdks/auth/README.md#get) +- [`authGetOne`](docs/sdks/auth/README.md#getone) +- [`authLogin`](docs/sdks/auth/README.md#login) +- [`authLogout`](docs/sdks/auth/README.md#logout) +- [`authResetPassword`](docs/sdks/auth/README.md#resetpassword) +- [`authSendResetPasswordEmail`](docs/sdks/auth/README.md#sendresetpasswordemail) +- [`authUpdate`](docs/sdks/auth/README.md#update) +- [`authVerify2faSetup`](docs/sdks/auth/README.md#verify2fasetup) +- [`authVerifyLogin2FA`](docs/sdks/auth/README.md#verifylogin2fa) +- [`backupCreate`](docs/sdks/backup/README.md#create) +- [`backupGet`](docs/sdks/backup/README.md#get) +- [`backupManualBackupMariadb`](docs/sdks/backup/README.md#manualbackupmariadb) +- [`backupManualBackupMongo`](docs/sdks/backup/README.md#manualbackupmongo) +- [`backupManualBackupMysql`](docs/sdks/backup/README.md#manualbackupmysql) +- [`backupManualBackupPostgres`](docs/sdks/backup/README.md#manualbackuppostgres) +- [`backupRemove`](docs/sdks/backup/README.md#remove) +- [`backupUpdate`](docs/sdks/backup/README.md#update) +- [`bitbucketCreate`](docs/sdks/bitbucket/README.md#create) +- [`bitbucketGet`](docs/sdks/bitbucket/README.md#get) +- [`bitbucketGetBranches`](docs/sdks/bitbucket/README.md#getbranches) +- [`bitbucketGetRepositories`](docs/sdks/bitbucket/README.md#getrepositories) +- [`bitbucketProviders`](docs/sdks/bitbucket/README.md#providers) +- [`bitbucketTestConnection`](docs/sdks/bitbucket/README.md#testconnection) +- [`bitbucketUpdate`](docs/sdks/bitbucket/README.md#update) +- [`certificatesAll`](docs/sdks/certificates/README.md#all) +- [`certificatesCreate`](docs/sdks/certificates/README.md#create) +- [`certificatesGet`](docs/sdks/certificates/README.md#get) +- [`certificatesRemove`](docs/sdks/certificates/README.md#remove) +- [`clusterAddManager`](docs/sdks/cluster/README.md#addmanager) +- [`clusterAddWorker`](docs/sdks/cluster/README.md#addworker) +- [`clusterGetNodes`](docs/sdks/cluster/README.md#getnodes) +- [`clusterRemoveWorker`](docs/sdks/cluster/README.md#removeworker) +- [`composeCleanQueues`](docs/sdks/compose/README.md#cleanqueues) +- [`composeCreate`](docs/sdks/compose/README.md#create) +- [`composeDelete`](docs/sdks/compose/README.md#delete) +- [`composeDeploy`](docs/sdks/compose/README.md#deploy) +- [`composeDeployTemplate`](docs/sdks/compose/README.md#deploytemplate) +- [`composeFetchSourceType`](docs/sdks/compose/README.md#fetchsourcetype) +- [`composeGetConverted`](docs/sdks/compose/README.md#getconverted) +- [`composeGetDefaultCommand`](docs/sdks/compose/README.md#getdefaultcommand) +- [`composeGetOne`](docs/sdks/compose/README.md#getone) +- [`composeGetTags`](docs/sdks/compose/README.md#gettags) +- [`composeGetTemplates`](docs/sdks/compose/README.md#gettemplates) +- [`composeRandomizeCompose`](docs/sdks/compose/README.md#randomizecompose) +- [`composeRedeploy`](docs/sdks/compose/README.md#redeploy) +- [`composeRefreshToken`](docs/sdks/compose/README.md#refreshtoken) +- [`composeStop`](docs/sdks/compose/README.md#stop) +- [`composeUpdate`](docs/sdks/compose/README.md#update) +- [`deploymentAllByCompose`](docs/sdks/deployment/README.md#allbycompose) +- [`deploymentAllByServer`](docs/sdks/deployment/README.md#allbyserver) +- [`deploymentGet`](docs/sdks/deployment/README.md#get) +- [`destinationCreate`](docs/sdks/destination/README.md#create) +- [`destinationGet`](docs/sdks/destination/README.md#get) +- [`destinationGetOne`](docs/sdks/destination/README.md#getone) +- [`destinationRemove`](docs/sdks/destination/README.md#remove) +- [`destinationTestConnection`](docs/sdks/destination/README.md#testconnection) +- [`destinationUpdate`](docs/sdks/destination/README.md#update) +- [`dockerGetConfig`](docs/sdks/docker/README.md#getconfig) +- [`dockerGetContainers`](docs/sdks/docker/README.md#getcontainers) +- [`dockerGetContainersByAppLabel`](docs/sdks/docker/README.md#getcontainersbyapplabel) +- [`dockerGetContainersByAppNameMatch`](docs/sdks/docker/README.md#getcontainersbyappnamematch) +- [`dockerRestartContainer`](docs/sdks/docker/README.md#restartcontainer) +- [`domainByApplicationId`](docs/sdks/domain/README.md#byapplicationid) +- [`domainByComposeId`](docs/sdks/domain/README.md#bycomposeid) +- [`domainCreate`](docs/sdks/domain/README.md#create) +- [`domainDelete`](docs/sdks/domain/README.md#delete) +- [`domainGenerateDomain`](docs/sdks/domain/README.md#generatedomain) +- [`domainGet`](docs/sdks/domain/README.md#get) +- [`domainUpdate`](docs/sdks/domain/README.md#update) +- [`githubGetBranches`](docs/sdks/github/README.md#getbranches) +- [`githubGetProviders`](docs/sdks/github/README.md#getproviders) +- [`githubGetRepositories`](docs/sdks/github/README.md#getrepositories) +- [`githubOne`](docs/sdks/github/README.md#one) +- [`githubTestConnection`](docs/sdks/github/README.md#testconnection) +- [`githubUpdate`](docs/sdks/github/README.md#update) +- [`gitlabCreate`](docs/sdks/gitlab/README.md#create) +- [`gitlabGetGitlabBranches`](docs/sdks/gitlab/README.md#getgitlabbranches) +- [`gitlabGetGitlabRepositories`](docs/sdks/gitlab/README.md#getgitlabrepositories) +- [`gitlabOne`](docs/sdks/gitlab/README.md#one) +- [`gitlabProviders`](docs/sdks/gitlab/README.md#providers) +- [`gitlabTestConnection`](docs/sdks/gitlab/README.md#testconnection) +- [`gitlabUpdate`](docs/sdks/gitlab/README.md#update) +- [`gitProviderGetAll`](docs/sdks/gitprovider/README.md#getall) +- [`gitProviderRemove`](docs/sdks/gitprovider/README.md#remove) +- [`mariadbChangeStatus`](docs/sdks/mariadb/README.md#changestatus) +- [`mariadbCreate`](docs/sdks/mariadb/README.md#create) +- [`mariadbDeploy`](docs/sdks/mariadb/README.md#deploy) +- [`mariadbGet`](docs/sdks/mariadb/README.md#get) +- [`mariadbReload`](docs/sdks/mariadb/README.md#reload) +- [`mariadbRemove`](docs/sdks/mariadb/README.md#remove) +- [`mariadbSaveEnvironment`](docs/sdks/mariadb/README.md#saveenvironment) +- [`mariadbSaveExternalPort`](docs/sdks/mariadb/README.md#saveexternalport) +- [`mariadbStart`](docs/sdks/mariadb/README.md#start) +- [`mariadbStop`](docs/sdks/mariadb/README.md#stop) +- [`mariadbUpdate`](docs/sdks/mariadb/README.md#update) +- [`mongoChangeStatus`](docs/sdks/mongo/README.md#changestatus) +- [`mongoCreate`](docs/sdks/mongo/README.md#create) +- [`mongoDeploy`](docs/sdks/mongo/README.md#deploy) +- [`mongoGet`](docs/sdks/mongo/README.md#get) +- [`mongoReload`](docs/sdks/mongo/README.md#reload) +- [`mongoRemove`](docs/sdks/mongo/README.md#remove) +- [`mongoSaveEnvironment`](docs/sdks/mongo/README.md#saveenvironment) +- [`mongoSaveExternalPort`](docs/sdks/mongo/README.md#saveexternalport) +- [`mongoStart`](docs/sdks/mongo/README.md#start) +- [`mongoStop`](docs/sdks/mongo/README.md#stop) +- [`mongoUpdate`](docs/sdks/mongo/README.md#update) +- [`mountsCreate`](docs/sdks/mounts/README.md#create) +- [`mountsGet`](docs/sdks/mounts/README.md#get) +- [`mountsRemove`](docs/sdks/mounts/README.md#remove) +- [`mountsUpdate`](docs/sdks/mounts/README.md#update) +- [`mysqlChangeStatus`](docs/sdks/mysql/README.md#changestatus) +- [`mysqlCreate`](docs/sdks/mysql/README.md#create) +- [`mysqlDeploy`](docs/sdks/mysql/README.md#deploy) +- [`mysqlGet`](docs/sdks/mysql/README.md#get) +- [`mysqlReload`](docs/sdks/mysql/README.md#reload) +- [`mysqlRemove`](docs/sdks/mysql/README.md#remove) +- [`mysqlSaveEnvironment`](docs/sdks/mysql/README.md#saveenvironment) +- [`mysqlSaveExternalPort`](docs/sdks/mysql/README.md#saveexternalport) +- [`mysqlStart`](docs/sdks/mysql/README.md#start) +- [`mysqlStop`](docs/sdks/mysql/README.md#stop) +- [`mysqlUpdate`](docs/sdks/mysql/README.md#update) +- [`notificationCreateDiscord`](docs/sdks/notification/README.md#creatediscord) +- [`notificationCreateEmail`](docs/sdks/notification/README.md#createemail) +- [`notificationCreateSlack`](docs/sdks/notification/README.md#createslack) +- [`notificationCreateTelegram`](docs/sdks/notification/README.md#createtelegram) +- [`notificationGetAll`](docs/sdks/notification/README.md#getall) +- [`notificationRemove`](docs/sdks/notification/README.md#remove) +- [`notificationsGet`](docs/sdks/notifications/README.md#get) +- [`notificationTestDiscordConnection`](docs/sdks/notification/README.md#testdiscordconnection) +- [`notificationTestEmailConnection`](docs/sdks/notification/README.md#testemailconnection) +- [`notificationTestSlackConnection`](docs/sdks/notification/README.md#testslackconnection) +- [`notificationTestTelegramConnection`](docs/sdks/notification/README.md#testtelegramconnection) +- [`notificationUpdateDiscord`](docs/sdks/notification/README.md#updatediscord) +- [`notificationUpdateEmail`](docs/sdks/notification/README.md#updateemail) +- [`notificationUpdateSlack`](docs/sdks/notification/README.md#updateslack) +- [`notificationUpdateTelegram`](docs/sdks/notification/README.md#updatetelegram) +- [`portCreate`](docs/sdks/port/README.md#create) +- [`portDelete`](docs/sdks/port/README.md#delete) +- [`portGet`](docs/sdks/port/README.md#get) +- [`portUpdate`](docs/sdks/port/README.md#update) +- [`postgresChangeStatus`](docs/sdks/postgres/README.md#changestatus) +- [`postgresCreate`](docs/sdks/postgres/README.md#create) +- [`postgresDeploy`](docs/sdks/postgres/README.md#deploy) +- [`postgresGet`](docs/sdks/postgres/README.md#get) +- [`postgresReload`](docs/sdks/postgres/README.md#reload) +- [`postgresRemove`](docs/sdks/postgres/README.md#remove) +- [`postgresSaveEnvironment`](docs/sdks/postgres/README.md#saveenvironment) +- [`postgresSaveExternalPort`](docs/sdks/postgres/README.md#saveexternalport) +- [`postgresStart`](docs/sdks/postgres/README.md#start) +- [`postgresStop`](docs/sdks/postgres/README.md#stop) +- [`postgresUpdate`](docs/sdks/postgres/README.md#update) +- [`projectAll`](docs/sdks/project/README.md#all) +- [`projectCreate`](docs/sdks/project/README.md#create) +- [`projectGet`](docs/sdks/project/README.md#get) +- [`projectRemove`](docs/sdks/project/README.md#remove) +- [`projectUpdate`](docs/sdks/project/README.md#update) +- [`redirectsCreate`](docs/sdks/redirects/README.md#create) +- [`redirectsDelete`](docs/sdks/redirects/README.md#delete) +- [`redirectsGetOne`](docs/sdks/redirects/README.md#getone) +- [`redirectsUpdate`](docs/sdks/redirects/README.md#update) +- [`redisChangeStatus`](docs/sdks/redis/README.md#changestatus) +- [`redisCreate`](docs/sdks/redis/README.md#create) +- [`redisDeploy`](docs/sdks/redis/README.md#deploy) +- [`redisGet`](docs/sdks/redis/README.md#get) +- [`redisReload`](docs/sdks/redis/README.md#reload) +- [`redisRemove`](docs/sdks/redis/README.md#remove) +- [`redisSaveEnvironment`](docs/sdks/redis/README.md#saveenvironment) +- [`redisSaveExternalPort`](docs/sdks/redis/README.md#saveexternalport) +- [`redisStart`](docs/sdks/redis/README.md#start) +- [`redisStop`](docs/sdks/redis/README.md#stop) +- [`redisUpdate`](docs/sdks/redis/README.md#update) +- [`registryCreate`](docs/sdks/registry/README.md#create) +- [`registryGet`](docs/sdks/registry/README.md#get) +- [`registryGetAll`](docs/sdks/registry/README.md#getall) +- [`registryRemove`](docs/sdks/registry/README.md#remove) +- [`registryTestRegistry`](docs/sdks/registry/README.md#testregistry) +- [`registryUpdate`](docs/sdks/registry/README.md#update) +- [`securityCreate`](docs/sdks/security/README.md#create) +- [`securityDelete`](docs/sdks/security/README.md#delete) +- [`securityGet`](docs/sdks/security/README.md#get) +- [`securityUpdate`](docs/sdks/security/README.md#update) +- [`serverAll`](docs/sdks/server/README.md#all) +- [`serverCreate`](docs/sdks/server/README.md#create) +- [`serverRemove`](docs/sdks/server/README.md#remove) +- [`serverSetup`](docs/sdks/server/README.md#setup) +- [`serversGet`](docs/sdks/servers/README.md#get) +- [`serverUpdate`](docs/sdks/server/README.md#update) +- [`serverWithSSHKey`](docs/sdks/server/README.md#withsshkey) +- [`settingsAssignDomainServer`](docs/sdks/settings/README.md#assigndomainserver) +- [`settingsCheckAndUpdateImage`](docs/sdks/settings/README.md#checkandupdateimage) +- [`settingsCleanAll`](docs/sdks/settings/README.md#cleanall) +- [`settingsCleanDockerBuilder`](docs/sdks/settings/README.md#cleandockerbuilder) +- [`settingsCleanDockerPrune`](docs/sdks/settings/README.md#cleandockerprune) +- [`settingsCleanMonitoring`](docs/sdks/settings/README.md#cleanmonitoring) +- [`settingsCleanSshPrivateKey`](docs/sdks/settings/README.md#cleansshprivatekey) +- [`settingsCleanStoppedContainers`](docs/sdks/settings/README.md#cleanstoppedcontainers) +- [`settingsCleanUnusedImages`](docs/sdks/settings/README.md#cleanunusedimages) +- [`settingsCleanUnusedVolumes`](docs/sdks/settings/README.md#cleanunusedvolumes) +- [`settingsGetDokployVersion`](docs/sdks/settings/README.md#getdokployversion) +- [`settingsGetIp`](docs/sdks/settings/README.md#getip) +- [`settingsGetLogRotateStatus`](docs/sdks/settings/README.md#getlogrotatestatus) +- [`settingsGetOpenApiDocument`](docs/sdks/settings/README.md#getopenapidocument) +- [`settingsHaveActivateRequests`](docs/sdks/settings/README.md#haveactivaterequests) +- [`settingsHaveTraefikDashboardPortEnabled`](docs/sdks/settings/README.md#havetraefikdashboardportenabled) +- [`settingsHealth`](docs/sdks/settings/README.md#health) +- [`settingsIsCloud`](docs/sdks/settings/README.md#iscloud) +- [`settingsReadDirectories`](docs/sdks/settings/README.md#readdirectories) +- [`settingsReadMiddlewareTraefikConfig`](docs/sdks/settings/README.md#readmiddlewaretraefikconfig) +- [`settingsReadStats`](docs/sdks/settings/README.md#readstats) +- [`settingsReadTraefikConfig`](docs/sdks/settings/README.md#readtraefikconfig) +- [`settingsReadTraefikEnv`](docs/sdks/settings/README.md#readtraefikenv) +- [`settingsReadTraefikFile`](docs/sdks/settings/README.md#readtraefikfile) +- [`settingsReadWebServerTraefikConfig`](docs/sdks/settings/README.md#readwebservertraefikconfig) +- [`settingsReloadServer`](docs/sdks/settings/README.md#reloadserver) +- [`settingsReloadTraefik`](docs/sdks/settings/README.md#reloadtraefik) +- [`settingsSaveSshPrivateKey`](docs/sdks/settings/README.md#savesshprivatekey) +- [`settingsToggleDashboard`](docs/sdks/settings/README.md#toggledashboard) +- [`settingsToggleLogRotate`](docs/sdks/settings/README.md#togglelogrotate) +- [`settingsToggleRequests`](docs/sdks/settings/README.md#togglerequests) +- [`settingsUpdateDockerCleanup`](docs/sdks/settings/README.md#updatedockercleanup) +- [`settingsUpdateMiddlewareTraefikConfig`](docs/sdks/settings/README.md#updatemiddlewaretraefikconfig) +- [`settingsUpdateServer`](docs/sdks/settings/README.md#updateserver) +- [`settingsUpdateTraefikConfig`](docs/sdks/settings/README.md#updatetraefikconfig) +- [`settingsUpdateTraefikFile`](docs/sdks/settings/README.md#updatetraefikfile) +- [`settingsUpdateWebServerTraefikConfig`](docs/sdks/settings/README.md#updatewebservertraefikconfig) +- [`settingsWriteTraefikEnv`](docs/sdks/settings/README.md#writetraefikenv) +- [`sshKeyGenerate`](docs/sdks/sshkey/README.md#generate) +- [`sshKeyGet`](docs/sdks/sshkey/README.md#get) +- [`sshKeyRemove`](docs/sdks/sshkey/README.md#remove) +- [`sshKeysAll`](docs/sdks/sshkeys/README.md#all) +- [`sshKeysCreate`](docs/sdks/sshkeys/README.md#create) +- [`sshKeyUpdate`](docs/sdks/sshkey/README.md#update) +- [`stripeCanCreateMoreServers`](docs/sdks/stripe/README.md#cancreatemoreservers) +- [`stripeCreateCheckoutSession`](docs/sdks/stripe/README.md#createcheckoutsession) +- [`stripeCreateCustomerPortalSession`](docs/sdks/stripe/README.md#createcustomerportalsession) +- [`stripeGetProducts`](docs/sdks/stripe/README.md#getproducts) +- [`userByAuthId`](docs/sdks/user/README.md#byauthid) +- [`userByUserId`](docs/sdks/user/README.md#byuserid) +- [`userGetAll`](docs/sdks/user/README.md#getall) + +
+ + + +## Retries + +Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK. + +To change the default retry strategy for a single API call, simply provide a retryConfig object to the call: +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.admin.getOne({ + retries: { + strategy: "backoff", + backoff: { + initialInterval: 1, + maxInterval: 50, + exponent: 1.1, + maxElapsedTime: 100, + }, + retryConnectionErrors: false, + }, + }); + + console.log(result); +} + +run(); + +``` + +If you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization: +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + retryConfig: { + strategy: "backoff", + backoff: { + initialInterval: 1, + maxInterval: 50, + exponent: 1.1, + maxElapsedTime: 100, + }, + retryConnectionErrors: false, + }, + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.admin.getOne(); + + console.log(result); +} + +run(); + +``` + + + +## Error Handling + +[`DokployError`](./src/models/errors/dokployerror.ts) is the base class for all HTTP error responses. It has the following properties: + +| Property | Type | Description | +| ------------------- | ---------- | ------------------------------------------------------ | +| `error.message` | `string` | Error message | +| `error.statusCode` | `number` | HTTP response status code eg `404` | +| `error.headers` | `Headers` | HTTP response headers | +| `error.body` | `string` | HTTP body. Can be empty string if no body is returned. | +| `error.rawResponse` | `Response` | Raw HTTP response | + +### Example +```typescript +import { Dokploy } from "dokploy"; +import * as errors from "dokploy/models/errors"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + try { + const result = await dokploy.admin.getOne(); + + console.log(result); + } catch (error) { + if (error instanceof errors.DokployError) { + console.log(error.message); + console.log(error.statusCode); + console.log(error.body); + console.log(error.headers); + } + } +} + +run(); + +``` + +### Error Classes +**Primary error:** +* [`DokployError`](./src/models/errors/dokployerror.ts): The base class for HTTP error responses. + +
Less common errors (6) + +
+ +**Network errors:** +* [`ConnectionError`](./src/models/errors/httpclienterrors.ts): HTTP client was unable to make a request to a server. +* [`RequestTimeoutError`](./src/models/errors/httpclienterrors.ts): HTTP request timed out due to an AbortSignal signal. +* [`RequestAbortedError`](./src/models/errors/httpclienterrors.ts): HTTP request was aborted by the client. +* [`InvalidRequestError`](./src/models/errors/httpclienterrors.ts): Any input used to create a request is invalid. +* [`UnexpectedClientError`](./src/models/errors/httpclienterrors.ts): Unrecognised or unexpected error. + + +**Inherit from [`DokployError`](./src/models/errors/dokployerror.ts)**: +* [`ResponseValidationError`](./src/models/errors/responsevalidationerror.ts): Type mismatch between the data returned from the server and the structure expected by the SDK. See `error.rawValue` for the raw value and `error.pretty()` for a nicely formatted multi-line string. + +
+ + + +## Server Selection + +### Override Server URL Per-Client + +The default server can be overridden globally by passing a URL to the `serverURL: string` optional parameter when initializing the SDK client instance. For example: +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + serverURL: "http://your-dokploy-instance.com/api", + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.admin.getOne(); + + console.log(result); +} + +run(); + +``` + + + +## Custom HTTP Client + +The TypeScript SDK makes API calls using an `HTTPClient` that wraps the native +[Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). This +client is a thin wrapper around `fetch` and provides the ability to attach hooks +around the request lifecycle that can be used to modify the request or handle +errors and response. + +The `HTTPClient` constructor takes an optional `fetcher` argument that can be +used to integrate a third-party HTTP client or when writing tests to mock out +the HTTP client and feed in fixtures. + +The following example shows how to use the `"beforeRequest"` hook to to add a +custom header and a timeout to requests and how to use the `"requestError"` hook +to log errors: + +```typescript +import { Dokploy } from "dokploy"; +import { HTTPClient } from "dokploy/lib/http"; + +const httpClient = new HTTPClient({ + // fetcher takes a function that has the same signature as native `fetch`. + fetcher: (request) => { + return fetch(request); + } +}); + +httpClient.addHook("beforeRequest", (request) => { + const nextRequest = new Request(request, { + signal: request.signal || AbortSignal.timeout(5000) + }); + + nextRequest.headers.set("x-custom-header", "custom value"); + + return nextRequest; +}); + +httpClient.addHook("requestError", (error, request) => { + console.group("Request Error"); + console.log("Reason:", `${error}`); + console.log("Endpoint:", `${request.method} ${request.url}`); + console.groupEnd(); +}); + +const sdk = new Dokploy({ httpClient: httpClient }); +``` + + + +## Debugging + +You can setup your SDK to emit debug logs for SDK requests and responses. + +You can pass a logger that matches `console`'s interface as an SDK option. + +> [!WARNING] +> Beware that debug logging will reveal secrets, like API tokens in headers, in log messages printed to a console or files. It's recommended to use this feature only during local development and not in production. + +```typescript +import { Dokploy } from "dokploy"; + +const sdk = new Dokploy({ debugLogger: console }); +``` + +You can also enable a default debug logger by setting an environment variable `DOKPLOY_DEBUG` to true. + + + + +# Development + +## Maturity + +This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage +to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally +looking for the latest version. + +## Contributions + +While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation. +We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release. + +### SDK Created by [Speakeasy](https://www.speakeasy.com/?utm_source=dokploy&utm_campaign=typescript) diff --git a/RUNTIMES.md b/RUNTIMES.md new file mode 100644 index 0000000..db7ea94 --- /dev/null +++ b/RUNTIMES.md @@ -0,0 +1,48 @@ +# Supported JavaScript runtimes + +This SDK is intended to be used in JavaScript runtimes that support ECMAScript 2020 or newer. The SDK uses the following features: + +* [Web Fetch API][web-fetch] +* [Web Streams API][web-streams] and in particular `ReadableStream` +* [Async iterables][async-iter] using `Symbol.asyncIterator` + +[web-fetch]: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API +[web-streams]: https://developer.mozilla.org/en-US/docs/Web/API/Streams_API +[async-iter]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols + +Runtime environments that are explicitly supported are: + +- Evergreen browsers which include: Chrome, Safari, Edge, Firefox +- Node.js active and maintenance LTS releases + - Currently, this is v18 and v20 +- Bun v1 and above +- Deno v1.39 + - Note that Deno does not currently have native support for streaming file uploads backed by the filesystem ([issue link][deno-file-streaming]) + +[deno-file-streaming]: https://github.com/denoland/deno/issues/11018 + +## Recommended TypeScript compiler options + +The following `tsconfig.json` options are recommended for projects using this +SDK in order to get static type support for features like async iterables, +streams and `fetch`-related APIs ([`for await...of`][for-await-of], +[`AbortSignal`][abort-signal], [`Request`][request], [`Response`][response] and +so on): + +[for-await-of]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of +[abort-signal]: https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal +[request]: https://developer.mozilla.org/en-US/docs/Web/API/Request +[response]: https://developer.mozilla.org/en-US/docs/Web/API/Response + +```jsonc +{ + "compilerOptions": { + "target": "es2020", // or higher + "lib": ["es2020", "dom", "dom.iterable"], + } +} +``` + +While `target` can be set to older ECMAScript versions, it may result in extra, +unnecessary compatibility code being generated if you are not targeting old +runtimes. \ No newline at end of file diff --git a/USAGE.md b/USAGE.md new file mode 100644 index 0000000..c55407a --- /dev/null +++ b/USAGE.md @@ -0,0 +1,18 @@ + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.admin.getOne(); + + console.log(result); +} + +run(); + +``` + \ No newline at end of file diff --git a/docs/lib/utils/retryconfig.md b/docs/lib/utils/retryconfig.md new file mode 100644 index 0000000..08f95f4 --- /dev/null +++ b/docs/lib/utils/retryconfig.md @@ -0,0 +1,24 @@ +# RetryConfig + +Allows customizing the default retry configuration. It is only permitted in methods that accept retry policies. + +## Fields + +| Name | Type | Description | Example | +| ------------------------- | ----------------------------------- | ------------------------------------------------------------------------------------------ | ----------- | +| `strategy` | `"backoff" | "none"` | The retry strategy to use. | `"backoff"` | +| `backoff` | [BackoffStrategy](#backoffstrategy) | When strategy is "backoff", this configurates for the backoff parameters. | | +| `retryConnectionErrors` | `*boolean*` | When strategy is "backoff", this determines whether or not to retry on connection errors. | `true` | + +## BackoffStrategy + +The backoff strategy allows retrying a request with an exponential backoff between each retry. + +### Fields + +| Name | Type | Description | Example | +| ------------------ | ------------ | ----------------------------------------- | -------- | +| `initialInterval` | `*number*` | The initial interval in milliseconds. | `500` | +| `maxInterval` | `*number*` | The maximum interval in milliseconds. | `60000` | +| `exponent` | `*number*` | The exponent to use for the backoff. | `1.5` | +| `maxElapsedTime` | `*number*` | The maximum elapsed time in milliseconds. | `300000` | \ No newline at end of file diff --git a/docs/models/errort.md b/docs/models/errort.md new file mode 100644 index 0000000..ca3e225 --- /dev/null +++ b/docs/models/errort.md @@ -0,0 +1,22 @@ +# ErrorT + +Error response + +## Example Usage + +```typescript +import { ErrorT } from "dokploy/models"; + +let value: ErrorT = { + message: "", + code: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `message` | *string* | :heavy_check_mark: | N/A | +| `code` | *string* | :heavy_check_mark: | N/A | +| `issues` | [models.Issue](../models/issue.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/issue.md b/docs/models/issue.md new file mode 100644 index 0000000..19279c4 --- /dev/null +++ b/docs/models/issue.md @@ -0,0 +1,17 @@ +# Issue + +## Example Usage + +```typescript +import { Issue } from "dokploy/models"; + +let value: Issue = { + message: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `message` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/adminassignpermissionsrequest.md b/docs/models/operations/adminassignpermissionsrequest.md new file mode 100644 index 0000000..f5fa7c0 --- /dev/null +++ b/docs/models/operations/adminassignpermissionsrequest.md @@ -0,0 +1,41 @@ +# AdminAssignPermissionsRequest + +## Example Usage + +```typescript +import { AdminAssignPermissionsRequest } from "dokploy/models/operations"; + +let value: AdminAssignPermissionsRequest = { + userId: "", + canCreateProjects: true, + canCreateServices: false, + canDeleteProjects: false, + canDeleteServices: false, + accesedProjects: [ + "", + ], + accesedServices: [], + canAccessToTraefikFiles: true, + canAccessToDocker: false, + canAccessToAPI: false, + canAccessToSSHKeys: false, + canAccessToGitProviders: true, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `userId` | *string* | :heavy_check_mark: | N/A | +| `canCreateProjects` | *boolean* | :heavy_check_mark: | N/A | +| `canCreateServices` | *boolean* | :heavy_check_mark: | N/A | +| `canDeleteProjects` | *boolean* | :heavy_check_mark: | N/A | +| `canDeleteServices` | *boolean* | :heavy_check_mark: | N/A | +| `accesedProjects` | *string*[] | :heavy_check_mark: | N/A | +| `accesedServices` | *string*[] | :heavy_check_mark: | N/A | +| `canAccessToTraefikFiles` | *boolean* | :heavy_check_mark: | N/A | +| `canAccessToDocker` | *boolean* | :heavy_check_mark: | N/A | +| `canAccessToAPI` | *boolean* | :heavy_check_mark: | N/A | +| `canAccessToSSHKeys` | *boolean* | :heavy_check_mark: | N/A | +| `canAccessToGitProviders` | *boolean* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/admincreateuserinvitationrequest.md b/docs/models/operations/admincreateuserinvitationrequest.md new file mode 100644 index 0000000..2fef658 --- /dev/null +++ b/docs/models/operations/admincreateuserinvitationrequest.md @@ -0,0 +1,17 @@ +# AdminCreateUserInvitationRequest + +## Example Usage + +```typescript +import { AdminCreateUserInvitationRequest } from "dokploy/models/operations"; + +let value: AdminCreateUserInvitationRequest = { + email: "Boris.Wilderman33@gmail.com", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `email` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/admingetuserbytokenrequest.md b/docs/models/operations/admingetuserbytokenrequest.md new file mode 100644 index 0000000..112a9ea --- /dev/null +++ b/docs/models/operations/admingetuserbytokenrequest.md @@ -0,0 +1,17 @@ +# AdminGetUserByTokenRequest + +## Example Usage + +```typescript +import { AdminGetUserByTokenRequest } from "dokploy/models/operations"; + +let value: AdminGetUserByTokenRequest = { + token: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `token` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/adminremoveuserrequest.md b/docs/models/operations/adminremoveuserrequest.md new file mode 100644 index 0000000..f01d170 --- /dev/null +++ b/docs/models/operations/adminremoveuserrequest.md @@ -0,0 +1,17 @@ +# AdminRemoveUserRequest + +## Example Usage + +```typescript +import { AdminRemoveUserRequest } from "dokploy/models/operations"; + +let value: AdminRemoveUserRequest = { + authId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `authId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/applicationcleanqueuesrequest.md b/docs/models/operations/applicationcleanqueuesrequest.md new file mode 100644 index 0000000..f6ced2b --- /dev/null +++ b/docs/models/operations/applicationcleanqueuesrequest.md @@ -0,0 +1,17 @@ +# ApplicationCleanQueuesRequest + +## Example Usage + +```typescript +import { ApplicationCleanQueuesRequest } from "dokploy/models/operations"; + +let value: ApplicationCleanQueuesRequest = { + applicationId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `applicationId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/applicationcreaterequest.md b/docs/models/operations/applicationcreaterequest.md new file mode 100644 index 0000000..6c59437 --- /dev/null +++ b/docs/models/operations/applicationcreaterequest.md @@ -0,0 +1,22 @@ +# ApplicationCreateRequest + +## Example Usage + +```typescript +import { ApplicationCreateRequest } from "dokploy/models/operations"; + +let value: ApplicationCreateRequest = { + name: "", + projectId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *string* | :heavy_check_mark: | N/A | +| `appName` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `projectId` | *string* | :heavy_check_mark: | N/A | +| `serverId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/applicationdeleterequest.md b/docs/models/operations/applicationdeleterequest.md new file mode 100644 index 0000000..4da5099 --- /dev/null +++ b/docs/models/operations/applicationdeleterequest.md @@ -0,0 +1,17 @@ +# ApplicationDeleteRequest + +## Example Usage + +```typescript +import { ApplicationDeleteRequest } from "dokploy/models/operations"; + +let value: ApplicationDeleteRequest = { + applicationId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `applicationId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/applicationdeployrequest.md b/docs/models/operations/applicationdeployrequest.md new file mode 100644 index 0000000..37f502b --- /dev/null +++ b/docs/models/operations/applicationdeployrequest.md @@ -0,0 +1,17 @@ +# ApplicationDeployRequest + +## Example Usage + +```typescript +import { ApplicationDeployRequest } from "dokploy/models/operations"; + +let value: ApplicationDeployRequest = { + applicationId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `applicationId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/applicationmarkrunningrequest.md b/docs/models/operations/applicationmarkrunningrequest.md new file mode 100644 index 0000000..faf72b3 --- /dev/null +++ b/docs/models/operations/applicationmarkrunningrequest.md @@ -0,0 +1,17 @@ +# ApplicationMarkRunningRequest + +## Example Usage + +```typescript +import { ApplicationMarkRunningRequest } from "dokploy/models/operations"; + +let value: ApplicationMarkRunningRequest = { + applicationId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `applicationId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/applicationonerequest.md b/docs/models/operations/applicationonerequest.md new file mode 100644 index 0000000..f4c5122 --- /dev/null +++ b/docs/models/operations/applicationonerequest.md @@ -0,0 +1,17 @@ +# ApplicationOneRequest + +## Example Usage + +```typescript +import { ApplicationOneRequest } from "dokploy/models/operations"; + +let value: ApplicationOneRequest = { + applicationId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `applicationId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/applicationreadappmonitoringrequest.md b/docs/models/operations/applicationreadappmonitoringrequest.md new file mode 100644 index 0000000..6c4f907 --- /dev/null +++ b/docs/models/operations/applicationreadappmonitoringrequest.md @@ -0,0 +1,17 @@ +# ApplicationReadAppMonitoringRequest + +## Example Usage + +```typescript +import { ApplicationReadAppMonitoringRequest } from "dokploy/models/operations"; + +let value: ApplicationReadAppMonitoringRequest = { + appName: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `appName` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/applicationreadtraefikconfigrequest.md b/docs/models/operations/applicationreadtraefikconfigrequest.md new file mode 100644 index 0000000..86dbf3b --- /dev/null +++ b/docs/models/operations/applicationreadtraefikconfigrequest.md @@ -0,0 +1,17 @@ +# ApplicationReadTraefikConfigRequest + +## Example Usage + +```typescript +import { ApplicationReadTraefikConfigRequest } from "dokploy/models/operations"; + +let value: ApplicationReadTraefikConfigRequest = { + applicationId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `applicationId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/applicationredeployrequest.md b/docs/models/operations/applicationredeployrequest.md new file mode 100644 index 0000000..ba87cf7 --- /dev/null +++ b/docs/models/operations/applicationredeployrequest.md @@ -0,0 +1,17 @@ +# ApplicationRedeployRequest + +## Example Usage + +```typescript +import { ApplicationRedeployRequest } from "dokploy/models/operations"; + +let value: ApplicationRedeployRequest = { + applicationId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `applicationId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/applicationrefreshtokenrequest.md b/docs/models/operations/applicationrefreshtokenrequest.md new file mode 100644 index 0000000..f9e7639 --- /dev/null +++ b/docs/models/operations/applicationrefreshtokenrequest.md @@ -0,0 +1,17 @@ +# ApplicationRefreshTokenRequest + +## Example Usage + +```typescript +import { ApplicationRefreshTokenRequest } from "dokploy/models/operations"; + +let value: ApplicationRefreshTokenRequest = { + applicationId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `applicationId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/applicationreloadrequest.md b/docs/models/operations/applicationreloadrequest.md new file mode 100644 index 0000000..b9322db --- /dev/null +++ b/docs/models/operations/applicationreloadrequest.md @@ -0,0 +1,19 @@ +# ApplicationReloadRequest + +## Example Usage + +```typescript +import { ApplicationReloadRequest } from "dokploy/models/operations"; + +let value: ApplicationReloadRequest = { + appName: "", + applicationId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `appName` | *string* | :heavy_check_mark: | N/A | +| `applicationId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/applicationsavebitbucketproviderrequest.md b/docs/models/operations/applicationsavebitbucketproviderrequest.md new file mode 100644 index 0000000..d8b3b25 --- /dev/null +++ b/docs/models/operations/applicationsavebitbucketproviderrequest.md @@ -0,0 +1,27 @@ +# ApplicationSaveBitbucketProviderRequest + +## Example Usage + +```typescript +import { ApplicationSaveBitbucketProviderRequest } from "dokploy/models/operations"; + +let value: ApplicationSaveBitbucketProviderRequest = { + bitbucketBranch: "", + bitbucketBuildPath: null, + bitbucketOwner: "", + bitbucketRepository: "", + bitbucketId: "", + applicationId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `bitbucketBranch` | *string* | :heavy_check_mark: | N/A | +| `bitbucketBuildPath` | *string* | :heavy_check_mark: | N/A | +| `bitbucketOwner` | *string* | :heavy_check_mark: | N/A | +| `bitbucketRepository` | *string* | :heavy_check_mark: | N/A | +| `bitbucketId` | *string* | :heavy_check_mark: | N/A | +| `applicationId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/applicationsavebuildtypebuildtype.md b/docs/models/operations/applicationsavebuildtypebuildtype.md new file mode 100644 index 0000000..6ee6e75 --- /dev/null +++ b/docs/models/operations/applicationsavebuildtypebuildtype.md @@ -0,0 +1,15 @@ +# ApplicationSaveBuildTypeBuildType + +## Example Usage + +```typescript +import { ApplicationSaveBuildTypeBuildType } from "dokploy/models/operations"; + +let value: ApplicationSaveBuildTypeBuildType = "static"; +``` + +## Values + +```typescript +"dockerfile" | "heroku_buildpacks" | "paketo_buildpacks" | "nixpacks" | "static" +``` \ No newline at end of file diff --git a/docs/models/operations/applicationsavebuildtyperequest.md b/docs/models/operations/applicationsavebuildtyperequest.md new file mode 100644 index 0000000..10f7235 --- /dev/null +++ b/docs/models/operations/applicationsavebuildtyperequest.md @@ -0,0 +1,25 @@ +# ApplicationSaveBuildTypeRequest + +## Example Usage + +```typescript +import { ApplicationSaveBuildTypeRequest } from "dokploy/models/operations"; + +let value: ApplicationSaveBuildTypeRequest = { + applicationId: "", + buildType: "nixpacks", + dockerContextPath: "", + dockerBuildStage: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `applicationId` | *string* | :heavy_check_mark: | N/A | +| `buildType` | [operations.ApplicationSaveBuildTypeBuildType](../../models/operations/applicationsavebuildtypebuildtype.md) | :heavy_check_mark: | N/A | +| `dockerfile` | *string* | :heavy_minus_sign: | N/A | +| `dockerContextPath` | *string* | :heavy_check_mark: | N/A | +| `dockerBuildStage` | *string* | :heavy_check_mark: | N/A | +| `publishDirectory` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/applicationsavedockerproviderrequest.md b/docs/models/operations/applicationsavedockerproviderrequest.md new file mode 100644 index 0000000..2475ff4 --- /dev/null +++ b/docs/models/operations/applicationsavedockerproviderrequest.md @@ -0,0 +1,20 @@ +# ApplicationSaveDockerProviderRequest + +## Example Usage + +```typescript +import { ApplicationSaveDockerProviderRequest } from "dokploy/models/operations"; + +let value: ApplicationSaveDockerProviderRequest = { + applicationId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `dockerImage` | *string* | :heavy_minus_sign: | N/A | +| `applicationId` | *string* | :heavy_check_mark: | N/A | +| `username` | *string* | :heavy_minus_sign: | N/A | +| `password` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/applicationsaveenvironmentrequest.md b/docs/models/operations/applicationsaveenvironmentrequest.md new file mode 100644 index 0000000..003e78c --- /dev/null +++ b/docs/models/operations/applicationsaveenvironmentrequest.md @@ -0,0 +1,19 @@ +# ApplicationSaveEnvironmentRequest + +## Example Usage + +```typescript +import { ApplicationSaveEnvironmentRequest } from "dokploy/models/operations"; + +let value: ApplicationSaveEnvironmentRequest = { + applicationId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `applicationId` | *string* | :heavy_check_mark: | N/A | +| `env` | *string* | :heavy_minus_sign: | N/A | +| `buildArgs` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/applicationsavegithubproviderrequest.md b/docs/models/operations/applicationsavegithubproviderrequest.md new file mode 100644 index 0000000..23b89bf --- /dev/null +++ b/docs/models/operations/applicationsavegithubproviderrequest.md @@ -0,0 +1,24 @@ +# ApplicationSaveGithubProviderRequest + +## Example Usage + +```typescript +import { ApplicationSaveGithubProviderRequest } from "dokploy/models/operations"; + +let value: ApplicationSaveGithubProviderRequest = { + applicationId: "", + owner: "", + githubId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `applicationId` | *string* | :heavy_check_mark: | N/A | +| `repository` | *string* | :heavy_minus_sign: | N/A | +| `branch` | *string* | :heavy_minus_sign: | N/A | +| `owner` | *string* | :heavy_check_mark: | N/A | +| `buildPath` | *string* | :heavy_minus_sign: | N/A | +| `githubId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/applicationsavegitlabproviderrequest.md b/docs/models/operations/applicationsavegitlabproviderrequest.md new file mode 100644 index 0000000..7e13c5d --- /dev/null +++ b/docs/models/operations/applicationsavegitlabproviderrequest.md @@ -0,0 +1,31 @@ +# ApplicationSaveGitlabProviderRequest + +## Example Usage + +```typescript +import { ApplicationSaveGitlabProviderRequest } from "dokploy/models/operations"; + +let value: ApplicationSaveGitlabProviderRequest = { + applicationId: "", + gitlabBranch: "", + gitlabBuildPath: "", + gitlabOwner: "", + gitlabRepository: "", + gitlabId: "", + gitlabProjectId: 9227.42, + gitlabPathNamespace: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `applicationId` | *string* | :heavy_check_mark: | N/A | +| `gitlabBranch` | *string* | :heavy_check_mark: | N/A | +| `gitlabBuildPath` | *string* | :heavy_check_mark: | N/A | +| `gitlabOwner` | *string* | :heavy_check_mark: | N/A | +| `gitlabRepository` | *string* | :heavy_check_mark: | N/A | +| `gitlabId` | *string* | :heavy_check_mark: | N/A | +| `gitlabProjectId` | *number* | :heavy_check_mark: | N/A | +| `gitlabPathNamespace` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/applicationsavegitprodiverrequest.md b/docs/models/operations/applicationsavegitprodiverrequest.md new file mode 100644 index 0000000..0ac21f1 --- /dev/null +++ b/docs/models/operations/applicationsavegitprodiverrequest.md @@ -0,0 +1,21 @@ +# ApplicationSaveGitProdiverRequest + +## Example Usage + +```typescript +import { ApplicationSaveGitProdiverRequest } from "dokploy/models/operations"; + +let value: ApplicationSaveGitProdiverRequest = { + applicationId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `customGitBranch` | *string* | :heavy_minus_sign: | N/A | +| `applicationId` | *string* | :heavy_check_mark: | N/A | +| `customGitBuildPath` | *string* | :heavy_minus_sign: | N/A | +| `customGitUrl` | *string* | :heavy_minus_sign: | N/A | +| `customGitSSHKeyId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/applicationstartrequest.md b/docs/models/operations/applicationstartrequest.md new file mode 100644 index 0000000..10ad5a2 --- /dev/null +++ b/docs/models/operations/applicationstartrequest.md @@ -0,0 +1,17 @@ +# ApplicationStartRequest + +## Example Usage + +```typescript +import { ApplicationStartRequest } from "dokploy/models/operations"; + +let value: ApplicationStartRequest = { + applicationId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `applicationId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/applicationstoprequest.md b/docs/models/operations/applicationstoprequest.md new file mode 100644 index 0000000..e01d635 --- /dev/null +++ b/docs/models/operations/applicationstoprequest.md @@ -0,0 +1,17 @@ +# ApplicationStopRequest + +## Example Usage + +```typescript +import { ApplicationStopRequest } from "dokploy/models/operations"; + +let value: ApplicationStopRequest = { + applicationId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `applicationId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/applicationupdateapplicationstatus.md b/docs/models/operations/applicationupdateapplicationstatus.md new file mode 100644 index 0000000..67c8adc --- /dev/null +++ b/docs/models/operations/applicationupdateapplicationstatus.md @@ -0,0 +1,15 @@ +# ApplicationUpdateApplicationStatus + +## Example Usage + +```typescript +import { ApplicationUpdateApplicationStatus } from "dokploy/models/operations"; + +let value: ApplicationUpdateApplicationStatus = "error"; +``` + +## Values + +```typescript +"idle" | "running" | "done" | "error" +``` \ No newline at end of file diff --git a/docs/models/operations/applicationupdatebuildtype.md b/docs/models/operations/applicationupdatebuildtype.md new file mode 100644 index 0000000..87abd2d --- /dev/null +++ b/docs/models/operations/applicationupdatebuildtype.md @@ -0,0 +1,15 @@ +# ApplicationUpdateBuildType + +## Example Usage + +```typescript +import { ApplicationUpdateBuildType } from "dokploy/models/operations"; + +let value: ApplicationUpdateBuildType = "heroku_buildpacks"; +``` + +## Values + +```typescript +"dockerfile" | "heroku_buildpacks" | "paketo_buildpacks" | "nixpacks" | "static" +``` \ No newline at end of file diff --git a/docs/models/operations/applicationupdaterequest.md b/docs/models/operations/applicationupdaterequest.md new file mode 100644 index 0000000..2b3e809 --- /dev/null +++ b/docs/models/operations/applicationupdaterequest.md @@ -0,0 +1,76 @@ +# ApplicationUpdateRequest + +## Example Usage + +```typescript +import { ApplicationUpdateRequest } from "dokploy/models/operations"; + +let value: ApplicationUpdateRequest = { + applicationId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `applicationId` | *string* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `appName` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `env` | *string* | :heavy_minus_sign: | N/A | +| `buildArgs` | *string* | :heavy_minus_sign: | N/A | +| `memoryReservation` | *number* | :heavy_minus_sign: | N/A | +| `memoryLimit` | *number* | :heavy_minus_sign: | N/A | +| `cpuReservation` | *number* | :heavy_minus_sign: | N/A | +| `cpuLimit` | *number* | :heavy_minus_sign: | N/A | +| `title` | *string* | :heavy_minus_sign: | N/A | +| `enabled` | *boolean* | :heavy_minus_sign: | N/A | +| `subtitle` | *string* | :heavy_minus_sign: | N/A | +| `command` | *string* | :heavy_minus_sign: | N/A | +| `refreshToken` | *string* | :heavy_minus_sign: | N/A | +| `sourceType` | [operations.ApplicationUpdateSourceType](../../models/operations/applicationupdatesourcetype.md) | :heavy_minus_sign: | N/A | +| `repository` | *string* | :heavy_minus_sign: | N/A | +| `owner` | *string* | :heavy_minus_sign: | N/A | +| `branch` | *string* | :heavy_minus_sign: | N/A | +| `buildPath` | *string* | :heavy_minus_sign: | N/A | +| `autoDeploy` | *boolean* | :heavy_minus_sign: | N/A | +| `gitlabProjectId` | *number* | :heavy_minus_sign: | N/A | +| `gitlabRepository` | *string* | :heavy_minus_sign: | N/A | +| `gitlabOwner` | *string* | :heavy_minus_sign: | N/A | +| `gitlabBranch` | *string* | :heavy_minus_sign: | N/A | +| `gitlabBuildPath` | *string* | :heavy_minus_sign: | N/A | +| `gitlabPathNamespace` | *string* | :heavy_minus_sign: | N/A | +| `bitbucketRepository` | *string* | :heavy_minus_sign: | N/A | +| `bitbucketOwner` | *string* | :heavy_minus_sign: | N/A | +| `bitbucketBranch` | *string* | :heavy_minus_sign: | N/A | +| `bitbucketBuildPath` | *string* | :heavy_minus_sign: | N/A | +| `username` | *string* | :heavy_minus_sign: | N/A | +| `password` | *string* | :heavy_minus_sign: | N/A | +| `dockerImage` | *string* | :heavy_minus_sign: | N/A | +| `customGitUrl` | *string* | :heavy_minus_sign: | N/A | +| `customGitBranch` | *string* | :heavy_minus_sign: | N/A | +| `customGitBuildPath` | *string* | :heavy_minus_sign: | N/A | +| `customGitSSHKeyId` | *string* | :heavy_minus_sign: | N/A | +| `dockerfile` | *string* | :heavy_minus_sign: | N/A | +| `dockerContextPath` | *string* | :heavy_minus_sign: | N/A | +| `dockerBuildStage` | *string* | :heavy_minus_sign: | N/A | +| `dropBuildPath` | *string* | :heavy_minus_sign: | N/A | +| `healthCheckSwarm` | [operations.HealthCheckSwarm](../../models/operations/healthcheckswarm.md) | :heavy_minus_sign: | N/A | +| `restartPolicySwarm` | [operations.RestartPolicySwarm](../../models/operations/restartpolicyswarm.md) | :heavy_minus_sign: | N/A | +| `placementSwarm` | [operations.PlacementSwarm](../../models/operations/placementswarm.md) | :heavy_minus_sign: | N/A | +| `updateConfigSwarm` | [operations.UpdateConfigSwarm](../../models/operations/updateconfigswarm.md) | :heavy_minus_sign: | N/A | +| `rollbackConfigSwarm` | [operations.RollbackConfigSwarm](../../models/operations/rollbackconfigswarm.md) | :heavy_minus_sign: | N/A | +| `modeSwarm` | [operations.ModeSwarm](../../models/operations/modeswarm.md) | :heavy_minus_sign: | N/A | +| `labelsSwarm` | Record | :heavy_minus_sign: | N/A | +| `networkSwarm` | [operations.NetworkSwarm](../../models/operations/networkswarm.md)[] | :heavy_minus_sign: | N/A | +| `replicas` | *number* | :heavy_minus_sign: | N/A | +| `applicationStatus` | [operations.ApplicationUpdateApplicationStatus](../../models/operations/applicationupdateapplicationstatus.md) | :heavy_minus_sign: | N/A | +| `buildType` | [operations.ApplicationUpdateBuildType](../../models/operations/applicationupdatebuildtype.md) | :heavy_minus_sign: | N/A | +| `publishDirectory` | *string* | :heavy_minus_sign: | N/A | +| `createdAt` | *string* | :heavy_minus_sign: | N/A | +| `registryId` | *string* | :heavy_minus_sign: | N/A | +| `projectId` | *string* | :heavy_minus_sign: | N/A | +| `githubId` | *string* | :heavy_minus_sign: | N/A | +| `gitlabId` | *string* | :heavy_minus_sign: | N/A | +| `bitbucketId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/applicationupdatesourcetype.md b/docs/models/operations/applicationupdatesourcetype.md new file mode 100644 index 0000000..53afc03 --- /dev/null +++ b/docs/models/operations/applicationupdatesourcetype.md @@ -0,0 +1,15 @@ +# ApplicationUpdateSourceType + +## Example Usage + +```typescript +import { ApplicationUpdateSourceType } from "dokploy/models/operations"; + +let value: ApplicationUpdateSourceType = "git"; +``` + +## Values + +```typescript +"github" | "docker" | "git" +``` \ No newline at end of file diff --git a/docs/models/operations/applicationupdatetraefikconfigrequest.md b/docs/models/operations/applicationupdatetraefikconfigrequest.md new file mode 100644 index 0000000..133c4ec --- /dev/null +++ b/docs/models/operations/applicationupdatetraefikconfigrequest.md @@ -0,0 +1,19 @@ +# ApplicationUpdateTraefikConfigRequest + +## Example Usage + +```typescript +import { ApplicationUpdateTraefikConfigRequest } from "dokploy/models/operations"; + +let value: ApplicationUpdateTraefikConfigRequest = { + applicationId: "", + traefikConfig: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `applicationId` | *string* | :heavy_check_mark: | N/A | +| `traefikConfig` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/apptype.md b/docs/models/operations/apptype.md new file mode 100644 index 0000000..5f16014 --- /dev/null +++ b/docs/models/operations/apptype.md @@ -0,0 +1,17 @@ +# AppType + + +## Supported Types + +### `operations.AppTypeStack` + +```typescript +const value: operations.AppTypeStack = "stack"; +``` + +### `operations.AppTypeDockerCompose` + +```typescript +const value: operations.AppTypeDockerCompose = "docker-compose"; +``` + diff --git a/docs/models/operations/apptypedockercompose.md b/docs/models/operations/apptypedockercompose.md new file mode 100644 index 0000000..10ddadd --- /dev/null +++ b/docs/models/operations/apptypedockercompose.md @@ -0,0 +1,15 @@ +# AppTypeDockerCompose + +## Example Usage + +```typescript +import { AppTypeDockerCompose } from "dokploy/models/operations"; + +let value: AppTypeDockerCompose = "docker-compose"; +``` + +## Values + +```typescript +"docker-compose" +``` \ No newline at end of file diff --git a/docs/models/operations/apptypestack.md b/docs/models/operations/apptypestack.md new file mode 100644 index 0000000..1b16c69 --- /dev/null +++ b/docs/models/operations/apptypestack.md @@ -0,0 +1,15 @@ +# AppTypeStack + +## Example Usage + +```typescript +import { AppTypeStack } from "dokploy/models/operations"; + +let value: AppTypeStack = "stack"; +``` + +## Values + +```typescript +"stack" +``` \ No newline at end of file diff --git a/docs/models/operations/authconfirmemailrequest.md b/docs/models/operations/authconfirmemailrequest.md new file mode 100644 index 0000000..11ec783 --- /dev/null +++ b/docs/models/operations/authconfirmemailrequest.md @@ -0,0 +1,17 @@ +# AuthConfirmEmailRequest + +## Example Usage + +```typescript +import { AuthConfirmEmailRequest } from "dokploy/models/operations"; + +let value: AuthConfirmEmailRequest = { + confirmationToken: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------- | ------------------- | ------------------- | ------------------- | +| `confirmationToken` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/authcreateadminrequest.md b/docs/models/operations/authcreateadminrequest.md new file mode 100644 index 0000000..f86f285 --- /dev/null +++ b/docs/models/operations/authcreateadminrequest.md @@ -0,0 +1,19 @@ +# AuthCreateAdminRequest + +## Example Usage + +```typescript +import { AuthCreateAdminRequest } from "dokploy/models/operations"; + +let value: AuthCreateAdminRequest = { + email: "Cruz49@hotmail.com", + password: "LeMKZZnr6bCDRt7", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `email` | *string* | :heavy_check_mark: | N/A | +| `password` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/authcreateuserrequest.md b/docs/models/operations/authcreateuserrequest.md new file mode 100644 index 0000000..6ccc7af --- /dev/null +++ b/docs/models/operations/authcreateuserrequest.md @@ -0,0 +1,21 @@ +# AuthCreateUserRequest + +## Example Usage + +```typescript +import { AuthCreateUserRequest } from "dokploy/models/operations"; + +let value: AuthCreateUserRequest = { + password: "gE2NX4q7ofEYUc1", + id: "", + token: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `password` | *string* | :heavy_check_mark: | N/A | +| `id` | *string* | :heavy_check_mark: | N/A | +| `token` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/authloginrequest.md b/docs/models/operations/authloginrequest.md new file mode 100644 index 0000000..cd3c4f1 --- /dev/null +++ b/docs/models/operations/authloginrequest.md @@ -0,0 +1,19 @@ +# AuthLoginRequest + +## Example Usage + +```typescript +import { AuthLoginRequest } from "dokploy/models/operations"; + +let value: AuthLoginRequest = { + email: "Morton_Hodkiewicz@gmail.com", + password: "sXMNet8beVnapnS", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `email` | *string* | :heavy_check_mark: | N/A | +| `password` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/authonerequest.md b/docs/models/operations/authonerequest.md new file mode 100644 index 0000000..1cd9d57 --- /dev/null +++ b/docs/models/operations/authonerequest.md @@ -0,0 +1,17 @@ +# AuthOneRequest + +## Example Usage + +```typescript +import { AuthOneRequest } from "dokploy/models/operations"; + +let value: AuthOneRequest = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/authresetpasswordrequest.md b/docs/models/operations/authresetpasswordrequest.md new file mode 100644 index 0000000..6dcc987 --- /dev/null +++ b/docs/models/operations/authresetpasswordrequest.md @@ -0,0 +1,19 @@ +# AuthResetPasswordRequest + +## Example Usage + +```typescript +import { AuthResetPasswordRequest } from "dokploy/models/operations"; + +let value: AuthResetPasswordRequest = { + resetPasswordToken: "", + password: "CIXB8RGJr2fxQBu", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `resetPasswordToken` | *string* | :heavy_check_mark: | N/A | +| `password` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/authsendresetpasswordemailrequest.md b/docs/models/operations/authsendresetpasswordemailrequest.md new file mode 100644 index 0000000..45eb962 --- /dev/null +++ b/docs/models/operations/authsendresetpasswordemailrequest.md @@ -0,0 +1,17 @@ +# AuthSendResetPasswordEmailRequest + +## Example Usage + +```typescript +import { AuthSendResetPasswordEmailRequest } from "dokploy/models/operations"; + +let value: AuthSendResetPasswordEmailRequest = { + email: "Alexandra_McCullough@hotmail.com", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `email` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/authupdaterequest.md b/docs/models/operations/authupdaterequest.md new file mode 100644 index 0000000..0c9c94e --- /dev/null +++ b/docs/models/operations/authupdaterequest.md @@ -0,0 +1,30 @@ +# AuthUpdateRequest + +## Example Usage + +```typescript +import { AuthUpdateRequest } from "dokploy/models/operations"; + +let value: AuthUpdateRequest = { + email: "Sam56@yahoo.com", + password: "J5mRzNG9iBEmeW3", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `email` | *string* | :heavy_check_mark: | N/A | +| `password` | *string* | :heavy_check_mark: | N/A | +| `rol` | [operations.Rol](../../models/operations/rol.md) | :heavy_minus_sign: | N/A | +| `image` | *string* | :heavy_minus_sign: | N/A | +| `secret` | *string* | :heavy_minus_sign: | N/A | +| `token` | *string* | :heavy_minus_sign: | N/A | +| `is2FAEnabled` | *boolean* | :heavy_minus_sign: | N/A | +| `createdAt` | *string* | :heavy_minus_sign: | N/A | +| `resetPasswordToken` | *string* | :heavy_minus_sign: | N/A | +| `resetPasswordExpiresAt` | *string* | :heavy_minus_sign: | N/A | +| `confirmationToken` | *string* | :heavy_minus_sign: | N/A | +| `confirmationExpiresAt` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/authverify2fasetuprequest.md b/docs/models/operations/authverify2fasetuprequest.md new file mode 100644 index 0000000..b7d8d9a --- /dev/null +++ b/docs/models/operations/authverify2fasetuprequest.md @@ -0,0 +1,19 @@ +# AuthVerify2FASetupRequest + +## Example Usage + +```typescript +import { AuthVerify2FASetupRequest } from "dokploy/models/operations"; + +let value: AuthVerify2FASetupRequest = { + pin: "7573", + secret: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `pin` | *string* | :heavy_check_mark: | N/A | +| `secret` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/authverifylogin2farequest.md b/docs/models/operations/authverifylogin2farequest.md new file mode 100644 index 0000000..3188731 --- /dev/null +++ b/docs/models/operations/authverifylogin2farequest.md @@ -0,0 +1,19 @@ +# AuthVerifyLogin2FARequest + +## Example Usage + +```typescript +import { AuthVerifyLogin2FARequest } from "dokploy/models/operations"; + +let value: AuthVerifyLogin2FARequest = { + pin: "3713", + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `pin` | *string* | :heavy_check_mark: | N/A | +| `id` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/backupcreaterequest.md b/docs/models/operations/backupcreaterequest.md new file mode 100644 index 0000000..e9c3523 --- /dev/null +++ b/docs/models/operations/backupcreaterequest.md @@ -0,0 +1,30 @@ +# BackupCreateRequest + +## Example Usage + +```typescript +import { BackupCreateRequest } from "dokploy/models/operations"; + +let value: BackupCreateRequest = { + schedule: "", + prefix: "", + destinationId: "", + database: "", + databaseType: "mysql", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `schedule` | *string* | :heavy_check_mark: | N/A | +| `enabled` | *boolean* | :heavy_minus_sign: | N/A | +| `prefix` | *string* | :heavy_check_mark: | N/A | +| `destinationId` | *string* | :heavy_check_mark: | N/A | +| `database` | *string* | :heavy_check_mark: | N/A | +| `mariadbId` | *string* | :heavy_minus_sign: | N/A | +| `mysqlId` | *string* | :heavy_minus_sign: | N/A | +| `postgresId` | *string* | :heavy_minus_sign: | N/A | +| `mongoId` | *string* | :heavy_minus_sign: | N/A | +| `databaseType` | [operations.DatabaseType](../../models/operations/databasetype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/backupmanualbackupmariadbrequest.md b/docs/models/operations/backupmanualbackupmariadbrequest.md new file mode 100644 index 0000000..6fc47ab --- /dev/null +++ b/docs/models/operations/backupmanualbackupmariadbrequest.md @@ -0,0 +1,17 @@ +# BackupManualBackupMariadbRequest + +## Example Usage + +```typescript +import { BackupManualBackupMariadbRequest } from "dokploy/models/operations"; + +let value: BackupManualBackupMariadbRequest = { + backupId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `backupId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/backupmanualbackupmongorequest.md b/docs/models/operations/backupmanualbackupmongorequest.md new file mode 100644 index 0000000..6b6679b --- /dev/null +++ b/docs/models/operations/backupmanualbackupmongorequest.md @@ -0,0 +1,17 @@ +# BackupManualBackupMongoRequest + +## Example Usage + +```typescript +import { BackupManualBackupMongoRequest } from "dokploy/models/operations"; + +let value: BackupManualBackupMongoRequest = { + backupId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `backupId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/backupmanualbackupmysqlrequest.md b/docs/models/operations/backupmanualbackupmysqlrequest.md new file mode 100644 index 0000000..a08c441 --- /dev/null +++ b/docs/models/operations/backupmanualbackupmysqlrequest.md @@ -0,0 +1,17 @@ +# BackupManualBackupMySqlRequest + +## Example Usage + +```typescript +import { BackupManualBackupMySqlRequest } from "dokploy/models/operations"; + +let value: BackupManualBackupMySqlRequest = { + backupId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `backupId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/backupmanualbackuppostgresrequest.md b/docs/models/operations/backupmanualbackuppostgresrequest.md new file mode 100644 index 0000000..e22bf6e --- /dev/null +++ b/docs/models/operations/backupmanualbackuppostgresrequest.md @@ -0,0 +1,17 @@ +# BackupManualBackupPostgresRequest + +## Example Usage + +```typescript +import { BackupManualBackupPostgresRequest } from "dokploy/models/operations"; + +let value: BackupManualBackupPostgresRequest = { + backupId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `backupId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/backuponerequest.md b/docs/models/operations/backuponerequest.md new file mode 100644 index 0000000..a30ff34 --- /dev/null +++ b/docs/models/operations/backuponerequest.md @@ -0,0 +1,17 @@ +# BackupOneRequest + +## Example Usage + +```typescript +import { BackupOneRequest } from "dokploy/models/operations"; + +let value: BackupOneRequest = { + backupId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `backupId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/backupremoverequest.md b/docs/models/operations/backupremoverequest.md new file mode 100644 index 0000000..41a8287 --- /dev/null +++ b/docs/models/operations/backupremoverequest.md @@ -0,0 +1,17 @@ +# BackupRemoveRequest + +## Example Usage + +```typescript +import { BackupRemoveRequest } from "dokploy/models/operations"; + +let value: BackupRemoveRequest = { + backupId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `backupId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/backupupdaterequest.md b/docs/models/operations/backupupdaterequest.md new file mode 100644 index 0000000..645821e --- /dev/null +++ b/docs/models/operations/backupupdaterequest.md @@ -0,0 +1,26 @@ +# BackupUpdateRequest + +## Example Usage + +```typescript +import { BackupUpdateRequest } from "dokploy/models/operations"; + +let value: BackupUpdateRequest = { + schedule: "", + prefix: "", + backupId: "", + destinationId: "", + database: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `schedule` | *string* | :heavy_check_mark: | N/A | +| `enabled` | *boolean* | :heavy_minus_sign: | N/A | +| `prefix` | *string* | :heavy_check_mark: | N/A | +| `backupId` | *string* | :heavy_check_mark: | N/A | +| `destinationId` | *string* | :heavy_check_mark: | N/A | +| `database` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/bitbucketcreaterequest.md b/docs/models/operations/bitbucketcreaterequest.md new file mode 100644 index 0000000..540e5fe --- /dev/null +++ b/docs/models/operations/bitbucketcreaterequest.md @@ -0,0 +1,24 @@ +# BitbucketCreateRequest + +## Example Usage + +```typescript +import { BitbucketCreateRequest } from "dokploy/models/operations"; + +let value: BitbucketCreateRequest = { + authId: "", + name: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `bitbucketId` | *string* | :heavy_minus_sign: | N/A | +| `bitbucketUsername` | *string* | :heavy_minus_sign: | N/A | +| `appPassword` | *string* | :heavy_minus_sign: | N/A | +| `bitbucketWorkspaceName` | *string* | :heavy_minus_sign: | N/A | +| `gitProviderId` | *string* | :heavy_minus_sign: | N/A | +| `authId` | *string* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/bitbucketgetbitbucketbranchesrequest.md b/docs/models/operations/bitbucketgetbitbucketbranchesrequest.md new file mode 100644 index 0000000..c2a3d9d --- /dev/null +++ b/docs/models/operations/bitbucketgetbitbucketbranchesrequest.md @@ -0,0 +1,20 @@ +# BitbucketGetBitbucketBranchesRequest + +## Example Usage + +```typescript +import { BitbucketGetBitbucketBranchesRequest } from "dokploy/models/operations"; + +let value: BitbucketGetBitbucketBranchesRequest = { + owner: "", + repo: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `owner` | *string* | :heavy_check_mark: | N/A | +| `repo` | *string* | :heavy_check_mark: | N/A | +| `bitbucketId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/bitbucketgetbitbucketrepositoriesrequest.md b/docs/models/operations/bitbucketgetbitbucketrepositoriesrequest.md new file mode 100644 index 0000000..836be8c --- /dev/null +++ b/docs/models/operations/bitbucketgetbitbucketrepositoriesrequest.md @@ -0,0 +1,17 @@ +# BitbucketGetBitbucketRepositoriesRequest + +## Example Usage + +```typescript +import { BitbucketGetBitbucketRepositoriesRequest } from "dokploy/models/operations"; + +let value: BitbucketGetBitbucketRepositoriesRequest = { + bitbucketId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `bitbucketId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/bitbucketonerequest.md b/docs/models/operations/bitbucketonerequest.md new file mode 100644 index 0000000..ec2fb2c --- /dev/null +++ b/docs/models/operations/bitbucketonerequest.md @@ -0,0 +1,17 @@ +# BitbucketOneRequest + +## Example Usage + +```typescript +import { BitbucketOneRequest } from "dokploy/models/operations"; + +let value: BitbucketOneRequest = { + bitbucketId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `bitbucketId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/bitbuckettestconnectionrequest.md b/docs/models/operations/bitbuckettestconnectionrequest.md new file mode 100644 index 0000000..e620558 --- /dev/null +++ b/docs/models/operations/bitbuckettestconnectionrequest.md @@ -0,0 +1,19 @@ +# BitbucketTestConnectionRequest + +## Example Usage + +```typescript +import { BitbucketTestConnectionRequest } from "dokploy/models/operations"; + +let value: BitbucketTestConnectionRequest = { + bitbucketId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------- | ------------------- | ------------------- | ------------------- | +| `bitbucketId` | *string* | :heavy_check_mark: | N/A | +| `bitbucketUsername` | *string* | :heavy_minus_sign: | N/A | +| `workspaceName` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/bitbucketupdaterequest.md b/docs/models/operations/bitbucketupdaterequest.md new file mode 100644 index 0000000..b1ac854 --- /dev/null +++ b/docs/models/operations/bitbucketupdaterequest.md @@ -0,0 +1,25 @@ +# BitbucketUpdateRequest + +## Example Usage + +```typescript +import { BitbucketUpdateRequest } from "dokploy/models/operations"; + +let value: BitbucketUpdateRequest = { + bitbucketId: "", + gitProviderId: "", + name: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `bitbucketId` | *string* | :heavy_check_mark: | N/A | +| `bitbucketUsername` | *string* | :heavy_minus_sign: | N/A | +| `appPassword` | *string* | :heavy_minus_sign: | N/A | +| `bitbucketWorkspaceName` | *string* | :heavy_minus_sign: | N/A | +| `gitProviderId` | *string* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_check_mark: | N/A | +| `adminId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/certificatescreaterequest.md b/docs/models/operations/certificatescreaterequest.md new file mode 100644 index 0000000..480d092 --- /dev/null +++ b/docs/models/operations/certificatescreaterequest.md @@ -0,0 +1,26 @@ +# CertificatesCreateRequest + +## Example Usage + +```typescript +import { CertificatesCreateRequest } from "dokploy/models/operations"; + +let value: CertificatesCreateRequest = { + name: "", + certificateData: "", + privateKey: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `certificateId` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_check_mark: | N/A | +| `certificateData` | *string* | :heavy_check_mark: | N/A | +| `privateKey` | *string* | :heavy_check_mark: | N/A | +| `certificatePath` | *string* | :heavy_minus_sign: | N/A | +| `autoRenew` | *boolean* | :heavy_minus_sign: | N/A | +| `adminId` | *string* | :heavy_minus_sign: | N/A | +| `serverId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/certificatesonerequest.md b/docs/models/operations/certificatesonerequest.md new file mode 100644 index 0000000..8a94aed --- /dev/null +++ b/docs/models/operations/certificatesonerequest.md @@ -0,0 +1,17 @@ +# CertificatesOneRequest + +## Example Usage + +```typescript +import { CertificatesOneRequest } from "dokploy/models/operations"; + +let value: CertificatesOneRequest = { + certificateId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `certificateId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/certificatesremoverequest.md b/docs/models/operations/certificatesremoverequest.md new file mode 100644 index 0000000..0ccd797 --- /dev/null +++ b/docs/models/operations/certificatesremoverequest.md @@ -0,0 +1,17 @@ +# CertificatesRemoveRequest + +## Example Usage + +```typescript +import { CertificatesRemoveRequest } from "dokploy/models/operations"; + +let value: CertificatesRemoveRequest = { + certificateId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `certificateId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/clusterremoveworkerrequest.md b/docs/models/operations/clusterremoveworkerrequest.md new file mode 100644 index 0000000..094254b --- /dev/null +++ b/docs/models/operations/clusterremoveworkerrequest.md @@ -0,0 +1,17 @@ +# ClusterRemoveWorkerRequest + +## Example Usage + +```typescript +import { ClusterRemoveWorkerRequest } from "dokploy/models/operations"; + +let value: ClusterRemoveWorkerRequest = { + nodeId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `nodeId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/composecleanqueuesrequest.md b/docs/models/operations/composecleanqueuesrequest.md new file mode 100644 index 0000000..8aaa0a2 --- /dev/null +++ b/docs/models/operations/composecleanqueuesrequest.md @@ -0,0 +1,17 @@ +# ComposeCleanQueuesRequest + +## Example Usage + +```typescript +import { ComposeCleanQueuesRequest } from "dokploy/models/operations"; + +let value: ComposeCleanQueuesRequest = { + composeId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `composeId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/composecreatecomposetype.md b/docs/models/operations/composecreatecomposetype.md new file mode 100644 index 0000000..85b4d37 --- /dev/null +++ b/docs/models/operations/composecreatecomposetype.md @@ -0,0 +1,15 @@ +# ComposeCreateComposeType + +## Example Usage + +```typescript +import { ComposeCreateComposeType } from "dokploy/models/operations"; + +let value: ComposeCreateComposeType = "docker-compose"; +``` + +## Values + +```typescript +"docker-compose" | "stack" +``` \ No newline at end of file diff --git a/docs/models/operations/composecreaterequest.md b/docs/models/operations/composecreaterequest.md new file mode 100644 index 0000000..96ed966 --- /dev/null +++ b/docs/models/operations/composecreaterequest.md @@ -0,0 +1,23 @@ +# ComposeCreateRequest + +## Example Usage + +```typescript +import { ComposeCreateRequest } from "dokploy/models/operations"; + +let value: ComposeCreateRequest = { + name: "", + projectId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `name` | *string* | :heavy_check_mark: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `projectId` | *string* | :heavy_check_mark: | N/A | +| `composeType` | [operations.ComposeCreateComposeType](../../models/operations/composecreatecomposetype.md) | :heavy_minus_sign: | N/A | +| `appName` | *string* | :heavy_minus_sign: | N/A | +| `serverId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/composedeleterequest.md b/docs/models/operations/composedeleterequest.md new file mode 100644 index 0000000..66b5754 --- /dev/null +++ b/docs/models/operations/composedeleterequest.md @@ -0,0 +1,17 @@ +# ComposeDeleteRequest + +## Example Usage + +```typescript +import { ComposeDeleteRequest } from "dokploy/models/operations"; + +let value: ComposeDeleteRequest = { + composeId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `composeId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/composedeployrequest.md b/docs/models/operations/composedeployrequest.md new file mode 100644 index 0000000..724eab3 --- /dev/null +++ b/docs/models/operations/composedeployrequest.md @@ -0,0 +1,17 @@ +# ComposeDeployRequest + +## Example Usage + +```typescript +import { ComposeDeployRequest } from "dokploy/models/operations"; + +let value: ComposeDeployRequest = { + composeId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `composeId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/composedeploytemplaterequest.md b/docs/models/operations/composedeploytemplaterequest.md new file mode 100644 index 0000000..dfba202 --- /dev/null +++ b/docs/models/operations/composedeploytemplaterequest.md @@ -0,0 +1,20 @@ +# ComposeDeployTemplateRequest + +## Example Usage + +```typescript +import { ComposeDeployTemplateRequest } from "dokploy/models/operations"; + +let value: ComposeDeployTemplateRequest = { + projectId: "", + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `projectId` | *string* | :heavy_check_mark: | N/A | +| `id` | *string* | :heavy_check_mark: | N/A | +| `serverId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/composefetchsourcetyperequest.md b/docs/models/operations/composefetchsourcetyperequest.md new file mode 100644 index 0000000..4f6861d --- /dev/null +++ b/docs/models/operations/composefetchsourcetyperequest.md @@ -0,0 +1,17 @@ +# ComposeFetchSourceTypeRequest + +## Example Usage + +```typescript +import { ComposeFetchSourceTypeRequest } from "dokploy/models/operations"; + +let value: ComposeFetchSourceTypeRequest = { + composeId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `composeId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/composegetconvertedcomposerequest.md b/docs/models/operations/composegetconvertedcomposerequest.md new file mode 100644 index 0000000..2260092 --- /dev/null +++ b/docs/models/operations/composegetconvertedcomposerequest.md @@ -0,0 +1,17 @@ +# ComposeGetConvertedComposeRequest + +## Example Usage + +```typescript +import { ComposeGetConvertedComposeRequest } from "dokploy/models/operations"; + +let value: ComposeGetConvertedComposeRequest = { + composeId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `composeId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/composegetdefaultcommandrequest.md b/docs/models/operations/composegetdefaultcommandrequest.md new file mode 100644 index 0000000..98f4395 --- /dev/null +++ b/docs/models/operations/composegetdefaultcommandrequest.md @@ -0,0 +1,17 @@ +# ComposeGetDefaultCommandRequest + +## Example Usage + +```typescript +import { ComposeGetDefaultCommandRequest } from "dokploy/models/operations"; + +let value: ComposeGetDefaultCommandRequest = { + composeId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `composeId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/composeonerequest.md b/docs/models/operations/composeonerequest.md new file mode 100644 index 0000000..bea8bc0 --- /dev/null +++ b/docs/models/operations/composeonerequest.md @@ -0,0 +1,17 @@ +# ComposeOneRequest + +## Example Usage + +```typescript +import { ComposeOneRequest } from "dokploy/models/operations"; + +let value: ComposeOneRequest = { + composeId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `composeId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/composerandomizecomposerequest.md b/docs/models/operations/composerandomizecomposerequest.md new file mode 100644 index 0000000..f824ea1 --- /dev/null +++ b/docs/models/operations/composerandomizecomposerequest.md @@ -0,0 +1,18 @@ +# ComposeRandomizeComposeRequest + +## Example Usage + +```typescript +import { ComposeRandomizeComposeRequest } from "dokploy/models/operations"; + +let value: ComposeRandomizeComposeRequest = { + composeId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `composeId` | *string* | :heavy_check_mark: | N/A | +| `suffix` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/composeredeployrequest.md b/docs/models/operations/composeredeployrequest.md new file mode 100644 index 0000000..b8083af --- /dev/null +++ b/docs/models/operations/composeredeployrequest.md @@ -0,0 +1,17 @@ +# ComposeRedeployRequest + +## Example Usage + +```typescript +import { ComposeRedeployRequest } from "dokploy/models/operations"; + +let value: ComposeRedeployRequest = { + composeId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `composeId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/composerefreshtokenrequest.md b/docs/models/operations/composerefreshtokenrequest.md new file mode 100644 index 0000000..185a2bc --- /dev/null +++ b/docs/models/operations/composerefreshtokenrequest.md @@ -0,0 +1,17 @@ +# ComposeRefreshTokenRequest + +## Example Usage + +```typescript +import { ComposeRefreshTokenRequest } from "dokploy/models/operations"; + +let value: ComposeRefreshTokenRequest = { + composeId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `composeId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/composestatus.md b/docs/models/operations/composestatus.md new file mode 100644 index 0000000..0285df4 --- /dev/null +++ b/docs/models/operations/composestatus.md @@ -0,0 +1,15 @@ +# ComposeStatus + +## Example Usage + +```typescript +import { ComposeStatus } from "dokploy/models/operations"; + +let value: ComposeStatus = "idle"; +``` + +## Values + +```typescript +"idle" | "running" | "done" | "error" +``` \ No newline at end of file diff --git a/docs/models/operations/composestoprequest.md b/docs/models/operations/composestoprequest.md new file mode 100644 index 0000000..4925c44 --- /dev/null +++ b/docs/models/operations/composestoprequest.md @@ -0,0 +1,17 @@ +# ComposeStopRequest + +## Example Usage + +```typescript +import { ComposeStopRequest } from "dokploy/models/operations"; + +let value: ComposeStopRequest = { + composeId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `composeId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/composeupdatecomposetype.md b/docs/models/operations/composeupdatecomposetype.md new file mode 100644 index 0000000..dd74ed9 --- /dev/null +++ b/docs/models/operations/composeupdatecomposetype.md @@ -0,0 +1,15 @@ +# ComposeUpdateComposeType + +## Example Usage + +```typescript +import { ComposeUpdateComposeType } from "dokploy/models/operations"; + +let value: ComposeUpdateComposeType = "stack"; +``` + +## Values + +```typescript +"docker-compose" | "stack" +``` \ No newline at end of file diff --git a/docs/models/operations/composeupdaterequest.md b/docs/models/operations/composeupdaterequest.md new file mode 100644 index 0000000..b5ec406 --- /dev/null +++ b/docs/models/operations/composeupdaterequest.md @@ -0,0 +1,50 @@ +# ComposeUpdateRequest + +## Example Usage + +```typescript +import { ComposeUpdateRequest } from "dokploy/models/operations"; + +let value: ComposeUpdateRequest = { + composeId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `composeId` | *string* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `appName` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `env` | *string* | :heavy_minus_sign: | N/A | +| `composeFile` | *string* | :heavy_minus_sign: | N/A | +| `refreshToken` | *string* | :heavy_minus_sign: | N/A | +| `sourceType` | [operations.ComposeUpdateSourceType](../../models/operations/composeupdatesourcetype.md) | :heavy_minus_sign: | N/A | +| `composeType` | [operations.ComposeUpdateComposeType](../../models/operations/composeupdatecomposetype.md) | :heavy_minus_sign: | N/A | +| `repository` | *string* | :heavy_minus_sign: | N/A | +| `owner` | *string* | :heavy_minus_sign: | N/A | +| `branch` | *string* | :heavy_minus_sign: | N/A | +| `autoDeploy` | *boolean* | :heavy_minus_sign: | N/A | +| `gitlabProjectId` | *number* | :heavy_minus_sign: | N/A | +| `gitlabRepository` | *string* | :heavy_minus_sign: | N/A | +| `gitlabOwner` | *string* | :heavy_minus_sign: | N/A | +| `gitlabBranch` | *string* | :heavy_minus_sign: | N/A | +| `gitlabPathNamespace` | *string* | :heavy_minus_sign: | N/A | +| `bitbucketRepository` | *string* | :heavy_minus_sign: | N/A | +| `bitbucketOwner` | *string* | :heavy_minus_sign: | N/A | +| `bitbucketBranch` | *string* | :heavy_minus_sign: | N/A | +| `customGitUrl` | *string* | :heavy_minus_sign: | N/A | +| `customGitBranch` | *string* | :heavy_minus_sign: | N/A | +| `customGitSSHKeyId` | *string* | :heavy_minus_sign: | N/A | +| `command` | *string* | :heavy_minus_sign: | N/A | +| `composePath` | *string* | :heavy_minus_sign: | N/A | +| `suffix` | *string* | :heavy_minus_sign: | N/A | +| `randomize` | *boolean* | :heavy_minus_sign: | N/A | +| `composeStatus` | [operations.ComposeStatus](../../models/operations/composestatus.md) | :heavy_minus_sign: | N/A | +| `projectId` | *string* | :heavy_minus_sign: | N/A | +| `createdAt` | *string* | :heavy_minus_sign: | N/A | +| `githubId` | *string* | :heavy_minus_sign: | N/A | +| `gitlabId` | *string* | :heavy_minus_sign: | N/A | +| `bitbucketId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/composeupdatesourcetype.md b/docs/models/operations/composeupdatesourcetype.md new file mode 100644 index 0000000..12c2d40 --- /dev/null +++ b/docs/models/operations/composeupdatesourcetype.md @@ -0,0 +1,15 @@ +# ComposeUpdateSourceType + +## Example Usage + +```typescript +import { ComposeUpdateSourceType } from "dokploy/models/operations"; + +let value: ComposeUpdateSourceType = "git"; +``` + +## Values + +```typescript +"git" | "github" | "gitlab" | "bitbucket" | "raw" +``` \ No newline at end of file diff --git a/docs/models/operations/databasetype.md b/docs/models/operations/databasetype.md new file mode 100644 index 0000000..ba9e5c2 --- /dev/null +++ b/docs/models/operations/databasetype.md @@ -0,0 +1,15 @@ +# DatabaseType + +## Example Usage + +```typescript +import { DatabaseType } from "dokploy/models/operations"; + +let value: DatabaseType = "postgres"; +``` + +## Values + +```typescript +"postgres" | "mariadb" | "mysql" | "mongo" +``` \ No newline at end of file diff --git a/docs/models/operations/deploymentallbycomposerequest.md b/docs/models/operations/deploymentallbycomposerequest.md new file mode 100644 index 0000000..77d50d6 --- /dev/null +++ b/docs/models/operations/deploymentallbycomposerequest.md @@ -0,0 +1,17 @@ +# DeploymentAllByComposeRequest + +## Example Usage + +```typescript +import { DeploymentAllByComposeRequest } from "dokploy/models/operations"; + +let value: DeploymentAllByComposeRequest = { + composeId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `composeId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deploymentallbyserverrequest.md b/docs/models/operations/deploymentallbyserverrequest.md new file mode 100644 index 0000000..961d2ff --- /dev/null +++ b/docs/models/operations/deploymentallbyserverrequest.md @@ -0,0 +1,17 @@ +# DeploymentAllByServerRequest + +## Example Usage + +```typescript +import { DeploymentAllByServerRequest } from "dokploy/models/operations"; + +let value: DeploymentAllByServerRequest = { + serverId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `serverId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deploymentallrequest.md b/docs/models/operations/deploymentallrequest.md new file mode 100644 index 0000000..3596f35 --- /dev/null +++ b/docs/models/operations/deploymentallrequest.md @@ -0,0 +1,17 @@ +# DeploymentAllRequest + +## Example Usage + +```typescript +import { DeploymentAllRequest } from "dokploy/models/operations"; + +let value: DeploymentAllRequest = { + applicationId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `applicationId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/destinationcreaterequest.md b/docs/models/operations/destinationcreaterequest.md new file mode 100644 index 0000000..e1866cb --- /dev/null +++ b/docs/models/operations/destinationcreaterequest.md @@ -0,0 +1,28 @@ +# DestinationCreateRequest + +## Example Usage + +```typescript +import { DestinationCreateRequest } from "dokploy/models/operations"; + +let value: DestinationCreateRequest = { + name: "", + accessKey: "", + bucket: "", + region: "", + endpoint: "", + secretAccessKey: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *string* | :heavy_check_mark: | N/A | +| `accessKey` | *string* | :heavy_check_mark: | N/A | +| `bucket` | *string* | :heavy_check_mark: | N/A | +| `region` | *string* | :heavy_check_mark: | N/A | +| `endpoint` | *string* | :heavy_check_mark: | N/A | +| `secretAccessKey` | *string* | :heavy_check_mark: | N/A | +| `serverId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/destinationonerequest.md b/docs/models/operations/destinationonerequest.md new file mode 100644 index 0000000..ebe4616 --- /dev/null +++ b/docs/models/operations/destinationonerequest.md @@ -0,0 +1,17 @@ +# DestinationOneRequest + +## Example Usage + +```typescript +import { DestinationOneRequest } from "dokploy/models/operations"; + +let value: DestinationOneRequest = { + destinationId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `destinationId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/destinationremoverequest.md b/docs/models/operations/destinationremoverequest.md new file mode 100644 index 0000000..d929001 --- /dev/null +++ b/docs/models/operations/destinationremoverequest.md @@ -0,0 +1,17 @@ +# DestinationRemoveRequest + +## Example Usage + +```typescript +import { DestinationRemoveRequest } from "dokploy/models/operations"; + +let value: DestinationRemoveRequest = { + destinationId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `destinationId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/destinationtestconnectionrequest.md b/docs/models/operations/destinationtestconnectionrequest.md new file mode 100644 index 0000000..89eb763 --- /dev/null +++ b/docs/models/operations/destinationtestconnectionrequest.md @@ -0,0 +1,28 @@ +# DestinationTestConnectionRequest + +## Example Usage + +```typescript +import { DestinationTestConnectionRequest } from "dokploy/models/operations"; + +let value: DestinationTestConnectionRequest = { + name: "", + accessKey: "", + bucket: "", + region: "", + endpoint: "", + secretAccessKey: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *string* | :heavy_check_mark: | N/A | +| `accessKey` | *string* | :heavy_check_mark: | N/A | +| `bucket` | *string* | :heavy_check_mark: | N/A | +| `region` | *string* | :heavy_check_mark: | N/A | +| `endpoint` | *string* | :heavy_check_mark: | N/A | +| `secretAccessKey` | *string* | :heavy_check_mark: | N/A | +| `serverId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/destinationupdaterequest.md b/docs/models/operations/destinationupdaterequest.md new file mode 100644 index 0000000..e1de91e --- /dev/null +++ b/docs/models/operations/destinationupdaterequest.md @@ -0,0 +1,30 @@ +# DestinationUpdateRequest + +## Example Usage + +```typescript +import { DestinationUpdateRequest } from "dokploy/models/operations"; + +let value: DestinationUpdateRequest = { + name: "", + accessKey: "", + bucket: "", + region: "", + endpoint: "", + secretAccessKey: "", + destinationId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *string* | :heavy_check_mark: | N/A | +| `accessKey` | *string* | :heavy_check_mark: | N/A | +| `bucket` | *string* | :heavy_check_mark: | N/A | +| `region` | *string* | :heavy_check_mark: | N/A | +| `endpoint` | *string* | :heavy_check_mark: | N/A | +| `secretAccessKey` | *string* | :heavy_check_mark: | N/A | +| `destinationId` | *string* | :heavy_check_mark: | N/A | +| `serverId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/dockergetconfigrequest.md b/docs/models/operations/dockergetconfigrequest.md new file mode 100644 index 0000000..a349300 --- /dev/null +++ b/docs/models/operations/dockergetconfigrequest.md @@ -0,0 +1,18 @@ +# DockerGetConfigRequest + +## Example Usage + +```typescript +import { DockerGetConfigRequest } from "dokploy/models/operations"; + +let value: DockerGetConfigRequest = { + containerId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `containerId` | *string* | :heavy_check_mark: | N/A | +| `serverId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/dockergetcontainersbyapplabelrequest.md b/docs/models/operations/dockergetcontainersbyapplabelrequest.md new file mode 100644 index 0000000..0de2d0e --- /dev/null +++ b/docs/models/operations/dockergetcontainersbyapplabelrequest.md @@ -0,0 +1,18 @@ +# DockerGetContainersByAppLabelRequest + +## Example Usage + +```typescript +import { DockerGetContainersByAppLabelRequest } from "dokploy/models/operations"; + +let value: DockerGetContainersByAppLabelRequest = { + appName: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `appName` | *string* | :heavy_check_mark: | N/A | +| `serverId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/dockergetcontainersbyappnamematchrequest.md b/docs/models/operations/dockergetcontainersbyappnamematchrequest.md new file mode 100644 index 0000000..77dc74a --- /dev/null +++ b/docs/models/operations/dockergetcontainersbyappnamematchrequest.md @@ -0,0 +1,19 @@ +# DockerGetContainersByAppNameMatchRequest + +## Example Usage + +```typescript +import { DockerGetContainersByAppNameMatchRequest } from "dokploy/models/operations"; + +let value: DockerGetContainersByAppNameMatchRequest = { + appName: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `appType` | *operations.AppType* | :heavy_minus_sign: | N/A | +| `appName` | *string* | :heavy_check_mark: | N/A | +| `serverId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/dockergetcontainersrequest.md b/docs/models/operations/dockergetcontainersrequest.md new file mode 100644 index 0000000..748a9b2 --- /dev/null +++ b/docs/models/operations/dockergetcontainersrequest.md @@ -0,0 +1,15 @@ +# DockerGetContainersRequest + +## Example Usage + +```typescript +import { DockerGetContainersRequest } from "dokploy/models/operations"; + +let value: DockerGetContainersRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `serverId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/dockerrestartcontainerrequest.md b/docs/models/operations/dockerrestartcontainerrequest.md new file mode 100644 index 0000000..c4f564d --- /dev/null +++ b/docs/models/operations/dockerrestartcontainerrequest.md @@ -0,0 +1,17 @@ +# DockerRestartContainerRequest + +## Example Usage + +```typescript +import { DockerRestartContainerRequest } from "dokploy/models/operations"; + +let value: DockerRestartContainerRequest = { + containerId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `containerId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/domainbyapplicationidrequest.md b/docs/models/operations/domainbyapplicationidrequest.md new file mode 100644 index 0000000..c377648 --- /dev/null +++ b/docs/models/operations/domainbyapplicationidrequest.md @@ -0,0 +1,17 @@ +# DomainByApplicationIdRequest + +## Example Usage + +```typescript +import { DomainByApplicationIdRequest } from "dokploy/models/operations"; + +let value: DomainByApplicationIdRequest = { + applicationId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `applicationId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/domainbycomposeidrequest.md b/docs/models/operations/domainbycomposeidrequest.md new file mode 100644 index 0000000..a8326ce --- /dev/null +++ b/docs/models/operations/domainbycomposeidrequest.md @@ -0,0 +1,17 @@ +# DomainByComposeIdRequest + +## Example Usage + +```typescript +import { DomainByComposeIdRequest } from "dokploy/models/operations"; + +let value: DomainByComposeIdRequest = { + composeId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `composeId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/domaincreatecertificatetype.md b/docs/models/operations/domaincreatecertificatetype.md new file mode 100644 index 0000000..5e66485 --- /dev/null +++ b/docs/models/operations/domaincreatecertificatetype.md @@ -0,0 +1,15 @@ +# DomainCreateCertificateType + +## Example Usage + +```typescript +import { DomainCreateCertificateType } from "dokploy/models/operations"; + +let value: DomainCreateCertificateType = "none"; +``` + +## Values + +```typescript +"letsencrypt" | "none" +``` \ No newline at end of file diff --git a/docs/models/operations/domaincreatedomaintype.md b/docs/models/operations/domaincreatedomaintype.md new file mode 100644 index 0000000..8a60c08 --- /dev/null +++ b/docs/models/operations/domaincreatedomaintype.md @@ -0,0 +1,15 @@ +# DomainCreateDomainType + +## Example Usage + +```typescript +import { DomainCreateDomainType } from "dokploy/models/operations"; + +let value: DomainCreateDomainType = "compose"; +``` + +## Values + +```typescript +"compose" | "application" +``` \ No newline at end of file diff --git a/docs/models/operations/domaincreaterequest.md b/docs/models/operations/domaincreaterequest.md new file mode 100644 index 0000000..4024ecc --- /dev/null +++ b/docs/models/operations/domaincreaterequest.md @@ -0,0 +1,25 @@ +# DomainCreateRequest + +## Example Usage + +```typescript +import { DomainCreateRequest } from "dokploy/models/operations"; + +let value: DomainCreateRequest = { + host: "dim-tinderbox.name", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `host` | *string* | :heavy_check_mark: | N/A | +| `path` | *string* | :heavy_minus_sign: | N/A | +| `port` | *number* | :heavy_minus_sign: | N/A | +| `https` | *boolean* | :heavy_minus_sign: | N/A | +| `applicationId` | *string* | :heavy_minus_sign: | N/A | +| `certificateType` | [operations.DomainCreateCertificateType](../../models/operations/domaincreatecertificatetype.md) | :heavy_minus_sign: | N/A | +| `composeId` | *string* | :heavy_minus_sign: | N/A | +| `serviceName` | *string* | :heavy_minus_sign: | N/A | +| `domainType` | [operations.DomainCreateDomainType](../../models/operations/domaincreatedomaintype.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/domaindeleterequest.md b/docs/models/operations/domaindeleterequest.md new file mode 100644 index 0000000..665e886 --- /dev/null +++ b/docs/models/operations/domaindeleterequest.md @@ -0,0 +1,17 @@ +# DomainDeleteRequest + +## Example Usage + +```typescript +import { DomainDeleteRequest } from "dokploy/models/operations"; + +let value: DomainDeleteRequest = { + domainId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `domainId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/domaingeneratedomainrequest.md b/docs/models/operations/domaingeneratedomainrequest.md new file mode 100644 index 0000000..e7d148a --- /dev/null +++ b/docs/models/operations/domaingeneratedomainrequest.md @@ -0,0 +1,18 @@ +# DomainGenerateDomainRequest + +## Example Usage + +```typescript +import { DomainGenerateDomainRequest } from "dokploy/models/operations"; + +let value: DomainGenerateDomainRequest = { + appName: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `appName` | *string* | :heavy_check_mark: | N/A | +| `serverId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/domainonerequest.md b/docs/models/operations/domainonerequest.md new file mode 100644 index 0000000..f8ef947 --- /dev/null +++ b/docs/models/operations/domainonerequest.md @@ -0,0 +1,17 @@ +# DomainOneRequest + +## Example Usage + +```typescript +import { DomainOneRequest } from "dokploy/models/operations"; + +let value: DomainOneRequest = { + domainId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `domainId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/domainupdatecertificatetype.md b/docs/models/operations/domainupdatecertificatetype.md new file mode 100644 index 0000000..4526be6 --- /dev/null +++ b/docs/models/operations/domainupdatecertificatetype.md @@ -0,0 +1,15 @@ +# DomainUpdateCertificateType + +## Example Usage + +```typescript +import { DomainUpdateCertificateType } from "dokploy/models/operations"; + +let value: DomainUpdateCertificateType = "letsencrypt"; +``` + +## Values + +```typescript +"letsencrypt" | "none" +``` \ No newline at end of file diff --git a/docs/models/operations/domainupdatedomaintype.md b/docs/models/operations/domainupdatedomaintype.md new file mode 100644 index 0000000..cf9ab5b --- /dev/null +++ b/docs/models/operations/domainupdatedomaintype.md @@ -0,0 +1,15 @@ +# DomainUpdateDomainType + +## Example Usage + +```typescript +import { DomainUpdateDomainType } from "dokploy/models/operations"; + +let value: DomainUpdateDomainType = "application"; +``` + +## Values + +```typescript +"compose" | "application" +``` \ No newline at end of file diff --git a/docs/models/operations/domainupdaterequest.md b/docs/models/operations/domainupdaterequest.md new file mode 100644 index 0000000..f2ea2db --- /dev/null +++ b/docs/models/operations/domainupdaterequest.md @@ -0,0 +1,25 @@ +# DomainUpdateRequest + +## Example Usage + +```typescript +import { DomainUpdateRequest } from "dokploy/models/operations"; + +let value: DomainUpdateRequest = { + host: "tinted-squid.net", + domainId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `host` | *string* | :heavy_check_mark: | N/A | +| `path` | *string* | :heavy_minus_sign: | N/A | +| `port` | *number* | :heavy_minus_sign: | N/A | +| `https` | *boolean* | :heavy_minus_sign: | N/A | +| `certificateType` | [operations.DomainUpdateCertificateType](../../models/operations/domainupdatecertificatetype.md) | :heavy_minus_sign: | N/A | +| `serviceName` | *string* | :heavy_minus_sign: | N/A | +| `domainType` | [operations.DomainUpdateDomainType](../../models/operations/domainupdatedomaintype.md) | :heavy_minus_sign: | N/A | +| `domainId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/driveropts.md b/docs/models/operations/driveropts.md new file mode 100644 index 0000000..8437d68 --- /dev/null +++ b/docs/models/operations/driveropts.md @@ -0,0 +1,14 @@ +# DriverOpts + +## Example Usage + +```typescript +import { DriverOpts } from "dokploy/models/operations"; + +let value: DriverOpts = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/githubgetgithubbranchesrequest.md b/docs/models/operations/githubgetgithubbranchesrequest.md new file mode 100644 index 0000000..42a23a2 --- /dev/null +++ b/docs/models/operations/githubgetgithubbranchesrequest.md @@ -0,0 +1,20 @@ +# GithubGetGithubBranchesRequest + +## Example Usage + +```typescript +import { GithubGetGithubBranchesRequest } from "dokploy/models/operations"; + +let value: GithubGetGithubBranchesRequest = { + repo: "", + owner: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `repo` | *string* | :heavy_check_mark: | N/A | +| `owner` | *string* | :heavy_check_mark: | N/A | +| `githubId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/githubgetgithubrepositoriesrequest.md b/docs/models/operations/githubgetgithubrepositoriesrequest.md new file mode 100644 index 0000000..fc2d390 --- /dev/null +++ b/docs/models/operations/githubgetgithubrepositoriesrequest.md @@ -0,0 +1,17 @@ +# GithubGetGithubRepositoriesRequest + +## Example Usage + +```typescript +import { GithubGetGithubRepositoriesRequest } from "dokploy/models/operations"; + +let value: GithubGetGithubRepositoriesRequest = { + githubId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `githubId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/githubonerequest.md b/docs/models/operations/githubonerequest.md new file mode 100644 index 0000000..e8a9233 --- /dev/null +++ b/docs/models/operations/githubonerequest.md @@ -0,0 +1,17 @@ +# GithubOneRequest + +## Example Usage + +```typescript +import { GithubOneRequest } from "dokploy/models/operations"; + +let value: GithubOneRequest = { + githubId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `githubId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/githubtestconnectionrequest.md b/docs/models/operations/githubtestconnectionrequest.md new file mode 100644 index 0000000..b29aaab --- /dev/null +++ b/docs/models/operations/githubtestconnectionrequest.md @@ -0,0 +1,17 @@ +# GithubTestConnectionRequest + +## Example Usage + +```typescript +import { GithubTestConnectionRequest } from "dokploy/models/operations"; + +let value: GithubTestConnectionRequest = { + githubId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `githubId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/githubupdaterequest.md b/docs/models/operations/githubupdaterequest.md new file mode 100644 index 0000000..40a006c --- /dev/null +++ b/docs/models/operations/githubupdaterequest.md @@ -0,0 +1,28 @@ +# GithubUpdateRequest + +## Example Usage + +```typescript +import { GithubUpdateRequest } from "dokploy/models/operations"; + +let value: GithubUpdateRequest = { + githubId: "", + gitProviderId: "", + name: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `githubId` | *string* | :heavy_check_mark: | N/A | +| `githubAppName` | *string* | :heavy_minus_sign: | N/A | +| `githubAppId` | *number* | :heavy_minus_sign: | N/A | +| `githubClientId` | *string* | :heavy_minus_sign: | N/A | +| `githubClientSecret` | *string* | :heavy_minus_sign: | N/A | +| `githubInstallationId` | *string* | :heavy_minus_sign: | N/A | +| `githubPrivateKey` | *string* | :heavy_minus_sign: | N/A | +| `githubWebhookSecret` | *string* | :heavy_minus_sign: | N/A | +| `gitProviderId` | *string* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/gitlabcreaterequest.md b/docs/models/operations/gitlabcreaterequest.md new file mode 100644 index 0000000..f4e9b84 --- /dev/null +++ b/docs/models/operations/gitlabcreaterequest.md @@ -0,0 +1,28 @@ +# GitlabCreateRequest + +## Example Usage + +```typescript +import { GitlabCreateRequest } from "dokploy/models/operations"; + +let value: GitlabCreateRequest = { + authId: "", + name: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `gitlabId` | *string* | :heavy_minus_sign: | N/A | +| `applicationId` | *string* | :heavy_minus_sign: | N/A | +| `redirectUri` | *string* | :heavy_minus_sign: | N/A | +| `secret` | *string* | :heavy_minus_sign: | N/A | +| `accessToken` | *string* | :heavy_minus_sign: | N/A | +| `refreshToken` | *string* | :heavy_minus_sign: | N/A | +| `groupName` | *string* | :heavy_minus_sign: | N/A | +| `expiresAt` | *number* | :heavy_minus_sign: | N/A | +| `gitProviderId` | *string* | :heavy_minus_sign: | N/A | +| `authId` | *string* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/gitlabgetgitlabbranchesrequest.md b/docs/models/operations/gitlabgetgitlabbranchesrequest.md new file mode 100644 index 0000000..d776206 --- /dev/null +++ b/docs/models/operations/gitlabgetgitlabbranchesrequest.md @@ -0,0 +1,21 @@ +# GitlabGetGitlabBranchesRequest + +## Example Usage + +```typescript +import { GitlabGetGitlabBranchesRequest } from "dokploy/models/operations"; + +let value: GitlabGetGitlabBranchesRequest = { + owner: "", + repo: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `owner` | *string* | :heavy_check_mark: | N/A | +| `repo` | *string* | :heavy_check_mark: | N/A | +| `gitlabId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/gitlabgetgitlabrepositoriesrequest.md b/docs/models/operations/gitlabgetgitlabrepositoriesrequest.md new file mode 100644 index 0000000..93d532f --- /dev/null +++ b/docs/models/operations/gitlabgetgitlabrepositoriesrequest.md @@ -0,0 +1,17 @@ +# GitlabGetGitlabRepositoriesRequest + +## Example Usage + +```typescript +import { GitlabGetGitlabRepositoriesRequest } from "dokploy/models/operations"; + +let value: GitlabGetGitlabRepositoriesRequest = { + gitlabId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `gitlabId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/gitlabonerequest.md b/docs/models/operations/gitlabonerequest.md new file mode 100644 index 0000000..600de5c --- /dev/null +++ b/docs/models/operations/gitlabonerequest.md @@ -0,0 +1,17 @@ +# GitlabOneRequest + +## Example Usage + +```typescript +import { GitlabOneRequest } from "dokploy/models/operations"; + +let value: GitlabOneRequest = { + gitlabId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `gitlabId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/gitlabtestconnectionrequest.md b/docs/models/operations/gitlabtestconnectionrequest.md new file mode 100644 index 0000000..a6fa50c --- /dev/null +++ b/docs/models/operations/gitlabtestconnectionrequest.md @@ -0,0 +1,16 @@ +# GitlabTestConnectionRequest + +## Example Usage + +```typescript +import { GitlabTestConnectionRequest } from "dokploy/models/operations"; + +let value: GitlabTestConnectionRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `gitlabId` | *string* | :heavy_minus_sign: | N/A | +| `groupName` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/gitlabupdaterequest.md b/docs/models/operations/gitlabupdaterequest.md new file mode 100644 index 0000000..1a804dd --- /dev/null +++ b/docs/models/operations/gitlabupdaterequest.md @@ -0,0 +1,28 @@ +# GitlabUpdateRequest + +## Example Usage + +```typescript +import { GitlabUpdateRequest } from "dokploy/models/operations"; + +let value: GitlabUpdateRequest = { + gitlabId: "", + gitProviderId: "", + name: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `gitlabId` | *string* | :heavy_check_mark: | N/A | +| `applicationId` | *string* | :heavy_minus_sign: | N/A | +| `redirectUri` | *string* | :heavy_minus_sign: | N/A | +| `secret` | *string* | :heavy_minus_sign: | N/A | +| `accessToken` | *string* | :heavy_minus_sign: | N/A | +| `refreshToken` | *string* | :heavy_minus_sign: | N/A | +| `groupName` | *string* | :heavy_minus_sign: | N/A | +| `expiresAt` | *number* | :heavy_minus_sign: | N/A | +| `gitProviderId` | *string* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/gitproviderremoverequest.md b/docs/models/operations/gitproviderremoverequest.md new file mode 100644 index 0000000..0ce3045 --- /dev/null +++ b/docs/models/operations/gitproviderremoverequest.md @@ -0,0 +1,17 @@ +# GitProviderRemoveRequest + +## Example Usage + +```typescript +import { GitProviderRemoveRequest } from "dokploy/models/operations"; + +let value: GitProviderRemoveRequest = { + gitProviderId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `gitProviderId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/global.md b/docs/models/operations/global.md new file mode 100644 index 0000000..e855576 --- /dev/null +++ b/docs/models/operations/global.md @@ -0,0 +1,14 @@ +# Global + +## Example Usage + +```typescript +import { Global } from "dokploy/models/operations"; + +let value: Global = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/globaljob.md b/docs/models/operations/globaljob.md new file mode 100644 index 0000000..00a805a --- /dev/null +++ b/docs/models/operations/globaljob.md @@ -0,0 +1,14 @@ +# GlobalJob + +## Example Usage + +```typescript +import { GlobalJob } from "dokploy/models/operations"; + +let value: GlobalJob = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/healthcheckswarm.md b/docs/models/operations/healthcheckswarm.md new file mode 100644 index 0000000..55d8c5b --- /dev/null +++ b/docs/models/operations/healthcheckswarm.md @@ -0,0 +1,19 @@ +# HealthCheckSwarm + +## Example Usage + +```typescript +import { HealthCheckSwarm } from "dokploy/models/operations"; + +let value: HealthCheckSwarm = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `test` | *string*[] | :heavy_minus_sign: | N/A | +| `interval` | *number* | :heavy_minus_sign: | N/A | +| `timeout` | *number* | :heavy_minus_sign: | N/A | +| `startPeriod` | *number* | :heavy_minus_sign: | N/A | +| `retries` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mariadbchangestatusapplicationstatus.md b/docs/models/operations/mariadbchangestatusapplicationstatus.md new file mode 100644 index 0000000..147f500 --- /dev/null +++ b/docs/models/operations/mariadbchangestatusapplicationstatus.md @@ -0,0 +1,15 @@ +# MariadbChangeStatusApplicationStatus + +## Example Usage + +```typescript +import { MariadbChangeStatusApplicationStatus } from "dokploy/models/operations"; + +let value: MariadbChangeStatusApplicationStatus = "running"; +``` + +## Values + +```typescript +"idle" | "running" | "done" | "error" +``` \ No newline at end of file diff --git a/docs/models/operations/mariadbchangestatusrequest.md b/docs/models/operations/mariadbchangestatusrequest.md new file mode 100644 index 0000000..aaee254 --- /dev/null +++ b/docs/models/operations/mariadbchangestatusrequest.md @@ -0,0 +1,19 @@ +# MariadbChangeStatusRequest + +## Example Usage + +```typescript +import { MariadbChangeStatusRequest } from "dokploy/models/operations"; + +let value: MariadbChangeStatusRequest = { + mariadbId: "", + applicationStatus: "done", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `mariadbId` | *string* | :heavy_check_mark: | N/A | +| `applicationStatus` | [operations.MariadbChangeStatusApplicationStatus](../../models/operations/mariadbchangestatusapplicationstatus.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mariadbcreaterequest.md b/docs/models/operations/mariadbcreaterequest.md new file mode 100644 index 0000000..388f99b --- /dev/null +++ b/docs/models/operations/mariadbcreaterequest.md @@ -0,0 +1,32 @@ +# MariadbCreateRequest + +## Example Usage + +```typescript +import { MariadbCreateRequest } from "dokploy/models/operations"; + +let value: MariadbCreateRequest = { + name: "", + appName: "", + databaseRootPassword: "", + projectId: "", + databaseName: "", + databaseUser: "", + databasePassword: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `name` | *string* | :heavy_check_mark: | N/A | +| `appName` | *string* | :heavy_check_mark: | N/A | +| `dockerImage` | *string* | :heavy_minus_sign: | N/A | +| `databaseRootPassword` | *string* | :heavy_check_mark: | N/A | +| `projectId` | *string* | :heavy_check_mark: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `databaseName` | *string* | :heavy_check_mark: | N/A | +| `databaseUser` | *string* | :heavy_check_mark: | N/A | +| `databasePassword` | *string* | :heavy_check_mark: | N/A | +| `serverId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mariadbdeployrequest.md b/docs/models/operations/mariadbdeployrequest.md new file mode 100644 index 0000000..b1689f7 --- /dev/null +++ b/docs/models/operations/mariadbdeployrequest.md @@ -0,0 +1,17 @@ +# MariadbDeployRequest + +## Example Usage + +```typescript +import { MariadbDeployRequest } from "dokploy/models/operations"; + +let value: MariadbDeployRequest = { + mariadbId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `mariadbId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mariadbonerequest.md b/docs/models/operations/mariadbonerequest.md new file mode 100644 index 0000000..80dd432 --- /dev/null +++ b/docs/models/operations/mariadbonerequest.md @@ -0,0 +1,17 @@ +# MariadbOneRequest + +## Example Usage + +```typescript +import { MariadbOneRequest } from "dokploy/models/operations"; + +let value: MariadbOneRequest = { + mariadbId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `mariadbId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mariadbreloadrequest.md b/docs/models/operations/mariadbreloadrequest.md new file mode 100644 index 0000000..95347f4 --- /dev/null +++ b/docs/models/operations/mariadbreloadrequest.md @@ -0,0 +1,19 @@ +# MariadbReloadRequest + +## Example Usage + +```typescript +import { MariadbReloadRequest } from "dokploy/models/operations"; + +let value: MariadbReloadRequest = { + mariadbId: "", + appName: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `mariadbId` | *string* | :heavy_check_mark: | N/A | +| `appName` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mariadbremoverequest.md b/docs/models/operations/mariadbremoverequest.md new file mode 100644 index 0000000..b29a17a --- /dev/null +++ b/docs/models/operations/mariadbremoverequest.md @@ -0,0 +1,17 @@ +# MariadbRemoveRequest + +## Example Usage + +```typescript +import { MariadbRemoveRequest } from "dokploy/models/operations"; + +let value: MariadbRemoveRequest = { + mariadbId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `mariadbId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mariadbsaveenvironmentrequest.md b/docs/models/operations/mariadbsaveenvironmentrequest.md new file mode 100644 index 0000000..85deee1 --- /dev/null +++ b/docs/models/operations/mariadbsaveenvironmentrequest.md @@ -0,0 +1,18 @@ +# MariadbSaveEnvironmentRequest + +## Example Usage + +```typescript +import { MariadbSaveEnvironmentRequest } from "dokploy/models/operations"; + +let value: MariadbSaveEnvironmentRequest = { + mariadbId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `mariadbId` | *string* | :heavy_check_mark: | N/A | +| `env` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mariadbsaveexternalportrequest.md b/docs/models/operations/mariadbsaveexternalportrequest.md new file mode 100644 index 0000000..62e23b1 --- /dev/null +++ b/docs/models/operations/mariadbsaveexternalportrequest.md @@ -0,0 +1,19 @@ +# MariadbSaveExternalPortRequest + +## Example Usage + +```typescript +import { MariadbSaveExternalPortRequest } from "dokploy/models/operations"; + +let value: MariadbSaveExternalPortRequest = { + mariadbId: "", + externalPort: 7201.96, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `mariadbId` | *string* | :heavy_check_mark: | N/A | +| `externalPort` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mariadbstartrequest.md b/docs/models/operations/mariadbstartrequest.md new file mode 100644 index 0000000..df60df5 --- /dev/null +++ b/docs/models/operations/mariadbstartrequest.md @@ -0,0 +1,17 @@ +# MariadbStartRequest + +## Example Usage + +```typescript +import { MariadbStartRequest } from "dokploy/models/operations"; + +let value: MariadbStartRequest = { + mariadbId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `mariadbId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mariadbstoprequest.md b/docs/models/operations/mariadbstoprequest.md new file mode 100644 index 0000000..59965e1 --- /dev/null +++ b/docs/models/operations/mariadbstoprequest.md @@ -0,0 +1,17 @@ +# MariadbStopRequest + +## Example Usage + +```typescript +import { MariadbStopRequest } from "dokploy/models/operations"; + +let value: MariadbStopRequest = { + mariadbId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `mariadbId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mariadbupdateapplicationstatus.md b/docs/models/operations/mariadbupdateapplicationstatus.md new file mode 100644 index 0000000..0b2bb7a --- /dev/null +++ b/docs/models/operations/mariadbupdateapplicationstatus.md @@ -0,0 +1,15 @@ +# MariadbUpdateApplicationStatus + +## Example Usage + +```typescript +import { MariadbUpdateApplicationStatus } from "dokploy/models/operations"; + +let value: MariadbUpdateApplicationStatus = "error"; +``` + +## Values + +```typescript +"idle" | "running" | "done" | "error" +``` \ No newline at end of file diff --git a/docs/models/operations/mariadbupdaterequest.md b/docs/models/operations/mariadbupdaterequest.md new file mode 100644 index 0000000..8de3b97 --- /dev/null +++ b/docs/models/operations/mariadbupdaterequest.md @@ -0,0 +1,35 @@ +# MariadbUpdateRequest + +## Example Usage + +```typescript +import { MariadbUpdateRequest } from "dokploy/models/operations"; + +let value: MariadbUpdateRequest = { + mariadbId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `mariadbId` | *string* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `appName` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `databaseName` | *string* | :heavy_minus_sign: | N/A | +| `databaseUser` | *string* | :heavy_minus_sign: | N/A | +| `databasePassword` | *string* | :heavy_minus_sign: | N/A | +| `databaseRootPassword` | *string* | :heavy_minus_sign: | N/A | +| `dockerImage` | *string* | :heavy_minus_sign: | N/A | +| `command` | *string* | :heavy_minus_sign: | N/A | +| `env` | *string* | :heavy_minus_sign: | N/A | +| `memoryReservation` | *number* | :heavy_minus_sign: | N/A | +| `memoryLimit` | *number* | :heavy_minus_sign: | N/A | +| `cpuReservation` | *number* | :heavy_minus_sign: | N/A | +| `cpuLimit` | *number* | :heavy_minus_sign: | N/A | +| `externalPort` | *number* | :heavy_minus_sign: | N/A | +| `applicationStatus` | [operations.MariadbUpdateApplicationStatus](../../models/operations/mariadbupdateapplicationstatus.md) | :heavy_minus_sign: | N/A | +| `createdAt` | *string* | :heavy_minus_sign: | N/A | +| `projectId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/modeswarm.md b/docs/models/operations/modeswarm.md new file mode 100644 index 0000000..e58637f --- /dev/null +++ b/docs/models/operations/modeswarm.md @@ -0,0 +1,18 @@ +# ModeSwarm + +## Example Usage + +```typescript +import { ModeSwarm } from "dokploy/models/operations"; + +let value: ModeSwarm = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `replicated` | [operations.Replicated](../../models/operations/replicated.md) | :heavy_minus_sign: | N/A | +| `global` | [operations.Global](../../models/operations/global.md) | :heavy_minus_sign: | N/A | +| `replicatedJob` | [operations.ReplicatedJob](../../models/operations/replicatedjob.md) | :heavy_minus_sign: | N/A | +| `globalJob` | [operations.GlobalJob](../../models/operations/globaljob.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mongochangestatusapplicationstatus.md b/docs/models/operations/mongochangestatusapplicationstatus.md new file mode 100644 index 0000000..3b2baca --- /dev/null +++ b/docs/models/operations/mongochangestatusapplicationstatus.md @@ -0,0 +1,15 @@ +# MongoChangeStatusApplicationStatus + +## Example Usage + +```typescript +import { MongoChangeStatusApplicationStatus } from "dokploy/models/operations"; + +let value: MongoChangeStatusApplicationStatus = "done"; +``` + +## Values + +```typescript +"idle" | "running" | "done" | "error" +``` \ No newline at end of file diff --git a/docs/models/operations/mongochangestatusrequest.md b/docs/models/operations/mongochangestatusrequest.md new file mode 100644 index 0000000..b97aba5 --- /dev/null +++ b/docs/models/operations/mongochangestatusrequest.md @@ -0,0 +1,19 @@ +# MongoChangeStatusRequest + +## Example Usage + +```typescript +import { MongoChangeStatusRequest } from "dokploy/models/operations"; + +let value: MongoChangeStatusRequest = { + mongoId: "", + applicationStatus: "idle", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `mongoId` | *string* | :heavy_check_mark: | N/A | +| `applicationStatus` | [operations.MongoChangeStatusApplicationStatus](../../models/operations/mongochangestatusapplicationstatus.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mongocreaterequest.md b/docs/models/operations/mongocreaterequest.md new file mode 100644 index 0000000..fed754b --- /dev/null +++ b/docs/models/operations/mongocreaterequest.md @@ -0,0 +1,28 @@ +# MongoCreateRequest + +## Example Usage + +```typescript +import { MongoCreateRequest } from "dokploy/models/operations"; + +let value: MongoCreateRequest = { + name: "", + appName: "", + projectId: "", + databaseUser: "", + databasePassword: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *string* | :heavy_check_mark: | N/A | +| `appName` | *string* | :heavy_check_mark: | N/A | +| `dockerImage` | *string* | :heavy_minus_sign: | N/A | +| `projectId` | *string* | :heavy_check_mark: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `databaseUser` | *string* | :heavy_check_mark: | N/A | +| `databasePassword` | *string* | :heavy_check_mark: | N/A | +| `serverId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mongodeployrequest.md b/docs/models/operations/mongodeployrequest.md new file mode 100644 index 0000000..8e96131 --- /dev/null +++ b/docs/models/operations/mongodeployrequest.md @@ -0,0 +1,17 @@ +# MongoDeployRequest + +## Example Usage + +```typescript +import { MongoDeployRequest } from "dokploy/models/operations"; + +let value: MongoDeployRequest = { + mongoId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `mongoId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mongoonerequest.md b/docs/models/operations/mongoonerequest.md new file mode 100644 index 0000000..05ad7f1 --- /dev/null +++ b/docs/models/operations/mongoonerequest.md @@ -0,0 +1,17 @@ +# MongoOneRequest + +## Example Usage + +```typescript +import { MongoOneRequest } from "dokploy/models/operations"; + +let value: MongoOneRequest = { + mongoId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `mongoId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mongoreloadrequest.md b/docs/models/operations/mongoreloadrequest.md new file mode 100644 index 0000000..c81fec7 --- /dev/null +++ b/docs/models/operations/mongoreloadrequest.md @@ -0,0 +1,19 @@ +# MongoReloadRequest + +## Example Usage + +```typescript +import { MongoReloadRequest } from "dokploy/models/operations"; + +let value: MongoReloadRequest = { + mongoId: "", + appName: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `mongoId` | *string* | :heavy_check_mark: | N/A | +| `appName` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mongoremoverequest.md b/docs/models/operations/mongoremoverequest.md new file mode 100644 index 0000000..52205ef --- /dev/null +++ b/docs/models/operations/mongoremoverequest.md @@ -0,0 +1,17 @@ +# MongoRemoveRequest + +## Example Usage + +```typescript +import { MongoRemoveRequest } from "dokploy/models/operations"; + +let value: MongoRemoveRequest = { + mongoId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `mongoId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mongosaveenvironmentrequest.md b/docs/models/operations/mongosaveenvironmentrequest.md new file mode 100644 index 0000000..b977eae --- /dev/null +++ b/docs/models/operations/mongosaveenvironmentrequest.md @@ -0,0 +1,18 @@ +# MongoSaveEnvironmentRequest + +## Example Usage + +```typescript +import { MongoSaveEnvironmentRequest } from "dokploy/models/operations"; + +let value: MongoSaveEnvironmentRequest = { + mongoId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `mongoId` | *string* | :heavy_check_mark: | N/A | +| `env` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mongosaveexternalportrequest.md b/docs/models/operations/mongosaveexternalportrequest.md new file mode 100644 index 0000000..419b722 --- /dev/null +++ b/docs/models/operations/mongosaveexternalportrequest.md @@ -0,0 +1,19 @@ +# MongoSaveExternalPortRequest + +## Example Usage + +```typescript +import { MongoSaveExternalPortRequest } from "dokploy/models/operations"; + +let value: MongoSaveExternalPortRequest = { + mongoId: "", + externalPort: 9764.9, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `mongoId` | *string* | :heavy_check_mark: | N/A | +| `externalPort` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mongostartrequest.md b/docs/models/operations/mongostartrequest.md new file mode 100644 index 0000000..1c42380 --- /dev/null +++ b/docs/models/operations/mongostartrequest.md @@ -0,0 +1,17 @@ +# MongoStartRequest + +## Example Usage + +```typescript +import { MongoStartRequest } from "dokploy/models/operations"; + +let value: MongoStartRequest = { + mongoId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `mongoId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mongostoprequest.md b/docs/models/operations/mongostoprequest.md new file mode 100644 index 0000000..d599333 --- /dev/null +++ b/docs/models/operations/mongostoprequest.md @@ -0,0 +1,17 @@ +# MongoStopRequest + +## Example Usage + +```typescript +import { MongoStopRequest } from "dokploy/models/operations"; + +let value: MongoStopRequest = { + mongoId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `mongoId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mongoupdateapplicationstatus.md b/docs/models/operations/mongoupdateapplicationstatus.md new file mode 100644 index 0000000..92f802a --- /dev/null +++ b/docs/models/operations/mongoupdateapplicationstatus.md @@ -0,0 +1,15 @@ +# MongoUpdateApplicationStatus + +## Example Usage + +```typescript +import { MongoUpdateApplicationStatus } from "dokploy/models/operations"; + +let value: MongoUpdateApplicationStatus = "done"; +``` + +## Values + +```typescript +"idle" | "running" | "done" | "error" +``` \ No newline at end of file diff --git a/docs/models/operations/mongoupdaterequest.md b/docs/models/operations/mongoupdaterequest.md new file mode 100644 index 0000000..8a2857a --- /dev/null +++ b/docs/models/operations/mongoupdaterequest.md @@ -0,0 +1,33 @@ +# MongoUpdateRequest + +## Example Usage + +```typescript +import { MongoUpdateRequest } from "dokploy/models/operations"; + +let value: MongoUpdateRequest = { + mongoId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `mongoId` | *string* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `appName` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `databaseUser` | *string* | :heavy_minus_sign: | N/A | +| `databasePassword` | *string* | :heavy_minus_sign: | N/A | +| `dockerImage` | *string* | :heavy_minus_sign: | N/A | +| `command` | *string* | :heavy_minus_sign: | N/A | +| `env` | *string* | :heavy_minus_sign: | N/A | +| `memoryReservation` | *number* | :heavy_minus_sign: | N/A | +| `memoryLimit` | *number* | :heavy_minus_sign: | N/A | +| `cpuReservation` | *number* | :heavy_minus_sign: | N/A | +| `cpuLimit` | *number* | :heavy_minus_sign: | N/A | +| `externalPort` | *number* | :heavy_minus_sign: | N/A | +| `applicationStatus` | [operations.MongoUpdateApplicationStatus](../../models/operations/mongoupdateapplicationstatus.md) | :heavy_minus_sign: | N/A | +| `createdAt` | *string* | :heavy_minus_sign: | N/A | +| `projectId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mountscreaterequest.md b/docs/models/operations/mountscreaterequest.md new file mode 100644 index 0000000..6eb36e1 --- /dev/null +++ b/docs/models/operations/mountscreaterequest.md @@ -0,0 +1,26 @@ +# MountsCreateRequest + +## Example Usage + +```typescript +import { MountsCreateRequest } from "dokploy/models/operations"; + +let value: MountsCreateRequest = { + type: "volume", + mountPath: "", + serviceId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `type` | [operations.MountsCreateType](../../models/operations/mountscreatetype.md) | :heavy_check_mark: | N/A | +| `hostPath` | *string* | :heavy_minus_sign: | N/A | +| `volumeName` | *string* | :heavy_minus_sign: | N/A | +| `content` | *string* | :heavy_minus_sign: | N/A | +| `mountPath` | *string* | :heavy_check_mark: | N/A | +| `serviceType` | [operations.MountsCreateServiceType](../../models/operations/mountscreateservicetype.md) | :heavy_minus_sign: | N/A | +| `filePath` | *string* | :heavy_minus_sign: | N/A | +| `serviceId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mountscreateservicetype.md b/docs/models/operations/mountscreateservicetype.md new file mode 100644 index 0000000..102ea9b --- /dev/null +++ b/docs/models/operations/mountscreateservicetype.md @@ -0,0 +1,15 @@ +# MountsCreateServiceType + +## Example Usage + +```typescript +import { MountsCreateServiceType } from "dokploy/models/operations"; + +let value: MountsCreateServiceType = "redis"; +``` + +## Values + +```typescript +"application" | "postgres" | "mysql" | "mariadb" | "mongo" | "redis" | "compose" +``` \ No newline at end of file diff --git a/docs/models/operations/mountscreatetype.md b/docs/models/operations/mountscreatetype.md new file mode 100644 index 0000000..8ef6d22 --- /dev/null +++ b/docs/models/operations/mountscreatetype.md @@ -0,0 +1,15 @@ +# MountsCreateType + +## Example Usage + +```typescript +import { MountsCreateType } from "dokploy/models/operations"; + +let value: MountsCreateType = "file"; +``` + +## Values + +```typescript +"bind" | "volume" | "file" +``` \ No newline at end of file diff --git a/docs/models/operations/mountsonerequest.md b/docs/models/operations/mountsonerequest.md new file mode 100644 index 0000000..f6860dd --- /dev/null +++ b/docs/models/operations/mountsonerequest.md @@ -0,0 +1,17 @@ +# MountsOneRequest + +## Example Usage + +```typescript +import { MountsOneRequest } from "dokploy/models/operations"; + +let value: MountsOneRequest = { + mountId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `mountId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mountsremoverequest.md b/docs/models/operations/mountsremoverequest.md new file mode 100644 index 0000000..cc19c6f --- /dev/null +++ b/docs/models/operations/mountsremoverequest.md @@ -0,0 +1,17 @@ +# MountsRemoveRequest + +## Example Usage + +```typescript +import { MountsRemoveRequest } from "dokploy/models/operations"; + +let value: MountsRemoveRequest = { + mountId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `mountId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mountsupdaterequest.md b/docs/models/operations/mountsupdaterequest.md new file mode 100644 index 0000000..3fa1e62 --- /dev/null +++ b/docs/models/operations/mountsupdaterequest.md @@ -0,0 +1,31 @@ +# MountsUpdateRequest + +## Example Usage + +```typescript +import { MountsUpdateRequest } from "dokploy/models/operations"; + +let value: MountsUpdateRequest = { + mountId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `mountId` | *string* | :heavy_check_mark: | N/A | +| `type` | [operations.MountsUpdateType](../../models/operations/mountsupdatetype.md) | :heavy_minus_sign: | N/A | +| `hostPath` | *string* | :heavy_minus_sign: | N/A | +| `volumeName` | *string* | :heavy_minus_sign: | N/A | +| `filePath` | *string* | :heavy_minus_sign: | N/A | +| `content` | *string* | :heavy_minus_sign: | N/A | +| `serviceType` | [operations.MountsUpdateServiceType](../../models/operations/mountsupdateservicetype.md) | :heavy_minus_sign: | N/A | +| `mountPath` | *string* | :heavy_minus_sign: | N/A | +| `applicationId` | *string* | :heavy_minus_sign: | N/A | +| `postgresId` | *string* | :heavy_minus_sign: | N/A | +| `mariadbId` | *string* | :heavy_minus_sign: | N/A | +| `mongoId` | *string* | :heavy_minus_sign: | N/A | +| `mysqlId` | *string* | :heavy_minus_sign: | N/A | +| `redisId` | *string* | :heavy_minus_sign: | N/A | +| `composeId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mountsupdateservicetype.md b/docs/models/operations/mountsupdateservicetype.md new file mode 100644 index 0000000..46a11c9 --- /dev/null +++ b/docs/models/operations/mountsupdateservicetype.md @@ -0,0 +1,15 @@ +# MountsUpdateServiceType + +## Example Usage + +```typescript +import { MountsUpdateServiceType } from "dokploy/models/operations"; + +let value: MountsUpdateServiceType = "redis"; +``` + +## Values + +```typescript +"application" | "postgres" | "mysql" | "mariadb" | "mongo" | "redis" | "compose" +``` \ No newline at end of file diff --git a/docs/models/operations/mountsupdatetype.md b/docs/models/operations/mountsupdatetype.md new file mode 100644 index 0000000..cdcf24e --- /dev/null +++ b/docs/models/operations/mountsupdatetype.md @@ -0,0 +1,15 @@ +# MountsUpdateType + +## Example Usage + +```typescript +import { MountsUpdateType } from "dokploy/models/operations"; + +let value: MountsUpdateType = "file"; +``` + +## Values + +```typescript +"bind" | "volume" | "file" +``` \ No newline at end of file diff --git a/docs/models/operations/mysqlchangestatusapplicationstatus.md b/docs/models/operations/mysqlchangestatusapplicationstatus.md new file mode 100644 index 0000000..f952b4f --- /dev/null +++ b/docs/models/operations/mysqlchangestatusapplicationstatus.md @@ -0,0 +1,15 @@ +# MysqlChangeStatusApplicationStatus + +## Example Usage + +```typescript +import { MysqlChangeStatusApplicationStatus } from "dokploy/models/operations"; + +let value: MysqlChangeStatusApplicationStatus = "done"; +``` + +## Values + +```typescript +"idle" | "running" | "done" | "error" +``` \ No newline at end of file diff --git a/docs/models/operations/mysqlchangestatusrequest.md b/docs/models/operations/mysqlchangestatusrequest.md new file mode 100644 index 0000000..6fc37d5 --- /dev/null +++ b/docs/models/operations/mysqlchangestatusrequest.md @@ -0,0 +1,19 @@ +# MysqlChangeStatusRequest + +## Example Usage + +```typescript +import { MysqlChangeStatusRequest } from "dokploy/models/operations"; + +let value: MysqlChangeStatusRequest = { + mysqlId: "", + applicationStatus: "done", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `mysqlId` | *string* | :heavy_check_mark: | N/A | +| `applicationStatus` | [operations.MysqlChangeStatusApplicationStatus](../../models/operations/mysqlchangestatusapplicationstatus.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mysqlcreaterequest.md b/docs/models/operations/mysqlcreaterequest.md new file mode 100644 index 0000000..b45a97b --- /dev/null +++ b/docs/models/operations/mysqlcreaterequest.md @@ -0,0 +1,32 @@ +# MysqlCreateRequest + +## Example Usage + +```typescript +import { MysqlCreateRequest } from "dokploy/models/operations"; + +let value: MysqlCreateRequest = { + name: "", + appName: "", + projectId: "", + databaseName: "", + databaseUser: "", + databasePassword: "", + databaseRootPassword: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `name` | *string* | :heavy_check_mark: | N/A | +| `appName` | *string* | :heavy_check_mark: | N/A | +| `dockerImage` | *string* | :heavy_minus_sign: | N/A | +| `projectId` | *string* | :heavy_check_mark: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `databaseName` | *string* | :heavy_check_mark: | N/A | +| `databaseUser` | *string* | :heavy_check_mark: | N/A | +| `databasePassword` | *string* | :heavy_check_mark: | N/A | +| `databaseRootPassword` | *string* | :heavy_check_mark: | N/A | +| `serverId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mysqldeployrequest.md b/docs/models/operations/mysqldeployrequest.md new file mode 100644 index 0000000..b1f26e4 --- /dev/null +++ b/docs/models/operations/mysqldeployrequest.md @@ -0,0 +1,17 @@ +# MysqlDeployRequest + +## Example Usage + +```typescript +import { MysqlDeployRequest } from "dokploy/models/operations"; + +let value: MysqlDeployRequest = { + mysqlId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `mysqlId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mysqlonerequest.md b/docs/models/operations/mysqlonerequest.md new file mode 100644 index 0000000..50db51d --- /dev/null +++ b/docs/models/operations/mysqlonerequest.md @@ -0,0 +1,17 @@ +# MysqlOneRequest + +## Example Usage + +```typescript +import { MysqlOneRequest } from "dokploy/models/operations"; + +let value: MysqlOneRequest = { + mysqlId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `mysqlId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mysqlreloadrequest.md b/docs/models/operations/mysqlreloadrequest.md new file mode 100644 index 0000000..500f899 --- /dev/null +++ b/docs/models/operations/mysqlreloadrequest.md @@ -0,0 +1,19 @@ +# MysqlReloadRequest + +## Example Usage + +```typescript +import { MysqlReloadRequest } from "dokploy/models/operations"; + +let value: MysqlReloadRequest = { + mysqlId: "", + appName: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `mysqlId` | *string* | :heavy_check_mark: | N/A | +| `appName` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mysqlremoverequest.md b/docs/models/operations/mysqlremoverequest.md new file mode 100644 index 0000000..8d40201 --- /dev/null +++ b/docs/models/operations/mysqlremoverequest.md @@ -0,0 +1,17 @@ +# MysqlRemoveRequest + +## Example Usage + +```typescript +import { MysqlRemoveRequest } from "dokploy/models/operations"; + +let value: MysqlRemoveRequest = { + mysqlId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `mysqlId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mysqlsaveenvironmentrequest.md b/docs/models/operations/mysqlsaveenvironmentrequest.md new file mode 100644 index 0000000..ea4e1d7 --- /dev/null +++ b/docs/models/operations/mysqlsaveenvironmentrequest.md @@ -0,0 +1,18 @@ +# MysqlSaveEnvironmentRequest + +## Example Usage + +```typescript +import { MysqlSaveEnvironmentRequest } from "dokploy/models/operations"; + +let value: MysqlSaveEnvironmentRequest = { + mysqlId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `mysqlId` | *string* | :heavy_check_mark: | N/A | +| `env` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mysqlsaveexternalportrequest.md b/docs/models/operations/mysqlsaveexternalportrequest.md new file mode 100644 index 0000000..cadaf73 --- /dev/null +++ b/docs/models/operations/mysqlsaveexternalportrequest.md @@ -0,0 +1,19 @@ +# MysqlSaveExternalPortRequest + +## Example Usage + +```typescript +import { MysqlSaveExternalPortRequest } from "dokploy/models/operations"; + +let value: MysqlSaveExternalPortRequest = { + mysqlId: "", + externalPort: 4496.54, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `mysqlId` | *string* | :heavy_check_mark: | N/A | +| `externalPort` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mysqlstartrequest.md b/docs/models/operations/mysqlstartrequest.md new file mode 100644 index 0000000..88a0fef --- /dev/null +++ b/docs/models/operations/mysqlstartrequest.md @@ -0,0 +1,17 @@ +# MysqlStartRequest + +## Example Usage + +```typescript +import { MysqlStartRequest } from "dokploy/models/operations"; + +let value: MysqlStartRequest = { + mysqlId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `mysqlId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mysqlstoprequest.md b/docs/models/operations/mysqlstoprequest.md new file mode 100644 index 0000000..5990dac --- /dev/null +++ b/docs/models/operations/mysqlstoprequest.md @@ -0,0 +1,17 @@ +# MysqlStopRequest + +## Example Usage + +```typescript +import { MysqlStopRequest } from "dokploy/models/operations"; + +let value: MysqlStopRequest = { + mysqlId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `mysqlId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mysqlupdateapplicationstatus.md b/docs/models/operations/mysqlupdateapplicationstatus.md new file mode 100644 index 0000000..b06a860 --- /dev/null +++ b/docs/models/operations/mysqlupdateapplicationstatus.md @@ -0,0 +1,15 @@ +# MysqlUpdateApplicationStatus + +## Example Usage + +```typescript +import { MysqlUpdateApplicationStatus } from "dokploy/models/operations"; + +let value: MysqlUpdateApplicationStatus = "done"; +``` + +## Values + +```typescript +"idle" | "running" | "done" | "error" +``` \ No newline at end of file diff --git a/docs/models/operations/mysqlupdaterequest.md b/docs/models/operations/mysqlupdaterequest.md new file mode 100644 index 0000000..fd4c7c8 --- /dev/null +++ b/docs/models/operations/mysqlupdaterequest.md @@ -0,0 +1,35 @@ +# MysqlUpdateRequest + +## Example Usage + +```typescript +import { MysqlUpdateRequest } from "dokploy/models/operations"; + +let value: MysqlUpdateRequest = { + mysqlId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `mysqlId` | *string* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `appName` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `databaseName` | *string* | :heavy_minus_sign: | N/A | +| `databaseUser` | *string* | :heavy_minus_sign: | N/A | +| `databasePassword` | *string* | :heavy_minus_sign: | N/A | +| `databaseRootPassword` | *string* | :heavy_minus_sign: | N/A | +| `dockerImage` | *string* | :heavy_minus_sign: | N/A | +| `command` | *string* | :heavy_minus_sign: | N/A | +| `env` | *string* | :heavy_minus_sign: | N/A | +| `memoryReservation` | *number* | :heavy_minus_sign: | N/A | +| `memoryLimit` | *number* | :heavy_minus_sign: | N/A | +| `cpuReservation` | *number* | :heavy_minus_sign: | N/A | +| `cpuLimit` | *number* | :heavy_minus_sign: | N/A | +| `externalPort` | *number* | :heavy_minus_sign: | N/A | +| `applicationStatus` | [operations.MysqlUpdateApplicationStatus](../../models/operations/mysqlupdateapplicationstatus.md) | :heavy_minus_sign: | N/A | +| `createdAt` | *string* | :heavy_minus_sign: | N/A | +| `projectId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/networkswarm.md b/docs/models/operations/networkswarm.md new file mode 100644 index 0000000..12092c1 --- /dev/null +++ b/docs/models/operations/networkswarm.md @@ -0,0 +1,17 @@ +# NetworkSwarm + +## Example Usage + +```typescript +import { NetworkSwarm } from "dokploy/models/operations"; + +let value: NetworkSwarm = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `target` | *string* | :heavy_minus_sign: | N/A | +| `aliases` | *string*[] | :heavy_minus_sign: | N/A | +| `driverOpts` | [operations.DriverOpts](../../models/operations/driveropts.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/notificationcreatediscordrequest.md b/docs/models/operations/notificationcreatediscordrequest.md new file mode 100644 index 0000000..e5a2955 --- /dev/null +++ b/docs/models/operations/notificationcreatediscordrequest.md @@ -0,0 +1,29 @@ +# NotificationCreateDiscordRequest + +## Example Usage + +```typescript +import { NotificationCreateDiscordRequest } from "dokploy/models/operations"; + +let value: NotificationCreateDiscordRequest = { + appBuildError: false, + databaseBackup: true, + dokployRestart: false, + name: "", + appDeploy: true, + dockerCleanup: false, + webhookUrl: "https://weary-mom.org", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `appBuildError` | *boolean* | :heavy_check_mark: | N/A | +| `databaseBackup` | *boolean* | :heavy_check_mark: | N/A | +| `dokployRestart` | *boolean* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_check_mark: | N/A | +| `appDeploy` | *boolean* | :heavy_check_mark: | N/A | +| `dockerCleanup` | *boolean* | :heavy_check_mark: | N/A | +| `webhookUrl` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/notificationcreateemailrequest.md b/docs/models/operations/notificationcreateemailrequest.md new file mode 100644 index 0000000..d2eb356 --- /dev/null +++ b/docs/models/operations/notificationcreateemailrequest.md @@ -0,0 +1,39 @@ +# NotificationCreateEmailRequest + +## Example Usage + +```typescript +import { NotificationCreateEmailRequest } from "dokploy/models/operations"; + +let value: NotificationCreateEmailRequest = { + appBuildError: false, + databaseBackup: true, + dokployRestart: true, + name: "", + appDeploy: false, + dockerCleanup: true, + smtpServer: "", + smtpPort: 5296.17, + username: "Warren_Bode30", + password: "_Zxu4oWSujorkpz", + fromAddress: "", + toAddresses: [], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `appBuildError` | *boolean* | :heavy_check_mark: | N/A | +| `databaseBackup` | *boolean* | :heavy_check_mark: | N/A | +| `dokployRestart` | *boolean* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_check_mark: | N/A | +| `appDeploy` | *boolean* | :heavy_check_mark: | N/A | +| `dockerCleanup` | *boolean* | :heavy_check_mark: | N/A | +| `smtpServer` | *string* | :heavy_check_mark: | N/A | +| `smtpPort` | *number* | :heavy_check_mark: | N/A | +| `username` | *string* | :heavy_check_mark: | N/A | +| `password` | *string* | :heavy_check_mark: | N/A | +| `fromAddress` | *string* | :heavy_check_mark: | N/A | +| `toAddresses` | *string*[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/notificationcreateslackrequest.md b/docs/models/operations/notificationcreateslackrequest.md new file mode 100644 index 0000000..7ecf817 --- /dev/null +++ b/docs/models/operations/notificationcreateslackrequest.md @@ -0,0 +1,31 @@ +# NotificationCreateSlackRequest + +## Example Usage + +```typescript +import { NotificationCreateSlackRequest } from "dokploy/models/operations"; + +let value: NotificationCreateSlackRequest = { + appBuildError: true, + databaseBackup: true, + dokployRestart: false, + name: "", + appDeploy: false, + dockerCleanup: false, + webhookUrl: "https://average-scorpion.net", + channel: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `appBuildError` | *boolean* | :heavy_check_mark: | N/A | +| `databaseBackup` | *boolean* | :heavy_check_mark: | N/A | +| `dokployRestart` | *boolean* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_check_mark: | N/A | +| `appDeploy` | *boolean* | :heavy_check_mark: | N/A | +| `dockerCleanup` | *boolean* | :heavy_check_mark: | N/A | +| `webhookUrl` | *string* | :heavy_check_mark: | N/A | +| `channel` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/notificationcreatetelegramrequest.md b/docs/models/operations/notificationcreatetelegramrequest.md new file mode 100644 index 0000000..5425810 --- /dev/null +++ b/docs/models/operations/notificationcreatetelegramrequest.md @@ -0,0 +1,31 @@ +# NotificationCreateTelegramRequest + +## Example Usage + +```typescript +import { NotificationCreateTelegramRequest } from "dokploy/models/operations"; + +let value: NotificationCreateTelegramRequest = { + appBuildError: true, + databaseBackup: false, + dokployRestart: true, + name: "", + appDeploy: true, + dockerCleanup: false, + botToken: "", + chatId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `appBuildError` | *boolean* | :heavy_check_mark: | N/A | +| `databaseBackup` | *boolean* | :heavy_check_mark: | N/A | +| `dokployRestart` | *boolean* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_check_mark: | N/A | +| `appDeploy` | *boolean* | :heavy_check_mark: | N/A | +| `dockerCleanup` | *boolean* | :heavy_check_mark: | N/A | +| `botToken` | *string* | :heavy_check_mark: | N/A | +| `chatId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/notificationonerequest.md b/docs/models/operations/notificationonerequest.md new file mode 100644 index 0000000..f8ee370 --- /dev/null +++ b/docs/models/operations/notificationonerequest.md @@ -0,0 +1,17 @@ +# NotificationOneRequest + +## Example Usage + +```typescript +import { NotificationOneRequest } from "dokploy/models/operations"; + +let value: NotificationOneRequest = { + notificationId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `notificationId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/notificationremoverequest.md b/docs/models/operations/notificationremoverequest.md new file mode 100644 index 0000000..34c738f --- /dev/null +++ b/docs/models/operations/notificationremoverequest.md @@ -0,0 +1,17 @@ +# NotificationRemoveRequest + +## Example Usage + +```typescript +import { NotificationRemoveRequest } from "dokploy/models/operations"; + +let value: NotificationRemoveRequest = { + notificationId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `notificationId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/notificationtestdiscordconnectionrequest.md b/docs/models/operations/notificationtestdiscordconnectionrequest.md new file mode 100644 index 0000000..6c9728d --- /dev/null +++ b/docs/models/operations/notificationtestdiscordconnectionrequest.md @@ -0,0 +1,17 @@ +# NotificationTestDiscordConnectionRequest + +## Example Usage + +```typescript +import { NotificationTestDiscordConnectionRequest } from "dokploy/models/operations"; + +let value: NotificationTestDiscordConnectionRequest = { + webhookUrl: "https://sick-cross-contamination.name/", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `webhookUrl` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/notificationtestemailconnectionrequest.md b/docs/models/operations/notificationtestemailconnectionrequest.md new file mode 100644 index 0000000..fc7c5ba --- /dev/null +++ b/docs/models/operations/notificationtestemailconnectionrequest.md @@ -0,0 +1,29 @@ +# NotificationTestEmailConnectionRequest + +## Example Usage + +```typescript +import { NotificationTestEmailConnectionRequest } from "dokploy/models/operations"; + +let value: NotificationTestEmailConnectionRequest = { + smtpServer: "", + smtpPort: 364.16, + username: "Nadia_Ankunding25", + password: "5PL6U1ez0w7XvQ1", + toAddresses: [ + "", + ], + fromAddress: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `smtpServer` | *string* | :heavy_check_mark: | N/A | +| `smtpPort` | *number* | :heavy_check_mark: | N/A | +| `username` | *string* | :heavy_check_mark: | N/A | +| `password` | *string* | :heavy_check_mark: | N/A | +| `toAddresses` | *string*[] | :heavy_check_mark: | N/A | +| `fromAddress` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/notificationtestslackconnectionrequest.md b/docs/models/operations/notificationtestslackconnectionrequest.md new file mode 100644 index 0000000..7fd60ab --- /dev/null +++ b/docs/models/operations/notificationtestslackconnectionrequest.md @@ -0,0 +1,19 @@ +# NotificationTestSlackConnectionRequest + +## Example Usage + +```typescript +import { NotificationTestSlackConnectionRequest } from "dokploy/models/operations"; + +let value: NotificationTestSlackConnectionRequest = { + webhookUrl: "https://exhausted-baseboard.org", + channel: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `webhookUrl` | *string* | :heavy_check_mark: | N/A | +| `channel` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/notificationtesttelegramconnectionrequest.md b/docs/models/operations/notificationtesttelegramconnectionrequest.md new file mode 100644 index 0000000..37e6ef4 --- /dev/null +++ b/docs/models/operations/notificationtesttelegramconnectionrequest.md @@ -0,0 +1,19 @@ +# NotificationTestTelegramConnectionRequest + +## Example Usage + +```typescript +import { NotificationTestTelegramConnectionRequest } from "dokploy/models/operations"; + +let value: NotificationTestTelegramConnectionRequest = { + botToken: "", + chatId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `botToken` | *string* | :heavy_check_mark: | N/A | +| `chatId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/notificationupdatediscordrequest.md b/docs/models/operations/notificationupdatediscordrequest.md new file mode 100644 index 0000000..124083c --- /dev/null +++ b/docs/models/operations/notificationupdatediscordrequest.md @@ -0,0 +1,27 @@ +# NotificationUpdateDiscordRequest + +## Example Usage + +```typescript +import { NotificationUpdateDiscordRequest } from "dokploy/models/operations"; + +let value: NotificationUpdateDiscordRequest = { + notificationId: "", + discordId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `appBuildError` | *boolean* | :heavy_minus_sign: | N/A | +| `databaseBackup` | *boolean* | :heavy_minus_sign: | N/A | +| `dokployRestart` | *boolean* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `appDeploy` | *boolean* | :heavy_minus_sign: | N/A | +| `dockerCleanup` | *boolean* | :heavy_minus_sign: | N/A | +| `webhookUrl` | *string* | :heavy_minus_sign: | N/A | +| `notificationId` | *string* | :heavy_check_mark: | N/A | +| `discordId` | *string* | :heavy_check_mark: | N/A | +| `adminId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/notificationupdateemailrequest.md b/docs/models/operations/notificationupdateemailrequest.md new file mode 100644 index 0000000..ecde3f8 --- /dev/null +++ b/docs/models/operations/notificationupdateemailrequest.md @@ -0,0 +1,32 @@ +# NotificationUpdateEmailRequest + +## Example Usage + +```typescript +import { NotificationUpdateEmailRequest } from "dokploy/models/operations"; + +let value: NotificationUpdateEmailRequest = { + notificationId: "", + emailId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `appBuildError` | *boolean* | :heavy_minus_sign: | N/A | +| `databaseBackup` | *boolean* | :heavy_minus_sign: | N/A | +| `dokployRestart` | *boolean* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `appDeploy` | *boolean* | :heavy_minus_sign: | N/A | +| `dockerCleanup` | *boolean* | :heavy_minus_sign: | N/A | +| `smtpServer` | *string* | :heavy_minus_sign: | N/A | +| `smtpPort` | *number* | :heavy_minus_sign: | N/A | +| `username` | *string* | :heavy_minus_sign: | N/A | +| `password` | *string* | :heavy_minus_sign: | N/A | +| `fromAddress` | *string* | :heavy_minus_sign: | N/A | +| `toAddresses` | *string*[] | :heavy_minus_sign: | N/A | +| `notificationId` | *string* | :heavy_check_mark: | N/A | +| `emailId` | *string* | :heavy_check_mark: | N/A | +| `adminId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/notificationupdateslackrequest.md b/docs/models/operations/notificationupdateslackrequest.md new file mode 100644 index 0000000..9c104a1 --- /dev/null +++ b/docs/models/operations/notificationupdateslackrequest.md @@ -0,0 +1,28 @@ +# NotificationUpdateSlackRequest + +## Example Usage + +```typescript +import { NotificationUpdateSlackRequest } from "dokploy/models/operations"; + +let value: NotificationUpdateSlackRequest = { + notificationId: "", + slackId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `appBuildError` | *boolean* | :heavy_minus_sign: | N/A | +| `databaseBackup` | *boolean* | :heavy_minus_sign: | N/A | +| `dokployRestart` | *boolean* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `appDeploy` | *boolean* | :heavy_minus_sign: | N/A | +| `dockerCleanup` | *boolean* | :heavy_minus_sign: | N/A | +| `webhookUrl` | *string* | :heavy_minus_sign: | N/A | +| `channel` | *string* | :heavy_minus_sign: | N/A | +| `notificationId` | *string* | :heavy_check_mark: | N/A | +| `slackId` | *string* | :heavy_check_mark: | N/A | +| `adminId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/notificationupdatetelegramrequest.md b/docs/models/operations/notificationupdatetelegramrequest.md new file mode 100644 index 0000000..d8dab8f --- /dev/null +++ b/docs/models/operations/notificationupdatetelegramrequest.md @@ -0,0 +1,28 @@ +# NotificationUpdateTelegramRequest + +## Example Usage + +```typescript +import { NotificationUpdateTelegramRequest } from "dokploy/models/operations"; + +let value: NotificationUpdateTelegramRequest = { + notificationId: "", + telegramId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `appBuildError` | *boolean* | :heavy_minus_sign: | N/A | +| `databaseBackup` | *boolean* | :heavy_minus_sign: | N/A | +| `dokployRestart` | *boolean* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `appDeploy` | *boolean* | :heavy_minus_sign: | N/A | +| `dockerCleanup` | *boolean* | :heavy_minus_sign: | N/A | +| `botToken` | *string* | :heavy_minus_sign: | N/A | +| `chatId` | *string* | :heavy_minus_sign: | N/A | +| `notificationId` | *string* | :heavy_check_mark: | N/A | +| `telegramId` | *string* | :heavy_check_mark: | N/A | +| `adminId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/placementswarm.md b/docs/models/operations/placementswarm.md new file mode 100644 index 0000000..7527263 --- /dev/null +++ b/docs/models/operations/placementswarm.md @@ -0,0 +1,18 @@ +# PlacementSwarm + +## Example Usage + +```typescript +import { PlacementSwarm } from "dokploy/models/operations"; + +let value: PlacementSwarm = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `constraints` | *string*[] | :heavy_minus_sign: | N/A | +| `preferences` | [operations.Preference](../../models/operations/preference.md)[] | :heavy_minus_sign: | N/A | +| `maxReplicas` | *number* | :heavy_minus_sign: | N/A | +| `platforms` | [operations.Platform](../../models/operations/platform.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/platform.md b/docs/models/operations/platform.md new file mode 100644 index 0000000..155c7ae --- /dev/null +++ b/docs/models/operations/platform.md @@ -0,0 +1,19 @@ +# Platform + +## Example Usage + +```typescript +import { Platform } from "dokploy/models/operations"; + +let value: Platform = { + architecture: "", + os: "Windows Phone", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `architecture` | *string* | :heavy_check_mark: | N/A | +| `os` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/portcreateprotocol.md b/docs/models/operations/portcreateprotocol.md new file mode 100644 index 0000000..f68b247 --- /dev/null +++ b/docs/models/operations/portcreateprotocol.md @@ -0,0 +1,15 @@ +# PortCreateProtocol + +## Example Usage + +```typescript +import { PortCreateProtocol } from "dokploy/models/operations"; + +let value: PortCreateProtocol = "tcp"; +``` + +## Values + +```typescript +"tcp" | "udp" +``` \ No newline at end of file diff --git a/docs/models/operations/portcreaterequest.md b/docs/models/operations/portcreaterequest.md new file mode 100644 index 0000000..e270f2e --- /dev/null +++ b/docs/models/operations/portcreaterequest.md @@ -0,0 +1,22 @@ +# PortCreateRequest + +## Example Usage + +```typescript +import { PortCreateRequest } from "dokploy/models/operations"; + +let value: PortCreateRequest = { + publishedPort: 1244.1, + targetPort: 6872.55, + applicationId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `publishedPort` | *number* | :heavy_check_mark: | N/A | +| `targetPort` | *number* | :heavy_check_mark: | N/A | +| `protocol` | [operations.PortCreateProtocol](../../models/operations/portcreateprotocol.md) | :heavy_minus_sign: | N/A | +| `applicationId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/portdeleterequest.md b/docs/models/operations/portdeleterequest.md new file mode 100644 index 0000000..e68aaf9 --- /dev/null +++ b/docs/models/operations/portdeleterequest.md @@ -0,0 +1,17 @@ +# PortDeleteRequest + +## Example Usage + +```typescript +import { PortDeleteRequest } from "dokploy/models/operations"; + +let value: PortDeleteRequest = { + portId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `portId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/portonerequest.md b/docs/models/operations/portonerequest.md new file mode 100644 index 0000000..42ffab1 --- /dev/null +++ b/docs/models/operations/portonerequest.md @@ -0,0 +1,17 @@ +# PortOneRequest + +## Example Usage + +```typescript +import { PortOneRequest } from "dokploy/models/operations"; + +let value: PortOneRequest = { + portId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `portId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/portupdateprotocol.md b/docs/models/operations/portupdateprotocol.md new file mode 100644 index 0000000..b4e638a --- /dev/null +++ b/docs/models/operations/portupdateprotocol.md @@ -0,0 +1,15 @@ +# PortUpdateProtocol + +## Example Usage + +```typescript +import { PortUpdateProtocol } from "dokploy/models/operations"; + +let value: PortUpdateProtocol = "udp"; +``` + +## Values + +```typescript +"tcp" | "udp" +``` \ No newline at end of file diff --git a/docs/models/operations/portupdaterequest.md b/docs/models/operations/portupdaterequest.md new file mode 100644 index 0000000..d99ca06 --- /dev/null +++ b/docs/models/operations/portupdaterequest.md @@ -0,0 +1,22 @@ +# PortUpdateRequest + +## Example Usage + +```typescript +import { PortUpdateRequest } from "dokploy/models/operations"; + +let value: PortUpdateRequest = { + portId: "", + publishedPort: 8649.89, + targetPort: 6568.3, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `portId` | *string* | :heavy_check_mark: | N/A | +| `publishedPort` | *number* | :heavy_check_mark: | N/A | +| `targetPort` | *number* | :heavy_check_mark: | N/A | +| `protocol` | [operations.PortUpdateProtocol](../../models/operations/portupdateprotocol.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/postgreschangestatusapplicationstatus.md b/docs/models/operations/postgreschangestatusapplicationstatus.md new file mode 100644 index 0000000..982977a --- /dev/null +++ b/docs/models/operations/postgreschangestatusapplicationstatus.md @@ -0,0 +1,15 @@ +# PostgresChangeStatusApplicationStatus + +## Example Usage + +```typescript +import { PostgresChangeStatusApplicationStatus } from "dokploy/models/operations"; + +let value: PostgresChangeStatusApplicationStatus = "idle"; +``` + +## Values + +```typescript +"idle" | "running" | "done" | "error" +``` \ No newline at end of file diff --git a/docs/models/operations/postgreschangestatusrequest.md b/docs/models/operations/postgreschangestatusrequest.md new file mode 100644 index 0000000..65af65c --- /dev/null +++ b/docs/models/operations/postgreschangestatusrequest.md @@ -0,0 +1,19 @@ +# PostgresChangeStatusRequest + +## Example Usage + +```typescript +import { PostgresChangeStatusRequest } from "dokploy/models/operations"; + +let value: PostgresChangeStatusRequest = { + postgresId: "", + applicationStatus: "idle", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `postgresId` | *string* | :heavy_check_mark: | N/A | +| `applicationStatus` | [operations.PostgresChangeStatusApplicationStatus](../../models/operations/postgreschangestatusapplicationstatus.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/postgrescreaterequest.md b/docs/models/operations/postgrescreaterequest.md new file mode 100644 index 0000000..9d6594f --- /dev/null +++ b/docs/models/operations/postgrescreaterequest.md @@ -0,0 +1,30 @@ +# PostgresCreateRequest + +## Example Usage + +```typescript +import { PostgresCreateRequest } from "dokploy/models/operations"; + +let value: PostgresCreateRequest = { + name: "", + appName: "", + databaseName: "", + databaseUser: "", + databasePassword: "", + projectId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *string* | :heavy_check_mark: | N/A | +| `appName` | *string* | :heavy_check_mark: | N/A | +| `databaseName` | *string* | :heavy_check_mark: | N/A | +| `databaseUser` | *string* | :heavy_check_mark: | N/A | +| `databasePassword` | *string* | :heavy_check_mark: | N/A | +| `dockerImage` | *string* | :heavy_minus_sign: | N/A | +| `projectId` | *string* | :heavy_check_mark: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `serverId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/postgresdeployrequest.md b/docs/models/operations/postgresdeployrequest.md new file mode 100644 index 0000000..5f8bb3d --- /dev/null +++ b/docs/models/operations/postgresdeployrequest.md @@ -0,0 +1,17 @@ +# PostgresDeployRequest + +## Example Usage + +```typescript +import { PostgresDeployRequest } from "dokploy/models/operations"; + +let value: PostgresDeployRequest = { + postgresId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `postgresId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/postgresonerequest.md b/docs/models/operations/postgresonerequest.md new file mode 100644 index 0000000..6f61fa9 --- /dev/null +++ b/docs/models/operations/postgresonerequest.md @@ -0,0 +1,17 @@ +# PostgresOneRequest + +## Example Usage + +```typescript +import { PostgresOneRequest } from "dokploy/models/operations"; + +let value: PostgresOneRequest = { + postgresId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `postgresId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/postgresreloadrequest.md b/docs/models/operations/postgresreloadrequest.md new file mode 100644 index 0000000..3b1eddf --- /dev/null +++ b/docs/models/operations/postgresreloadrequest.md @@ -0,0 +1,19 @@ +# PostgresReloadRequest + +## Example Usage + +```typescript +import { PostgresReloadRequest } from "dokploy/models/operations"; + +let value: PostgresReloadRequest = { + postgresId: "", + appName: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `postgresId` | *string* | :heavy_check_mark: | N/A | +| `appName` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/postgresremoverequest.md b/docs/models/operations/postgresremoverequest.md new file mode 100644 index 0000000..ef7eb62 --- /dev/null +++ b/docs/models/operations/postgresremoverequest.md @@ -0,0 +1,17 @@ +# PostgresRemoveRequest + +## Example Usage + +```typescript +import { PostgresRemoveRequest } from "dokploy/models/operations"; + +let value: PostgresRemoveRequest = { + postgresId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `postgresId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/postgressaveenvironmentrequest.md b/docs/models/operations/postgressaveenvironmentrequest.md new file mode 100644 index 0000000..cca2041 --- /dev/null +++ b/docs/models/operations/postgressaveenvironmentrequest.md @@ -0,0 +1,18 @@ +# PostgresSaveEnvironmentRequest + +## Example Usage + +```typescript +import { PostgresSaveEnvironmentRequest } from "dokploy/models/operations"; + +let value: PostgresSaveEnvironmentRequest = { + postgresId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `postgresId` | *string* | :heavy_check_mark: | N/A | +| `env` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/postgressaveexternalportrequest.md b/docs/models/operations/postgressaveexternalportrequest.md new file mode 100644 index 0000000..13a486c --- /dev/null +++ b/docs/models/operations/postgressaveexternalportrequest.md @@ -0,0 +1,19 @@ +# PostgresSaveExternalPortRequest + +## Example Usage + +```typescript +import { PostgresSaveExternalPortRequest } from "dokploy/models/operations"; + +let value: PostgresSaveExternalPortRequest = { + postgresId: "", + externalPort: 4252.53, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `postgresId` | *string* | :heavy_check_mark: | N/A | +| `externalPort` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/postgresstartrequest.md b/docs/models/operations/postgresstartrequest.md new file mode 100644 index 0000000..4fa3490 --- /dev/null +++ b/docs/models/operations/postgresstartrequest.md @@ -0,0 +1,17 @@ +# PostgresStartRequest + +## Example Usage + +```typescript +import { PostgresStartRequest } from "dokploy/models/operations"; + +let value: PostgresStartRequest = { + postgresId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `postgresId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/postgresstoprequest.md b/docs/models/operations/postgresstoprequest.md new file mode 100644 index 0000000..227664f --- /dev/null +++ b/docs/models/operations/postgresstoprequest.md @@ -0,0 +1,17 @@ +# PostgresStopRequest + +## Example Usage + +```typescript +import { PostgresStopRequest } from "dokploy/models/operations"; + +let value: PostgresStopRequest = { + postgresId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `postgresId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/postgresupdateapplicationstatus.md b/docs/models/operations/postgresupdateapplicationstatus.md new file mode 100644 index 0000000..afb2ae5 --- /dev/null +++ b/docs/models/operations/postgresupdateapplicationstatus.md @@ -0,0 +1,15 @@ +# PostgresUpdateApplicationStatus + +## Example Usage + +```typescript +import { PostgresUpdateApplicationStatus } from "dokploy/models/operations"; + +let value: PostgresUpdateApplicationStatus = "error"; +``` + +## Values + +```typescript +"idle" | "running" | "done" | "error" +``` \ No newline at end of file diff --git a/docs/models/operations/postgresupdaterequest.md b/docs/models/operations/postgresupdaterequest.md new file mode 100644 index 0000000..7233055 --- /dev/null +++ b/docs/models/operations/postgresupdaterequest.md @@ -0,0 +1,34 @@ +# PostgresUpdateRequest + +## Example Usage + +```typescript +import { PostgresUpdateRequest } from "dokploy/models/operations"; + +let value: PostgresUpdateRequest = { + postgresId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `postgresId` | *string* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `appName` | *string* | :heavy_minus_sign: | N/A | +| `databaseName` | *string* | :heavy_minus_sign: | N/A | +| `databaseUser` | *string* | :heavy_minus_sign: | N/A | +| `databasePassword` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `dockerImage` | *string* | :heavy_minus_sign: | N/A | +| `command` | *string* | :heavy_minus_sign: | N/A | +| `env` | *string* | :heavy_minus_sign: | N/A | +| `memoryReservation` | *number* | :heavy_minus_sign: | N/A | +| `externalPort` | *number* | :heavy_minus_sign: | N/A | +| `memoryLimit` | *number* | :heavy_minus_sign: | N/A | +| `cpuReservation` | *number* | :heavy_minus_sign: | N/A | +| `cpuLimit` | *number* | :heavy_minus_sign: | N/A | +| `applicationStatus` | [operations.PostgresUpdateApplicationStatus](../../models/operations/postgresupdateapplicationstatus.md) | :heavy_minus_sign: | N/A | +| `createdAt` | *string* | :heavy_minus_sign: | N/A | +| `projectId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/preference.md b/docs/models/operations/preference.md new file mode 100644 index 0000000..476043e --- /dev/null +++ b/docs/models/operations/preference.md @@ -0,0 +1,19 @@ +# Preference + +## Example Usage + +```typescript +import { Preference } from "dokploy/models/operations"; + +let value: Preference = { + spread: { + spreadDescriptor: "", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `spread` | [operations.Spread](../../models/operations/spread.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/projectcreaterequest.md b/docs/models/operations/projectcreaterequest.md new file mode 100644 index 0000000..2d47fd5 --- /dev/null +++ b/docs/models/operations/projectcreaterequest.md @@ -0,0 +1,18 @@ +# ProjectCreateRequest + +## Example Usage + +```typescript +import { ProjectCreateRequest } from "dokploy/models/operations"; + +let value: ProjectCreateRequest = { + name: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *string* | :heavy_check_mark: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/projectonerequest.md b/docs/models/operations/projectonerequest.md new file mode 100644 index 0000000..ed797e6 --- /dev/null +++ b/docs/models/operations/projectonerequest.md @@ -0,0 +1,17 @@ +# ProjectOneRequest + +## Example Usage + +```typescript +import { ProjectOneRequest } from "dokploy/models/operations"; + +let value: ProjectOneRequest = { + projectId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `projectId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/projectremoverequest.md b/docs/models/operations/projectremoverequest.md new file mode 100644 index 0000000..bc45605 --- /dev/null +++ b/docs/models/operations/projectremoverequest.md @@ -0,0 +1,17 @@ +# ProjectRemoveRequest + +## Example Usage + +```typescript +import { ProjectRemoveRequest } from "dokploy/models/operations"; + +let value: ProjectRemoveRequest = { + projectId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `projectId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/projectupdaterequest.md b/docs/models/operations/projectupdaterequest.md new file mode 100644 index 0000000..41f806c --- /dev/null +++ b/docs/models/operations/projectupdaterequest.md @@ -0,0 +1,20 @@ +# ProjectUpdateRequest + +## Example Usage + +```typescript +import { ProjectUpdateRequest } from "dokploy/models/operations"; + +let value: ProjectUpdateRequest = { + name: "", + projectId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *string* | :heavy_check_mark: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `projectId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/redirectscreaterequest.md b/docs/models/operations/redirectscreaterequest.md new file mode 100644 index 0000000..7886a3e --- /dev/null +++ b/docs/models/operations/redirectscreaterequest.md @@ -0,0 +1,23 @@ +# RedirectsCreateRequest + +## Example Usage + +```typescript +import { RedirectsCreateRequest } from "dokploy/models/operations"; + +let value: RedirectsCreateRequest = { + regex: "", + replacement: "", + permanent: true, + applicationId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `regex` | *string* | :heavy_check_mark: | N/A | +| `replacement` | *string* | :heavy_check_mark: | N/A | +| `permanent` | *boolean* | :heavy_check_mark: | N/A | +| `applicationId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/redirectsdeleterequest.md b/docs/models/operations/redirectsdeleterequest.md new file mode 100644 index 0000000..b612eec --- /dev/null +++ b/docs/models/operations/redirectsdeleterequest.md @@ -0,0 +1,17 @@ +# RedirectsDeleteRequest + +## Example Usage + +```typescript +import { RedirectsDeleteRequest } from "dokploy/models/operations"; + +let value: RedirectsDeleteRequest = { + redirectId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `redirectId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/redirectsonerequest.md b/docs/models/operations/redirectsonerequest.md new file mode 100644 index 0000000..53c0a56 --- /dev/null +++ b/docs/models/operations/redirectsonerequest.md @@ -0,0 +1,17 @@ +# RedirectsOneRequest + +## Example Usage + +```typescript +import { RedirectsOneRequest } from "dokploy/models/operations"; + +let value: RedirectsOneRequest = { + redirectId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `redirectId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/redirectsupdaterequest.md b/docs/models/operations/redirectsupdaterequest.md new file mode 100644 index 0000000..aa3e4c5 --- /dev/null +++ b/docs/models/operations/redirectsupdaterequest.md @@ -0,0 +1,23 @@ +# RedirectsUpdateRequest + +## Example Usage + +```typescript +import { RedirectsUpdateRequest } from "dokploy/models/operations"; + +let value: RedirectsUpdateRequest = { + redirectId: "", + regex: "", + replacement: "", + permanent: false, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `redirectId` | *string* | :heavy_check_mark: | N/A | +| `regex` | *string* | :heavy_check_mark: | N/A | +| `replacement` | *string* | :heavy_check_mark: | N/A | +| `permanent` | *boolean* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/redischangestatusapplicationstatus.md b/docs/models/operations/redischangestatusapplicationstatus.md new file mode 100644 index 0000000..5577af4 --- /dev/null +++ b/docs/models/operations/redischangestatusapplicationstatus.md @@ -0,0 +1,15 @@ +# RedisChangeStatusApplicationStatus + +## Example Usage + +```typescript +import { RedisChangeStatusApplicationStatus } from "dokploy/models/operations"; + +let value: RedisChangeStatusApplicationStatus = "done"; +``` + +## Values + +```typescript +"idle" | "running" | "done" | "error" +``` \ No newline at end of file diff --git a/docs/models/operations/redischangestatusrequest.md b/docs/models/operations/redischangestatusrequest.md new file mode 100644 index 0000000..233029d --- /dev/null +++ b/docs/models/operations/redischangestatusrequest.md @@ -0,0 +1,19 @@ +# RedisChangeStatusRequest + +## Example Usage + +```typescript +import { RedisChangeStatusRequest } from "dokploy/models/operations"; + +let value: RedisChangeStatusRequest = { + redisId: "", + applicationStatus: "idle", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `redisId` | *string* | :heavy_check_mark: | N/A | +| `applicationStatus` | [operations.RedisChangeStatusApplicationStatus](../../models/operations/redischangestatusapplicationstatus.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/rediscreaterequest.md b/docs/models/operations/rediscreaterequest.md new file mode 100644 index 0000000..88cfb8c --- /dev/null +++ b/docs/models/operations/rediscreaterequest.md @@ -0,0 +1,26 @@ +# RedisCreateRequest + +## Example Usage + +```typescript +import { RedisCreateRequest } from "dokploy/models/operations"; + +let value: RedisCreateRequest = { + name: "", + appName: "", + databasePassword: "", + projectId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *string* | :heavy_check_mark: | N/A | +| `appName` | *string* | :heavy_check_mark: | N/A | +| `databasePassword` | *string* | :heavy_check_mark: | N/A | +| `dockerImage` | *string* | :heavy_minus_sign: | N/A | +| `projectId` | *string* | :heavy_check_mark: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `serverId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/redisdeployrequest.md b/docs/models/operations/redisdeployrequest.md new file mode 100644 index 0000000..4d70d2e --- /dev/null +++ b/docs/models/operations/redisdeployrequest.md @@ -0,0 +1,17 @@ +# RedisDeployRequest + +## Example Usage + +```typescript +import { RedisDeployRequest } from "dokploy/models/operations"; + +let value: RedisDeployRequest = { + redisId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `redisId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/redisonerequest.md b/docs/models/operations/redisonerequest.md new file mode 100644 index 0000000..17e4c9b --- /dev/null +++ b/docs/models/operations/redisonerequest.md @@ -0,0 +1,17 @@ +# RedisOneRequest + +## Example Usage + +```typescript +import { RedisOneRequest } from "dokploy/models/operations"; + +let value: RedisOneRequest = { + redisId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `redisId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/redisreloadrequest.md b/docs/models/operations/redisreloadrequest.md new file mode 100644 index 0000000..fa0bd7d --- /dev/null +++ b/docs/models/operations/redisreloadrequest.md @@ -0,0 +1,19 @@ +# RedisReloadRequest + +## Example Usage + +```typescript +import { RedisReloadRequest } from "dokploy/models/operations"; + +let value: RedisReloadRequest = { + redisId: "", + appName: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `redisId` | *string* | :heavy_check_mark: | N/A | +| `appName` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/redisremoverequest.md b/docs/models/operations/redisremoverequest.md new file mode 100644 index 0000000..89a1cc8 --- /dev/null +++ b/docs/models/operations/redisremoverequest.md @@ -0,0 +1,17 @@ +# RedisRemoveRequest + +## Example Usage + +```typescript +import { RedisRemoveRequest } from "dokploy/models/operations"; + +let value: RedisRemoveRequest = { + redisId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `redisId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/redissaveenvironmentrequest.md b/docs/models/operations/redissaveenvironmentrequest.md new file mode 100644 index 0000000..d3a29b1 --- /dev/null +++ b/docs/models/operations/redissaveenvironmentrequest.md @@ -0,0 +1,18 @@ +# RedisSaveEnvironmentRequest + +## Example Usage + +```typescript +import { RedisSaveEnvironmentRequest } from "dokploy/models/operations"; + +let value: RedisSaveEnvironmentRequest = { + redisId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `redisId` | *string* | :heavy_check_mark: | N/A | +| `env` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/redissaveexternalportrequest.md b/docs/models/operations/redissaveexternalportrequest.md new file mode 100644 index 0000000..0eef12b --- /dev/null +++ b/docs/models/operations/redissaveexternalportrequest.md @@ -0,0 +1,19 @@ +# RedisSaveExternalPortRequest + +## Example Usage + +```typescript +import { RedisSaveExternalPortRequest } from "dokploy/models/operations"; + +let value: RedisSaveExternalPortRequest = { + redisId: "", + externalPort: 3649, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `redisId` | *string* | :heavy_check_mark: | N/A | +| `externalPort` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/redisstartrequest.md b/docs/models/operations/redisstartrequest.md new file mode 100644 index 0000000..f87625c --- /dev/null +++ b/docs/models/operations/redisstartrequest.md @@ -0,0 +1,17 @@ +# RedisStartRequest + +## Example Usage + +```typescript +import { RedisStartRequest } from "dokploy/models/operations"; + +let value: RedisStartRequest = { + redisId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `redisId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/redisstoprequest.md b/docs/models/operations/redisstoprequest.md new file mode 100644 index 0000000..f4e839c --- /dev/null +++ b/docs/models/operations/redisstoprequest.md @@ -0,0 +1,17 @@ +# RedisStopRequest + +## Example Usage + +```typescript +import { RedisStopRequest } from "dokploy/models/operations"; + +let value: RedisStopRequest = { + redisId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `redisId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/redisupdateapplicationstatus.md b/docs/models/operations/redisupdateapplicationstatus.md new file mode 100644 index 0000000..273a77f --- /dev/null +++ b/docs/models/operations/redisupdateapplicationstatus.md @@ -0,0 +1,15 @@ +# RedisUpdateApplicationStatus + +## Example Usage + +```typescript +import { RedisUpdateApplicationStatus } from "dokploy/models/operations"; + +let value: RedisUpdateApplicationStatus = "idle"; +``` + +## Values + +```typescript +"idle" | "running" | "done" | "error" +``` \ No newline at end of file diff --git a/docs/models/operations/redisupdaterequest.md b/docs/models/operations/redisupdaterequest.md new file mode 100644 index 0000000..0d45f40 --- /dev/null +++ b/docs/models/operations/redisupdaterequest.md @@ -0,0 +1,32 @@ +# RedisUpdateRequest + +## Example Usage + +```typescript +import { RedisUpdateRequest } from "dokploy/models/operations"; + +let value: RedisUpdateRequest = { + redisId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `redisId` | *string* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `appName` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `databasePassword` | *string* | :heavy_minus_sign: | N/A | +| `dockerImage` | *string* | :heavy_minus_sign: | N/A | +| `command` | *string* | :heavy_minus_sign: | N/A | +| `env` | *string* | :heavy_minus_sign: | N/A | +| `memoryReservation` | *number* | :heavy_minus_sign: | N/A | +| `memoryLimit` | *number* | :heavy_minus_sign: | N/A | +| `cpuReservation` | *number* | :heavy_minus_sign: | N/A | +| `cpuLimit` | *number* | :heavy_minus_sign: | N/A | +| `externalPort` | *number* | :heavy_minus_sign: | N/A | +| `createdAt` | *string* | :heavy_minus_sign: | N/A | +| `applicationStatus` | [operations.RedisUpdateApplicationStatus](../../models/operations/redisupdateapplicationstatus.md) | :heavy_minus_sign: | N/A | +| `projectId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/registrycreateregistrytype.md b/docs/models/operations/registrycreateregistrytype.md new file mode 100644 index 0000000..a333a08 --- /dev/null +++ b/docs/models/operations/registrycreateregistrytype.md @@ -0,0 +1,15 @@ +# RegistryCreateRegistryType + +## Example Usage + +```typescript +import { RegistryCreateRegistryType } from "dokploy/models/operations"; + +let value: RegistryCreateRegistryType = "cloud"; +``` + +## Values + +```typescript +"cloud" +``` \ No newline at end of file diff --git a/docs/models/operations/registrycreaterequest.md b/docs/models/operations/registrycreaterequest.md new file mode 100644 index 0000000..2388768 --- /dev/null +++ b/docs/models/operations/registrycreaterequest.md @@ -0,0 +1,28 @@ +# RegistryCreateRequest + +## Example Usage + +```typescript +import { RegistryCreateRequest } from "dokploy/models/operations"; + +let value: RegistryCreateRequest = { + registryName: "", + username: "Charity53", + password: "xJ6g0XxPPsq6BwW", + registryUrl: "https://joyful-toothpick.com/", + registryType: "cloud", + imagePrefix: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `registryName` | *string* | :heavy_check_mark: | N/A | +| `username` | *string* | :heavy_check_mark: | N/A | +| `password` | *string* | :heavy_check_mark: | N/A | +| `registryUrl` | *string* | :heavy_check_mark: | N/A | +| `registryType` | [operations.RegistryCreateRegistryType](../../models/operations/registrycreateregistrytype.md) | :heavy_check_mark: | N/A | +| `imagePrefix` | *string* | :heavy_check_mark: | N/A | +| `serverId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/registryonerequest.md b/docs/models/operations/registryonerequest.md new file mode 100644 index 0000000..6e32afa --- /dev/null +++ b/docs/models/operations/registryonerequest.md @@ -0,0 +1,17 @@ +# RegistryOneRequest + +## Example Usage + +```typescript +import { RegistryOneRequest } from "dokploy/models/operations"; + +let value: RegistryOneRequest = { + registryId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `registryId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/registryremoverequest.md b/docs/models/operations/registryremoverequest.md new file mode 100644 index 0000000..6db03c2 --- /dev/null +++ b/docs/models/operations/registryremoverequest.md @@ -0,0 +1,17 @@ +# RegistryRemoveRequest + +## Example Usage + +```typescript +import { RegistryRemoveRequest } from "dokploy/models/operations"; + +let value: RegistryRemoveRequest = { + registryId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `registryId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/registrytestregistryregistrytype.md b/docs/models/operations/registrytestregistryregistrytype.md new file mode 100644 index 0000000..14f7c0a --- /dev/null +++ b/docs/models/operations/registrytestregistryregistrytype.md @@ -0,0 +1,15 @@ +# RegistryTestRegistryRegistryType + +## Example Usage + +```typescript +import { RegistryTestRegistryRegistryType } from "dokploy/models/operations"; + +let value: RegistryTestRegistryRegistryType = "cloud"; +``` + +## Values + +```typescript +"cloud" +``` \ No newline at end of file diff --git a/docs/models/operations/registrytestregistryrequest.md b/docs/models/operations/registrytestregistryrequest.md new file mode 100644 index 0000000..a9af31b --- /dev/null +++ b/docs/models/operations/registrytestregistryrequest.md @@ -0,0 +1,27 @@ +# RegistryTestRegistryRequest + +## Example Usage + +```typescript +import { RegistryTestRegistryRequest } from "dokploy/models/operations"; + +let value: RegistryTestRegistryRequest = { + registryName: "", + username: "Nasir.Von33", + password: "RRVuZk0aNGCYksM", + registryUrl: "https://impractical-yak.name/", + registryType: "cloud", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `registryName` | *string* | :heavy_check_mark: | N/A | +| `username` | *string* | :heavy_check_mark: | N/A | +| `password` | *string* | :heavy_check_mark: | N/A | +| `registryUrl` | *string* | :heavy_check_mark: | N/A | +| `registryType` | [operations.RegistryTestRegistryRegistryType](../../models/operations/registrytestregistryregistrytype.md) | :heavy_check_mark: | N/A | +| `imagePrefix` | *string* | :heavy_minus_sign: | N/A | +| `serverId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/registryupdateregistrytype.md b/docs/models/operations/registryupdateregistrytype.md new file mode 100644 index 0000000..d6e0c38 --- /dev/null +++ b/docs/models/operations/registryupdateregistrytype.md @@ -0,0 +1,15 @@ +# RegistryUpdateRegistryType + +## Example Usage + +```typescript +import { RegistryUpdateRegistryType } from "dokploy/models/operations"; + +let value: RegistryUpdateRegistryType = "cloud"; +``` + +## Values + +```typescript +"cloud" +``` \ No newline at end of file diff --git a/docs/models/operations/registryupdaterequest.md b/docs/models/operations/registryupdaterequest.md new file mode 100644 index 0000000..8b0c467 --- /dev/null +++ b/docs/models/operations/registryupdaterequest.md @@ -0,0 +1,26 @@ +# RegistryUpdateRequest + +## Example Usage + +```typescript +import { RegistryUpdateRequest } from "dokploy/models/operations"; + +let value: RegistryUpdateRequest = { + registryId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `registryId` | *string* | :heavy_check_mark: | N/A | +| `registryName` | *string* | :heavy_minus_sign: | N/A | +| `imagePrefix` | *string* | :heavy_minus_sign: | N/A | +| `username` | *string* | :heavy_minus_sign: | N/A | +| `password` | *string* | :heavy_minus_sign: | N/A | +| `registryUrl` | *string* | :heavy_minus_sign: | N/A | +| `createdAt` | *string* | :heavy_minus_sign: | N/A | +| `registryType` | [operations.RegistryUpdateRegistryType](../../models/operations/registryupdateregistrytype.md) | :heavy_minus_sign: | N/A | +| `adminId` | *string* | :heavy_minus_sign: | N/A | +| `serverId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/replicated.md b/docs/models/operations/replicated.md new file mode 100644 index 0000000..0df611b --- /dev/null +++ b/docs/models/operations/replicated.md @@ -0,0 +1,15 @@ +# Replicated + +## Example Usage + +```typescript +import { Replicated } from "dokploy/models/operations"; + +let value: Replicated = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `replicas` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/replicatedjob.md b/docs/models/operations/replicatedjob.md new file mode 100644 index 0000000..0632ebc --- /dev/null +++ b/docs/models/operations/replicatedjob.md @@ -0,0 +1,16 @@ +# ReplicatedJob + +## Example Usage + +```typescript +import { ReplicatedJob } from "dokploy/models/operations"; + +let value: ReplicatedJob = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `maxConcurrent` | *number* | :heavy_minus_sign: | N/A | +| `totalCompletions` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/restartpolicyswarm.md b/docs/models/operations/restartpolicyswarm.md new file mode 100644 index 0000000..70eefda --- /dev/null +++ b/docs/models/operations/restartpolicyswarm.md @@ -0,0 +1,18 @@ +# RestartPolicySwarm + +## Example Usage + +```typescript +import { RestartPolicySwarm } from "dokploy/models/operations"; + +let value: RestartPolicySwarm = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `condition` | *string* | :heavy_minus_sign: | N/A | +| `delay` | *number* | :heavy_minus_sign: | N/A | +| `maxAttempts` | *number* | :heavy_minus_sign: | N/A | +| `window` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/rol.md b/docs/models/operations/rol.md new file mode 100644 index 0000000..68049cb --- /dev/null +++ b/docs/models/operations/rol.md @@ -0,0 +1,15 @@ +# Rol + +## Example Usage + +```typescript +import { Rol } from "dokploy/models/operations"; + +let value: Rol = "admin"; +``` + +## Values + +```typescript +"admin" | "user" +``` \ No newline at end of file diff --git a/docs/models/operations/rollbackconfigswarm.md b/docs/models/operations/rollbackconfigswarm.md new file mode 100644 index 0000000..7febfcf --- /dev/null +++ b/docs/models/operations/rollbackconfigswarm.md @@ -0,0 +1,23 @@ +# RollbackConfigSwarm + +## Example Usage + +```typescript +import { RollbackConfigSwarm } from "dokploy/models/operations"; + +let value: RollbackConfigSwarm = { + parallelism: 3329.79, + order: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `parallelism` | *number* | :heavy_check_mark: | N/A | +| `delay` | *number* | :heavy_minus_sign: | N/A | +| `failureAction` | *string* | :heavy_minus_sign: | N/A | +| `monitor` | *number* | :heavy_minus_sign: | N/A | +| `maxFailureRatio` | *number* | :heavy_minus_sign: | N/A | +| `order` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/securitycreaterequest.md b/docs/models/operations/securitycreaterequest.md new file mode 100644 index 0000000..a79c041 --- /dev/null +++ b/docs/models/operations/securitycreaterequest.md @@ -0,0 +1,21 @@ +# SecurityCreateRequest + +## Example Usage + +```typescript +import { SecurityCreateRequest } from "dokploy/models/operations"; + +let value: SecurityCreateRequest = { + applicationId: "", + username: "Constantin.Kertzmann", + password: "eUkfMmPJCFOcmQZ", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `applicationId` | *string* | :heavy_check_mark: | N/A | +| `username` | *string* | :heavy_check_mark: | N/A | +| `password` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/securitydeleterequest.md b/docs/models/operations/securitydeleterequest.md new file mode 100644 index 0000000..36fce3f --- /dev/null +++ b/docs/models/operations/securitydeleterequest.md @@ -0,0 +1,17 @@ +# SecurityDeleteRequest + +## Example Usage + +```typescript +import { SecurityDeleteRequest } from "dokploy/models/operations"; + +let value: SecurityDeleteRequest = { + securityId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `securityId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/securityonerequest.md b/docs/models/operations/securityonerequest.md new file mode 100644 index 0000000..0b367fd --- /dev/null +++ b/docs/models/operations/securityonerequest.md @@ -0,0 +1,17 @@ +# SecurityOneRequest + +## Example Usage + +```typescript +import { SecurityOneRequest } from "dokploy/models/operations"; + +let value: SecurityOneRequest = { + securityId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `securityId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/securityupdaterequest.md b/docs/models/operations/securityupdaterequest.md new file mode 100644 index 0000000..a340260 --- /dev/null +++ b/docs/models/operations/securityupdaterequest.md @@ -0,0 +1,21 @@ +# SecurityUpdateRequest + +## Example Usage + +```typescript +import { SecurityUpdateRequest } from "dokploy/models/operations"; + +let value: SecurityUpdateRequest = { + securityId: "", + username: "Isaiah66", + password: "MIcIaGXdffHvZbi", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `securityId` | *string* | :heavy_check_mark: | N/A | +| `username` | *string* | :heavy_check_mark: | N/A | +| `password` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/servercreaterequest.md b/docs/models/operations/servercreaterequest.md new file mode 100644 index 0000000..682d1c8 --- /dev/null +++ b/docs/models/operations/servercreaterequest.md @@ -0,0 +1,26 @@ +# ServerCreateRequest + +## Example Usage + +```typescript +import { ServerCreateRequest } from "dokploy/models/operations"; + +let value: ServerCreateRequest = { + name: "", + ipAddress: "196.227.162.169", + port: 682.98, + username: "Jordi79", + sshKeyId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *string* | :heavy_check_mark: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `ipAddress` | *string* | :heavy_check_mark: | N/A | +| `port` | *number* | :heavy_check_mark: | N/A | +| `username` | *string* | :heavy_check_mark: | N/A | +| `sshKeyId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/serveronerequest.md b/docs/models/operations/serveronerequest.md new file mode 100644 index 0000000..38cc650 --- /dev/null +++ b/docs/models/operations/serveronerequest.md @@ -0,0 +1,17 @@ +# ServerOneRequest + +## Example Usage + +```typescript +import { ServerOneRequest } from "dokploy/models/operations"; + +let value: ServerOneRequest = { + serverId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `serverId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/serverremoverequest.md b/docs/models/operations/serverremoverequest.md new file mode 100644 index 0000000..7bc4e18 --- /dev/null +++ b/docs/models/operations/serverremoverequest.md @@ -0,0 +1,17 @@ +# ServerRemoveRequest + +## Example Usage + +```typescript +import { ServerRemoveRequest } from "dokploy/models/operations"; + +let value: ServerRemoveRequest = { + serverId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `serverId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/serversetuprequest.md b/docs/models/operations/serversetuprequest.md new file mode 100644 index 0000000..4b66aae --- /dev/null +++ b/docs/models/operations/serversetuprequest.md @@ -0,0 +1,17 @@ +# ServerSetupRequest + +## Example Usage + +```typescript +import { ServerSetupRequest } from "dokploy/models/operations"; + +let value: ServerSetupRequest = { + serverId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `serverId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/serverupdaterequest.md b/docs/models/operations/serverupdaterequest.md new file mode 100644 index 0000000..736ec10 --- /dev/null +++ b/docs/models/operations/serverupdaterequest.md @@ -0,0 +1,28 @@ +# ServerUpdateRequest + +## Example Usage + +```typescript +import { ServerUpdateRequest } from "dokploy/models/operations"; + +let value: ServerUpdateRequest = { + name: "", + serverId: "", + ipAddress: "caa8:1be3:b423:e65b:268e:e9be:42eb:94a0", + port: 5420.14, + username: "Ryann_Weissnat73", + sshKeyId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *string* | :heavy_check_mark: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `serverId` | *string* | :heavy_check_mark: | N/A | +| `ipAddress` | *string* | :heavy_check_mark: | N/A | +| `port` | *number* | :heavy_check_mark: | N/A | +| `username` | *string* | :heavy_check_mark: | N/A | +| `sshKeyId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/settingsassigndomainservercertificatetype.md b/docs/models/operations/settingsassigndomainservercertificatetype.md new file mode 100644 index 0000000..5d91d43 --- /dev/null +++ b/docs/models/operations/settingsassigndomainservercertificatetype.md @@ -0,0 +1,15 @@ +# SettingsAssignDomainServerCertificateType + +## Example Usage + +```typescript +import { SettingsAssignDomainServerCertificateType } from "dokploy/models/operations"; + +let value: SettingsAssignDomainServerCertificateType = "none"; +``` + +## Values + +```typescript +"letsencrypt" | "none" +``` \ No newline at end of file diff --git a/docs/models/operations/settingsassigndomainserverrequest.md b/docs/models/operations/settingsassigndomainserverrequest.md new file mode 100644 index 0000000..10c067c --- /dev/null +++ b/docs/models/operations/settingsassigndomainserverrequest.md @@ -0,0 +1,19 @@ +# SettingsAssignDomainServerRequest + +## Example Usage + +```typescript +import { SettingsAssignDomainServerRequest } from "dokploy/models/operations"; + +let value: SettingsAssignDomainServerRequest = { + host: "corrupt-exhaust.info", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | +| `host` | *string* | :heavy_check_mark: | N/A | +| `certificateType` | [operations.SettingsAssignDomainServerCertificateType](../../models/operations/settingsassigndomainservercertificatetype.md) | :heavy_minus_sign: | N/A | +| `letsEncryptEmail` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/settingscleanallrequest.md b/docs/models/operations/settingscleanallrequest.md new file mode 100644 index 0000000..a4181f6 --- /dev/null +++ b/docs/models/operations/settingscleanallrequest.md @@ -0,0 +1,15 @@ +# SettingsCleanAllRequest + +## Example Usage + +```typescript +import { SettingsCleanAllRequest } from "dokploy/models/operations"; + +let value: SettingsCleanAllRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `serverId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/settingscleandockerbuilderrequest.md b/docs/models/operations/settingscleandockerbuilderrequest.md new file mode 100644 index 0000000..3e196a8 --- /dev/null +++ b/docs/models/operations/settingscleandockerbuilderrequest.md @@ -0,0 +1,15 @@ +# SettingsCleanDockerBuilderRequest + +## Example Usage + +```typescript +import { SettingsCleanDockerBuilderRequest } from "dokploy/models/operations"; + +let value: SettingsCleanDockerBuilderRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `serverId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/settingscleandockerprunerequest.md b/docs/models/operations/settingscleandockerprunerequest.md new file mode 100644 index 0000000..a09b31e --- /dev/null +++ b/docs/models/operations/settingscleandockerprunerequest.md @@ -0,0 +1,15 @@ +# SettingsCleanDockerPruneRequest + +## Example Usage + +```typescript +import { SettingsCleanDockerPruneRequest } from "dokploy/models/operations"; + +let value: SettingsCleanDockerPruneRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `serverId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/settingscleanstoppedcontainersrequest.md b/docs/models/operations/settingscleanstoppedcontainersrequest.md new file mode 100644 index 0000000..62192ba --- /dev/null +++ b/docs/models/operations/settingscleanstoppedcontainersrequest.md @@ -0,0 +1,15 @@ +# SettingsCleanStoppedContainersRequest + +## Example Usage + +```typescript +import { SettingsCleanStoppedContainersRequest } from "dokploy/models/operations"; + +let value: SettingsCleanStoppedContainersRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `serverId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/settingscleanunusedimagesrequest.md b/docs/models/operations/settingscleanunusedimagesrequest.md new file mode 100644 index 0000000..5c5940d --- /dev/null +++ b/docs/models/operations/settingscleanunusedimagesrequest.md @@ -0,0 +1,15 @@ +# SettingsCleanUnusedImagesRequest + +## Example Usage + +```typescript +import { SettingsCleanUnusedImagesRequest } from "dokploy/models/operations"; + +let value: SettingsCleanUnusedImagesRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `serverId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/settingscleanunusedvolumesrequest.md b/docs/models/operations/settingscleanunusedvolumesrequest.md new file mode 100644 index 0000000..25e3102 --- /dev/null +++ b/docs/models/operations/settingscleanunusedvolumesrequest.md @@ -0,0 +1,15 @@ +# SettingsCleanUnusedVolumesRequest + +## Example Usage + +```typescript +import { SettingsCleanUnusedVolumesRequest } from "dokploy/models/operations"; + +let value: SettingsCleanUnusedVolumesRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `serverId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/settingshavetraefikdashboardportenabledrequest.md b/docs/models/operations/settingshavetraefikdashboardportenabledrequest.md new file mode 100644 index 0000000..465519a --- /dev/null +++ b/docs/models/operations/settingshavetraefikdashboardportenabledrequest.md @@ -0,0 +1,15 @@ +# SettingsHaveTraefikDashboardPortEnabledRequest + +## Example Usage + +```typescript +import { SettingsHaveTraefikDashboardPortEnabledRequest } from "dokploy/models/operations"; + +let value: SettingsHaveTraefikDashboardPortEnabledRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `serverId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/settingsreaddirectoriesrequest.md b/docs/models/operations/settingsreaddirectoriesrequest.md new file mode 100644 index 0000000..e5dd7c2 --- /dev/null +++ b/docs/models/operations/settingsreaddirectoriesrequest.md @@ -0,0 +1,15 @@ +# SettingsReadDirectoriesRequest + +## Example Usage + +```typescript +import { SettingsReadDirectoriesRequest } from "dokploy/models/operations"; + +let value: SettingsReadDirectoriesRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `serverId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/settingsreadtraefikenvrequest.md b/docs/models/operations/settingsreadtraefikenvrequest.md new file mode 100644 index 0000000..3ec55bc --- /dev/null +++ b/docs/models/operations/settingsreadtraefikenvrequest.md @@ -0,0 +1,15 @@ +# SettingsReadTraefikEnvRequest + +## Example Usage + +```typescript +import { SettingsReadTraefikEnvRequest } from "dokploy/models/operations"; + +let value: SettingsReadTraefikEnvRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `serverId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/settingsreadtraefikfilerequest.md b/docs/models/operations/settingsreadtraefikfilerequest.md new file mode 100644 index 0000000..e3160e4 --- /dev/null +++ b/docs/models/operations/settingsreadtraefikfilerequest.md @@ -0,0 +1,18 @@ +# SettingsReadTraefikFileRequest + +## Example Usage + +```typescript +import { SettingsReadTraefikFileRequest } from "dokploy/models/operations"; + +let value: SettingsReadTraefikFileRequest = { + path: "/private/tmp", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `path` | *string* | :heavy_check_mark: | N/A | +| `serverId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/settingsreloadtraefikrequest.md b/docs/models/operations/settingsreloadtraefikrequest.md new file mode 100644 index 0000000..2d1eb59 --- /dev/null +++ b/docs/models/operations/settingsreloadtraefikrequest.md @@ -0,0 +1,15 @@ +# SettingsReloadTraefikRequest + +## Example Usage + +```typescript +import { SettingsReloadTraefikRequest } from "dokploy/models/operations"; + +let value: SettingsReloadTraefikRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `serverId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/settingssavesshprivatekeyrequest.md b/docs/models/operations/settingssavesshprivatekeyrequest.md new file mode 100644 index 0000000..251cad4 --- /dev/null +++ b/docs/models/operations/settingssavesshprivatekeyrequest.md @@ -0,0 +1,15 @@ +# SettingsSaveSSHPrivateKeyRequest + +## Example Usage + +```typescript +import { SettingsSaveSSHPrivateKeyRequest } from "dokploy/models/operations"; + +let value: SettingsSaveSSHPrivateKeyRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `sshPrivateKey` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/settingstoggledashboardrequest.md b/docs/models/operations/settingstoggledashboardrequest.md new file mode 100644 index 0000000..d1b52c0 --- /dev/null +++ b/docs/models/operations/settingstoggledashboardrequest.md @@ -0,0 +1,16 @@ +# SettingsToggleDashboardRequest + +## Example Usage + +```typescript +import { SettingsToggleDashboardRequest } from "dokploy/models/operations"; + +let value: SettingsToggleDashboardRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `enableDashboard` | *boolean* | :heavy_minus_sign: | N/A | +| `serverId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/settingstogglelogrotaterequest.md b/docs/models/operations/settingstogglelogrotaterequest.md new file mode 100644 index 0000000..29a1d40 --- /dev/null +++ b/docs/models/operations/settingstogglelogrotaterequest.md @@ -0,0 +1,17 @@ +# SettingsToggleLogRotateRequest + +## Example Usage + +```typescript +import { SettingsToggleLogRotateRequest } from "dokploy/models/operations"; + +let value: SettingsToggleLogRotateRequest = { + enable: false, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `enable` | *boolean* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/settingstogglerequestsrequest.md b/docs/models/operations/settingstogglerequestsrequest.md new file mode 100644 index 0000000..2f6e341 --- /dev/null +++ b/docs/models/operations/settingstogglerequestsrequest.md @@ -0,0 +1,17 @@ +# SettingsToggleRequestsRequest + +## Example Usage + +```typescript +import { SettingsToggleRequestsRequest } from "dokploy/models/operations"; + +let value: SettingsToggleRequestsRequest = { + enable: false, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `enable` | *boolean* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/settingsupdatedockercleanuprequest.md b/docs/models/operations/settingsupdatedockercleanuprequest.md new file mode 100644 index 0000000..26e8c85 --- /dev/null +++ b/docs/models/operations/settingsupdatedockercleanuprequest.md @@ -0,0 +1,18 @@ +# SettingsUpdateDockerCleanupRequest + +## Example Usage + +```typescript +import { SettingsUpdateDockerCleanupRequest } from "dokploy/models/operations"; + +let value: SettingsUpdateDockerCleanupRequest = { + enableDockerCleanup: false, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `enableDockerCleanup` | *boolean* | :heavy_check_mark: | N/A | +| `serverId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/settingsupdatemiddlewaretraefikconfigrequest.md b/docs/models/operations/settingsupdatemiddlewaretraefikconfigrequest.md new file mode 100644 index 0000000..49c29c8 --- /dev/null +++ b/docs/models/operations/settingsupdatemiddlewaretraefikconfigrequest.md @@ -0,0 +1,17 @@ +# SettingsUpdateMiddlewareTraefikConfigRequest + +## Example Usage + +```typescript +import { SettingsUpdateMiddlewareTraefikConfigRequest } from "dokploy/models/operations"; + +let value: SettingsUpdateMiddlewareTraefikConfigRequest = { + traefikConfig: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `traefikConfig` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/settingsupdatetraefikconfigrequest.md b/docs/models/operations/settingsupdatetraefikconfigrequest.md new file mode 100644 index 0000000..9853dc2 --- /dev/null +++ b/docs/models/operations/settingsupdatetraefikconfigrequest.md @@ -0,0 +1,17 @@ +# SettingsUpdateTraefikConfigRequest + +## Example Usage + +```typescript +import { SettingsUpdateTraefikConfigRequest } from "dokploy/models/operations"; + +let value: SettingsUpdateTraefikConfigRequest = { + traefikConfig: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `traefikConfig` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/settingsupdatetraefikfilerequest.md b/docs/models/operations/settingsupdatetraefikfilerequest.md new file mode 100644 index 0000000..58ea560 --- /dev/null +++ b/docs/models/operations/settingsupdatetraefikfilerequest.md @@ -0,0 +1,20 @@ +# SettingsUpdateTraefikFileRequest + +## Example Usage + +```typescript +import { SettingsUpdateTraefikFileRequest } from "dokploy/models/operations"; + +let value: SettingsUpdateTraefikFileRequest = { + path: "/var", + traefikConfig: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `path` | *string* | :heavy_check_mark: | N/A | +| `traefikConfig` | *string* | :heavy_check_mark: | N/A | +| `serverId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/settingsupdatewebservertraefikconfigrequest.md b/docs/models/operations/settingsupdatewebservertraefikconfigrequest.md new file mode 100644 index 0000000..774b71b --- /dev/null +++ b/docs/models/operations/settingsupdatewebservertraefikconfigrequest.md @@ -0,0 +1,17 @@ +# SettingsUpdateWebServerTraefikConfigRequest + +## Example Usage + +```typescript +import { SettingsUpdateWebServerTraefikConfigRequest } from "dokploy/models/operations"; + +let value: SettingsUpdateWebServerTraefikConfigRequest = { + traefikConfig: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `traefikConfig` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/settingswritetraefikenvrequest.md b/docs/models/operations/settingswritetraefikenvrequest.md new file mode 100644 index 0000000..35aa8a8 --- /dev/null +++ b/docs/models/operations/settingswritetraefikenvrequest.md @@ -0,0 +1,18 @@ +# SettingsWriteTraefikEnvRequest + +## Example Usage + +```typescript +import { SettingsWriteTraefikEnvRequest } from "dokploy/models/operations"; + +let value: SettingsWriteTraefikEnvRequest = { + env: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `env` | *string* | :heavy_check_mark: | N/A | +| `serverId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/spread.md b/docs/models/operations/spread.md new file mode 100644 index 0000000..0f5b99d --- /dev/null +++ b/docs/models/operations/spread.md @@ -0,0 +1,17 @@ +# Spread + +## Example Usage + +```typescript +import { Spread } from "dokploy/models/operations"; + +let value: Spread = { + spreadDescriptor: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `spreadDescriptor` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/sshkeycreaterequest.md b/docs/models/operations/sshkeycreaterequest.md new file mode 100644 index 0000000..a0dbed7 --- /dev/null +++ b/docs/models/operations/sshkeycreaterequest.md @@ -0,0 +1,23 @@ +# SshKeyCreateRequest + +## Example Usage + +```typescript +import { SshKeyCreateRequest } from "dokploy/models/operations"; + +let value: SshKeyCreateRequest = { + name: "", + privateKey: "", + publicKey: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *string* | :heavy_check_mark: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `privateKey` | *string* | :heavy_check_mark: | N/A | +| `publicKey` | *string* | :heavy_check_mark: | N/A | +| `adminId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/sshkeygeneraterequest.md b/docs/models/operations/sshkeygeneraterequest.md new file mode 100644 index 0000000..33eb3f1 --- /dev/null +++ b/docs/models/operations/sshkeygeneraterequest.md @@ -0,0 +1,15 @@ +# SshKeyGenerateRequest + +## Example Usage + +```typescript +import { SshKeyGenerateRequest } from "dokploy/models/operations"; + +let value: SshKeyGenerateRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `type` | [operations.SshKeyGenerateType](../../models/operations/sshkeygeneratetype.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/sshkeygeneratetype.md b/docs/models/operations/sshkeygeneratetype.md new file mode 100644 index 0000000..ff367b8 --- /dev/null +++ b/docs/models/operations/sshkeygeneratetype.md @@ -0,0 +1,15 @@ +# SshKeyGenerateType + +## Example Usage + +```typescript +import { SshKeyGenerateType } from "dokploy/models/operations"; + +let value: SshKeyGenerateType = "rsa"; +``` + +## Values + +```typescript +"rsa" | "ed25519" +``` \ No newline at end of file diff --git a/docs/models/operations/sshkeyonerequest.md b/docs/models/operations/sshkeyonerequest.md new file mode 100644 index 0000000..9fda6f7 --- /dev/null +++ b/docs/models/operations/sshkeyonerequest.md @@ -0,0 +1,17 @@ +# SshKeyOneRequest + +## Example Usage + +```typescript +import { SshKeyOneRequest } from "dokploy/models/operations"; + +let value: SshKeyOneRequest = { + sshKeyId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `sshKeyId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/sshkeyremoverequest.md b/docs/models/operations/sshkeyremoverequest.md new file mode 100644 index 0000000..6065c90 --- /dev/null +++ b/docs/models/operations/sshkeyremoverequest.md @@ -0,0 +1,17 @@ +# SshKeyRemoveRequest + +## Example Usage + +```typescript +import { SshKeyRemoveRequest } from "dokploy/models/operations"; + +let value: SshKeyRemoveRequest = { + sshKeyId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `sshKeyId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/sshkeyupdaterequest.md b/docs/models/operations/sshkeyupdaterequest.md new file mode 100644 index 0000000..fb618e0 --- /dev/null +++ b/docs/models/operations/sshkeyupdaterequest.md @@ -0,0 +1,20 @@ +# SshKeyUpdateRequest + +## Example Usage + +```typescript +import { SshKeyUpdateRequest } from "dokploy/models/operations"; + +let value: SshKeyUpdateRequest = { + sshKeyId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `lastUsedAt` | *string* | :heavy_minus_sign: | N/A | +| `sshKeyId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/stripecreatecheckoutsessionrequest.md b/docs/models/operations/stripecreatecheckoutsessionrequest.md new file mode 100644 index 0000000..639b96f --- /dev/null +++ b/docs/models/operations/stripecreatecheckoutsessionrequest.md @@ -0,0 +1,21 @@ +# StripeCreateCheckoutSessionRequest + +## Example Usage + +```typescript +import { StripeCreateCheckoutSessionRequest } from "dokploy/models/operations"; + +let value: StripeCreateCheckoutSessionRequest = { + productId: "", + serverQuantity: 6277.97, + isAnnual: false, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `productId` | *string* | :heavy_check_mark: | N/A | +| `serverQuantity` | *number* | :heavy_check_mark: | N/A | +| `isAnnual` | *boolean* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateconfigswarm.md b/docs/models/operations/updateconfigswarm.md new file mode 100644 index 0000000..c5a8488 --- /dev/null +++ b/docs/models/operations/updateconfigswarm.md @@ -0,0 +1,23 @@ +# UpdateConfigSwarm + +## Example Usage + +```typescript +import { UpdateConfigSwarm } from "dokploy/models/operations"; + +let value: UpdateConfigSwarm = { + parallelism: 2003.92, + order: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `parallelism` | *number* | :heavy_check_mark: | N/A | +| `delay` | *number* | :heavy_minus_sign: | N/A | +| `failureAction` | *string* | :heavy_minus_sign: | N/A | +| `monitor` | *number* | :heavy_minus_sign: | N/A | +| `maxFailureRatio` | *number* | :heavy_minus_sign: | N/A | +| `order` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/userbyauthidrequest.md b/docs/models/operations/userbyauthidrequest.md new file mode 100644 index 0000000..6d86d96 --- /dev/null +++ b/docs/models/operations/userbyauthidrequest.md @@ -0,0 +1,17 @@ +# UserByAuthIdRequest + +## Example Usage + +```typescript +import { UserByAuthIdRequest } from "dokploy/models/operations"; + +let value: UserByAuthIdRequest = { + authId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `authId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/userbyuseridrequest.md b/docs/models/operations/userbyuseridrequest.md new file mode 100644 index 0000000..a9cf49a --- /dev/null +++ b/docs/models/operations/userbyuseridrequest.md @@ -0,0 +1,17 @@ +# UserByUserIdRequest + +## Example Usage + +```typescript +import { UserByUserIdRequest } from "dokploy/models/operations"; + +let value: UserByUserIdRequest = { + userId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `userId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/security.md b/docs/models/security.md new file mode 100644 index 0000000..0d90fa6 --- /dev/null +++ b/docs/models/security.md @@ -0,0 +1,15 @@ +# Security + +## Example Usage + +```typescript +import { Security } from "dokploy/models"; + +let value: Security = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `authorization` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdks/admin/README.md b/docs/sdks/admin/README.md new file mode 100644 index 0000000..b1e633b --- /dev/null +++ b/docs/sdks/admin/README.md @@ -0,0 +1,392 @@ +# Admin +(*admin*) + +## Overview + +### Available Operations + +* [getOne](#getone) +* [createUserInvitation](#createuserinvitation) +* [removeUser](#removeuser) +* [getUserByToken](#getuserbytoken) +* [assignPermissions](#assignpermissions) + +## getOne + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.admin.getOne(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { adminGetOne } from "dokploy/funcs/adminGetOne.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await adminGetOne(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("adminGetOne failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## createUserInvitation + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.admin.createUserInvitation({ + email: "Melody5@gmail.com", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { adminCreateUserInvitation } from "dokploy/funcs/adminCreateUserInvitation.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await adminCreateUserInvitation(dokploy, { + email: "Melody5@gmail.com", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("adminCreateUserInvitation failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.AdminCreateUserInvitationRequest](../../models/operations/admincreateuserinvitationrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## removeUser + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.admin.removeUser({ + authId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { adminRemoveUser } from "dokploy/funcs/adminRemoveUser.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await adminRemoveUser(dokploy, { + authId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("adminRemoveUser failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.AdminRemoveUserRequest](../../models/operations/adminremoveuserrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## getUserByToken + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.admin.getUserByToken({ + token: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { adminGetUserByToken } from "dokploy/funcs/adminGetUserByToken.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await adminGetUserByToken(dokploy, { + token: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("adminGetUserByToken failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.AdminGetUserByTokenRequest](../../models/operations/admingetuserbytokenrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## assignPermissions + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.admin.assignPermissions({ + userId: "", + canCreateProjects: false, + canCreateServices: false, + canDeleteProjects: false, + canDeleteServices: false, + accesedProjects: [ + "", + ], + accesedServices: [ + "", + ], + canAccessToTraefikFiles: false, + canAccessToDocker: true, + canAccessToAPI: false, + canAccessToSSHKeys: true, + canAccessToGitProviders: false, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { adminAssignPermissions } from "dokploy/funcs/adminAssignPermissions.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await adminAssignPermissions(dokploy, { + userId: "", + canCreateProjects: false, + canCreateServices: false, + canDeleteProjects: false, + canDeleteServices: false, + accesedProjects: [ + "", + ], + accesedServices: [ + "", + ], + canAccessToTraefikFiles: false, + canAccessToDocker: true, + canAccessToAPI: false, + canAccessToSSHKeys: true, + canAccessToGitProviders: false, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("adminAssignPermissions failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.AdminAssignPermissionsRequest](../../models/operations/adminassignpermissionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/application/README.md b/docs/sdks/application/README.md new file mode 100644 index 0000000..997a2a5 --- /dev/null +++ b/docs/sdks/application/README.md @@ -0,0 +1,1631 @@ +# Application +(*application*) + +## Overview + +### Available Operations + +* [create](#create) +* [getOne](#getone) +* [reload](#reload) +* [delete](#delete) +* [stop](#stop) +* [start](#start) +* [redeploy](#redeploy) +* [saveEnvironment](#saveenvironment) +* [saveBuildType](#savebuildtype) +* [saveGithubProvider](#savegithubprovider) +* [saveGitlabProvider](#savegitlabprovider) +* [saveBitbucketProvider](#savebitbucketprovider) +* [saveDockerProvider](#savedockerprovider) +* [saveGitProdiver](#savegitprodiver) +* [markRunning](#markrunning) +* [update](#update) +* [refreshToken](#refreshtoken) +* [deploy](#deploy) +* [cleanQueues](#cleanqueues) +* [readTraefikConfig](#readtraefikconfig) +* [updateTraefikConfig](#updatetraefikconfig) +* [readAppMonitoring](#readappmonitoring) + +## create + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.application.create({ + name: "", + projectId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { applicationCreate } from "dokploy/funcs/applicationCreate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await applicationCreate(dokploy, { + name: "", + projectId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("applicationCreate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ApplicationCreateRequest](../../models/operations/applicationcreaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## getOne + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.application.getOne({ + applicationId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { applicationGetOne } from "dokploy/funcs/applicationGetOne.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await applicationGetOne(dokploy, { + applicationId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("applicationGetOne failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ApplicationOneRequest](../../models/operations/applicationonerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## reload + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.application.reload({ + appName: "", + applicationId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { applicationReload } from "dokploy/funcs/applicationReload.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await applicationReload(dokploy, { + appName: "", + applicationId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("applicationReload failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ApplicationReloadRequest](../../models/operations/applicationreloadrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## delete + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.application.delete({ + applicationId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { applicationDelete } from "dokploy/funcs/applicationDelete.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await applicationDelete(dokploy, { + applicationId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("applicationDelete failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ApplicationDeleteRequest](../../models/operations/applicationdeleterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## stop + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.application.stop({ + applicationId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { applicationStop } from "dokploy/funcs/applicationStop.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await applicationStop(dokploy, { + applicationId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("applicationStop failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ApplicationStopRequest](../../models/operations/applicationstoprequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## start + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.application.start({ + applicationId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { applicationStart } from "dokploy/funcs/applicationStart.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await applicationStart(dokploy, { + applicationId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("applicationStart failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ApplicationStartRequest](../../models/operations/applicationstartrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## redeploy + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.application.redeploy({ + applicationId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { applicationRedeploy } from "dokploy/funcs/applicationRedeploy.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await applicationRedeploy(dokploy, { + applicationId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("applicationRedeploy failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ApplicationRedeployRequest](../../models/operations/applicationredeployrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## saveEnvironment + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.application.saveEnvironment({ + applicationId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { applicationSaveEnvironment } from "dokploy/funcs/applicationSaveEnvironment.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await applicationSaveEnvironment(dokploy, { + applicationId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("applicationSaveEnvironment failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ApplicationSaveEnvironmentRequest](../../models/operations/applicationsaveenvironmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## saveBuildType + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.application.saveBuildType({ + applicationId: "", + buildType: "dockerfile", + dockerContextPath: "", + dockerBuildStage: null, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { applicationSaveBuildType } from "dokploy/funcs/applicationSaveBuildType.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await applicationSaveBuildType(dokploy, { + applicationId: "", + buildType: "dockerfile", + dockerContextPath: "", + dockerBuildStage: null, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("applicationSaveBuildType failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ApplicationSaveBuildTypeRequest](../../models/operations/applicationsavebuildtyperequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## saveGithubProvider + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.application.saveGithubProvider({ + applicationId: "", + owner: null, + githubId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { applicationSaveGithubProvider } from "dokploy/funcs/applicationSaveGithubProvider.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await applicationSaveGithubProvider(dokploy, { + applicationId: "", + owner: null, + githubId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("applicationSaveGithubProvider failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ApplicationSaveGithubProviderRequest](../../models/operations/applicationsavegithubproviderrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## saveGitlabProvider + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.application.saveGitlabProvider({ + applicationId: "", + gitlabBranch: "", + gitlabBuildPath: "", + gitlabOwner: "", + gitlabRepository: "", + gitlabId: "", + gitlabProjectId: 950.43, + gitlabPathNamespace: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { applicationSaveGitlabProvider } from "dokploy/funcs/applicationSaveGitlabProvider.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await applicationSaveGitlabProvider(dokploy, { + applicationId: "", + gitlabBranch: "", + gitlabBuildPath: "", + gitlabOwner: "", + gitlabRepository: "", + gitlabId: "", + gitlabProjectId: 950.43, + gitlabPathNamespace: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("applicationSaveGitlabProvider failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ApplicationSaveGitlabProviderRequest](../../models/operations/applicationsavegitlabproviderrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## saveBitbucketProvider + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.application.saveBitbucketProvider({ + bitbucketBranch: "", + bitbucketBuildPath: "", + bitbucketOwner: "", + bitbucketRepository: "", + bitbucketId: "", + applicationId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { applicationSaveBitbucketProvider } from "dokploy/funcs/applicationSaveBitbucketProvider.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await applicationSaveBitbucketProvider(dokploy, { + bitbucketBranch: "", + bitbucketBuildPath: "", + bitbucketOwner: "", + bitbucketRepository: "", + bitbucketId: "", + applicationId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("applicationSaveBitbucketProvider failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ApplicationSaveBitbucketProviderRequest](../../models/operations/applicationsavebitbucketproviderrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## saveDockerProvider + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.application.saveDockerProvider({ + applicationId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { applicationSaveDockerProvider } from "dokploy/funcs/applicationSaveDockerProvider.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await applicationSaveDockerProvider(dokploy, { + applicationId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("applicationSaveDockerProvider failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ApplicationSaveDockerProviderRequest](../../models/operations/applicationsavedockerproviderrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## saveGitProdiver + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.application.saveGitProdiver({ + applicationId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { applicationSaveGitProdiver } from "dokploy/funcs/applicationSaveGitProdiver.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await applicationSaveGitProdiver(dokploy, { + applicationId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("applicationSaveGitProdiver failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ApplicationSaveGitProdiverRequest](../../models/operations/applicationsavegitprodiverrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## markRunning + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.application.markRunning({ + applicationId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { applicationMarkRunning } from "dokploy/funcs/applicationMarkRunning.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await applicationMarkRunning(dokploy, { + applicationId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("applicationMarkRunning failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ApplicationMarkRunningRequest](../../models/operations/applicationmarkrunningrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## update + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.application.update({ + applicationId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { applicationUpdate } from "dokploy/funcs/applicationUpdate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await applicationUpdate(dokploy, { + applicationId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("applicationUpdate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ApplicationUpdateRequest](../../models/operations/applicationupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## refreshToken + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.application.refreshToken({ + applicationId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { applicationRefreshToken } from "dokploy/funcs/applicationRefreshToken.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await applicationRefreshToken(dokploy, { + applicationId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("applicationRefreshToken failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ApplicationRefreshTokenRequest](../../models/operations/applicationrefreshtokenrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## deploy + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.application.deploy({ + applicationId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { applicationDeploy } from "dokploy/funcs/applicationDeploy.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await applicationDeploy(dokploy, { + applicationId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("applicationDeploy failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ApplicationDeployRequest](../../models/operations/applicationdeployrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## cleanQueues + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.application.cleanQueues({ + applicationId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { applicationCleanQueues } from "dokploy/funcs/applicationCleanQueues.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await applicationCleanQueues(dokploy, { + applicationId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("applicationCleanQueues failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ApplicationCleanQueuesRequest](../../models/operations/applicationcleanqueuesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## readTraefikConfig + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.application.readTraefikConfig({ + applicationId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { applicationReadTraefikConfig } from "dokploy/funcs/applicationReadTraefikConfig.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await applicationReadTraefikConfig(dokploy, { + applicationId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("applicationReadTraefikConfig failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ApplicationReadTraefikConfigRequest](../../models/operations/applicationreadtraefikconfigrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## updateTraefikConfig + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.application.updateTraefikConfig({ + applicationId: "", + traefikConfig: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { applicationUpdateTraefikConfig } from "dokploy/funcs/applicationUpdateTraefikConfig.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await applicationUpdateTraefikConfig(dokploy, { + applicationId: "", + traefikConfig: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("applicationUpdateTraefikConfig failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ApplicationUpdateTraefikConfigRequest](../../models/operations/applicationupdatetraefikconfigrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## readAppMonitoring + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.application.readAppMonitoring({ + appName: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { applicationReadAppMonitoring } from "dokploy/funcs/applicationReadAppMonitoring.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await applicationReadAppMonitoring(dokploy, { + appName: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("applicationReadAppMonitoring failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ApplicationReadAppMonitoringRequest](../../models/operations/applicationreadappmonitoringrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/auth/README.md b/docs/sdks/auth/README.md new file mode 100644 index 0000000..8d37816 --- /dev/null +++ b/docs/sdks/auth/README.md @@ -0,0 +1,1078 @@ +# Auth +(*auth*) + +## Overview + +### Available Operations + +* [createAdmin](#createadmin) +* [createUser](#createuser) +* [login](#login) +* [getOne](#getone) +* [logout](#logout) +* [update](#update) +* [generateToken](#generatetoken) +* [get](#get) +* [generate2FASecret](#generate2fasecret) +* [verify2faSetup](#verify2fasetup) +* [verifyLogin2FA](#verifylogin2fa) +* [disable2FA](#disable2fa) +* [sendResetPasswordEmail](#sendresetpasswordemail) +* [resetPassword](#resetpassword) +* [confirmEmail](#confirmemail) + +## createAdmin + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.auth.createAdmin({ + email: "Margarett.Keeling@hotmail.com", + password: "tugyh_JW5kT5IDW", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { authCreateAdmin } from "dokploy/funcs/authCreateAdmin.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await authCreateAdmin(dokploy, { + email: "Margarett.Keeling@hotmail.com", + password: "tugyh_JW5kT5IDW", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("authCreateAdmin failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.AuthCreateAdminRequest](../../models/operations/authcreateadminrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## createUser + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.auth.createUser({ + password: "MRqGkWGKqLanNcu", + id: "", + token: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { authCreateUser } from "dokploy/funcs/authCreateUser.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await authCreateUser(dokploy, { + password: "MRqGkWGKqLanNcu", + id: "", + token: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("authCreateUser failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.AuthCreateUserRequest](../../models/operations/authcreateuserrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## login + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.auth.login({ + email: "Lloyd_Howe41@gmail.com", + password: "NBiV2yTHHqOmb69", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { authLogin } from "dokploy/funcs/authLogin.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await authLogin(dokploy, { + email: "Lloyd_Howe41@gmail.com", + password: "NBiV2yTHHqOmb69", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("authLogin failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.AuthLoginRequest](../../models/operations/authloginrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## getOne + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.auth.getOne(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { authGetOne } from "dokploy/funcs/authGetOne.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await authGetOne(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("authGetOne failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## logout + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.auth.logout(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { authLogout } from "dokploy/funcs/authLogout.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await authLogout(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("authLogout failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## update + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.auth.update({ + email: "Larissa_Aufderhar@hotmail.com", + password: "lGQCLAhWN3Y4KOT", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { authUpdate } from "dokploy/funcs/authUpdate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await authUpdate(dokploy, { + email: "Larissa_Aufderhar@hotmail.com", + password: "lGQCLAhWN3Y4KOT", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("authUpdate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.AuthUpdateRequest](../../models/operations/authupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## generateToken + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.auth.generateToken(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { authGenerateToken } from "dokploy/funcs/authGenerateToken.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await authGenerateToken(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("authGenerateToken failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## get + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.auth.get({ + id: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { authGet } from "dokploy/funcs/authGet.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await authGet(dokploy, { + id: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("authGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.AuthOneRequest](../../models/operations/authonerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## generate2FASecret + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.auth.generate2FASecret(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { authGenerate2FASecret } from "dokploy/funcs/authGenerate2FASecret.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await authGenerate2FASecret(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("authGenerate2FASecret failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## verify2faSetup + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.auth.verify2faSetup({ + pin: "8291", + secret: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { authVerify2faSetup } from "dokploy/funcs/authVerify2faSetup.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await authVerify2faSetup(dokploy, { + pin: "8291", + secret: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("authVerify2faSetup failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.AuthVerify2FASetupRequest](../../models/operations/authverify2fasetuprequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## verifyLogin2FA + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.auth.verifyLogin2FA({ + pin: "5896", + id: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { authVerifyLogin2FA } from "dokploy/funcs/authVerifyLogin2FA.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await authVerifyLogin2FA(dokploy, { + pin: "5896", + id: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("authVerifyLogin2FA failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.AuthVerifyLogin2FARequest](../../models/operations/authverifylogin2farequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## disable2FA + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.auth.disable2FA(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { authDisable2FA } from "dokploy/funcs/authDisable2FA.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await authDisable2FA(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("authDisable2FA failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## sendResetPasswordEmail + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.auth.sendResetPasswordEmail({ + email: "Rubye_Stanton63@hotmail.com", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { authSendResetPasswordEmail } from "dokploy/funcs/authSendResetPasswordEmail.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await authSendResetPasswordEmail(dokploy, { + email: "Rubye_Stanton63@hotmail.com", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("authSendResetPasswordEmail failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.AuthSendResetPasswordEmailRequest](../../models/operations/authsendresetpasswordemailrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## resetPassword + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.auth.resetPassword({ + resetPasswordToken: "", + password: "gZLRGbfCK0k8C4F", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { authResetPassword } from "dokploy/funcs/authResetPassword.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await authResetPassword(dokploy, { + resetPasswordToken: "", + password: "gZLRGbfCK0k8C4F", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("authResetPassword failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.AuthResetPasswordRequest](../../models/operations/authresetpasswordrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## confirmEmail + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.auth.confirmEmail({ + confirmationToken: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { authConfirmEmail } from "dokploy/funcs/authConfirmEmail.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await authConfirmEmail(dokploy, { + confirmationToken: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("authConfirmEmail failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.AuthConfirmEmailRequest](../../models/operations/authconfirmemailrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/backup/README.md b/docs/sdks/backup/README.md new file mode 100644 index 0000000..a9216dc --- /dev/null +++ b/docs/sdks/backup/README.md @@ -0,0 +1,599 @@ +# Backup +(*backup*) + +## Overview + +### Available Operations + +* [create](#create) +* [get](#get) +* [update](#update) +* [remove](#remove) +* [manualBackupPostgres](#manualbackuppostgres) +* [manualBackupMysql](#manualbackupmysql) +* [manualBackupMariadb](#manualbackupmariadb) +* [manualBackupMongo](#manualbackupmongo) + +## create + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.backup.create({ + schedule: "", + prefix: "", + destinationId: "", + database: "", + databaseType: "mysql", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { backupCreate } from "dokploy/funcs/backupCreate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await backupCreate(dokploy, { + schedule: "", + prefix: "", + destinationId: "", + database: "", + databaseType: "mysql", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("backupCreate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.BackupCreateRequest](../../models/operations/backupcreaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## get + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.backup.get({ + backupId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { backupGet } from "dokploy/funcs/backupGet.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await backupGet(dokploy, { + backupId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("backupGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.BackupOneRequest](../../models/operations/backuponerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## update + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.backup.update({ + schedule: "", + prefix: "", + backupId: "", + destinationId: "", + database: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { backupUpdate } from "dokploy/funcs/backupUpdate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await backupUpdate(dokploy, { + schedule: "", + prefix: "", + backupId: "", + destinationId: "", + database: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("backupUpdate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.BackupUpdateRequest](../../models/operations/backupupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## remove + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.backup.remove({ + backupId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { backupRemove } from "dokploy/funcs/backupRemove.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await backupRemove(dokploy, { + backupId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("backupRemove failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.BackupRemoveRequest](../../models/operations/backupremoverequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## manualBackupPostgres + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.backup.manualBackupPostgres({ + backupId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { backupManualBackupPostgres } from "dokploy/funcs/backupManualBackupPostgres.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await backupManualBackupPostgres(dokploy, { + backupId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("backupManualBackupPostgres failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.BackupManualBackupPostgresRequest](../../models/operations/backupmanualbackuppostgresrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## manualBackupMysql + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.backup.manualBackupMysql({ + backupId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { backupManualBackupMysql } from "dokploy/funcs/backupManualBackupMysql.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await backupManualBackupMysql(dokploy, { + backupId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("backupManualBackupMysql failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.BackupManualBackupMySqlRequest](../../models/operations/backupmanualbackupmysqlrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## manualBackupMariadb + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.backup.manualBackupMariadb({ + backupId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { backupManualBackupMariadb } from "dokploy/funcs/backupManualBackupMariadb.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await backupManualBackupMariadb(dokploy, { + backupId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("backupManualBackupMariadb failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.BackupManualBackupMariadbRequest](../../models/operations/backupmanualbackupmariadbrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## manualBackupMongo + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.backup.manualBackupMongo({ + backupId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { backupManualBackupMongo } from "dokploy/funcs/backupManualBackupMongo.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await backupManualBackupMongo(dokploy, { + backupId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("backupManualBackupMongo failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.BackupManualBackupMongoRequest](../../models/operations/backupmanualbackupmongorequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/bitbucket/README.md b/docs/sdks/bitbucket/README.md new file mode 100644 index 0000000..7d3e361 --- /dev/null +++ b/docs/sdks/bitbucket/README.md @@ -0,0 +1,514 @@ +# Bitbucket +(*bitbucket*) + +## Overview + +### Available Operations + +* [create](#create) +* [get](#get) +* [providers](#providers) +* [getRepositories](#getrepositories) +* [getBranches](#getbranches) +* [testConnection](#testconnection) +* [update](#update) + +## create + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.bitbucket.create({ + authId: "", + name: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { bitbucketCreate } from "dokploy/funcs/bitbucketCreate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await bitbucketCreate(dokploy, { + authId: "", + name: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bitbucketCreate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.BitbucketCreateRequest](../../models/operations/bitbucketcreaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## get + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.bitbucket.get({ + bitbucketId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { bitbucketGet } from "dokploy/funcs/bitbucketGet.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await bitbucketGet(dokploy, { + bitbucketId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bitbucketGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.BitbucketOneRequest](../../models/operations/bitbucketonerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## providers + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.bitbucket.providers(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { bitbucketProviders } from "dokploy/funcs/bitbucketProviders.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await bitbucketProviders(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bitbucketProviders failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## getRepositories + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.bitbucket.getRepositories({ + bitbucketId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { bitbucketGetRepositories } from "dokploy/funcs/bitbucketGetRepositories.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await bitbucketGetRepositories(dokploy, { + bitbucketId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bitbucketGetRepositories failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.BitbucketGetBitbucketRepositoriesRequest](../../models/operations/bitbucketgetbitbucketrepositoriesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## getBranches + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.bitbucket.getBranches({ + owner: "", + repo: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { bitbucketGetBranches } from "dokploy/funcs/bitbucketGetBranches.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await bitbucketGetBranches(dokploy, { + owner: "", + repo: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bitbucketGetBranches failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.BitbucketGetBitbucketBranchesRequest](../../models/operations/bitbucketgetbitbucketbranchesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## testConnection + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.bitbucket.testConnection({ + bitbucketId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { bitbucketTestConnection } from "dokploy/funcs/bitbucketTestConnection.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await bitbucketTestConnection(dokploy, { + bitbucketId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bitbucketTestConnection failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.BitbucketTestConnectionRequest](../../models/operations/bitbuckettestconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## update + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.bitbucket.update({ + bitbucketId: "", + gitProviderId: "", + name: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { bitbucketUpdate } from "dokploy/funcs/bitbucketUpdate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await bitbucketUpdate(dokploy, { + bitbucketId: "", + gitProviderId: "", + name: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bitbucketUpdate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.BitbucketUpdateRequest](../../models/operations/bitbucketupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/certificates/README.md b/docs/sdks/certificates/README.md new file mode 100644 index 0000000..8d52f16 --- /dev/null +++ b/docs/sdks/certificates/README.md @@ -0,0 +1,294 @@ +# Certificates +(*certificates*) + +## Overview + +### Available Operations + +* [create](#create) +* [get](#get) +* [remove](#remove) +* [all](#all) + +## create + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.certificates.create({ + name: "", + certificateData: "", + privateKey: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { certificatesCreate } from "dokploy/funcs/certificatesCreate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await certificatesCreate(dokploy, { + name: "", + certificateData: "", + privateKey: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("certificatesCreate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CertificatesCreateRequest](../../models/operations/certificatescreaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## get + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.certificates.get({ + certificateId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { certificatesGet } from "dokploy/funcs/certificatesGet.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await certificatesGet(dokploy, { + certificateId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("certificatesGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CertificatesOneRequest](../../models/operations/certificatesonerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## remove + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.certificates.remove({ + certificateId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { certificatesRemove } from "dokploy/funcs/certificatesRemove.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await certificatesRemove(dokploy, { + certificateId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("certificatesRemove failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CertificatesRemoveRequest](../../models/operations/certificatesremoverequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## all + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.certificates.all(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { certificatesAll } from "dokploy/funcs/certificatesAll.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await certificatesAll(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("certificatesAll failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/cluster/README.md b/docs/sdks/cluster/README.md new file mode 100644 index 0000000..1b27027 --- /dev/null +++ b/docs/sdks/cluster/README.md @@ -0,0 +1,280 @@ +# Cluster +(*cluster*) + +## Overview + +### Available Operations + +* [getNodes](#getnodes) +* [removeWorker](#removeworker) +* [addWorker](#addworker) +* [addManager](#addmanager) + +## getNodes + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.cluster.getNodes(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { clusterGetNodes } from "dokploy/funcs/clusterGetNodes.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await clusterGetNodes(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("clusterGetNodes failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## removeWorker + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.cluster.removeWorker({ + nodeId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { clusterRemoveWorker } from "dokploy/funcs/clusterRemoveWorker.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await clusterRemoveWorker(dokploy, { + nodeId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("clusterRemoveWorker failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ClusterRemoveWorkerRequest](../../models/operations/clusterremoveworkerrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## addWorker + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.cluster.addWorker(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { clusterAddWorker } from "dokploy/funcs/clusterAddWorker.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await clusterAddWorker(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("clusterAddWorker failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## addManager + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.cluster.addManager(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { clusterAddManager } from "dokploy/funcs/clusterAddManager.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await clusterAddManager(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("clusterAddManager failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/compose/README.md b/docs/sdks/compose/README.md new file mode 100644 index 0000000..237e944 --- /dev/null +++ b/docs/sdks/compose/README.md @@ -0,0 +1,1153 @@ +# Compose +(*compose*) + +## Overview + +### Available Operations + +* [create](#create) +* [getOne](#getone) +* [update](#update) +* [delete](#delete) +* [cleanQueues](#cleanqueues) +* [fetchSourceType](#fetchsourcetype) +* [randomizeCompose](#randomizecompose) +* [getConverted](#getconverted) +* [deploy](#deploy) +* [redeploy](#redeploy) +* [stop](#stop) +* [getDefaultCommand](#getdefaultcommand) +* [refreshToken](#refreshtoken) +* [deployTemplate](#deploytemplate) +* [getTemplates](#gettemplates) +* [getTags](#gettags) + +## create + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.compose.create({ + name: "", + projectId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { composeCreate } from "dokploy/funcs/composeCreate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await composeCreate(dokploy, { + name: "", + projectId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("composeCreate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ComposeCreateRequest](../../models/operations/composecreaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## getOne + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.compose.getOne({ + composeId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { composeGetOne } from "dokploy/funcs/composeGetOne.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await composeGetOne(dokploy, { + composeId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("composeGetOne failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ComposeOneRequest](../../models/operations/composeonerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## update + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.compose.update({ + composeId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { composeUpdate } from "dokploy/funcs/composeUpdate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await composeUpdate(dokploy, { + composeId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("composeUpdate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ComposeUpdateRequest](../../models/operations/composeupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## delete + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.compose.delete({ + composeId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { composeDelete } from "dokploy/funcs/composeDelete.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await composeDelete(dokploy, { + composeId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("composeDelete failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ComposeDeleteRequest](../../models/operations/composedeleterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## cleanQueues + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.compose.cleanQueues({ + composeId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { composeCleanQueues } from "dokploy/funcs/composeCleanQueues.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await composeCleanQueues(dokploy, { + composeId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("composeCleanQueues failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ComposeCleanQueuesRequest](../../models/operations/composecleanqueuesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## fetchSourceType + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.compose.fetchSourceType({ + composeId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { composeFetchSourceType } from "dokploy/funcs/composeFetchSourceType.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await composeFetchSourceType(dokploy, { + composeId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("composeFetchSourceType failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ComposeFetchSourceTypeRequest](../../models/operations/composefetchsourcetyperequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## randomizeCompose + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.compose.randomizeCompose({ + composeId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { composeRandomizeCompose } from "dokploy/funcs/composeRandomizeCompose.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await composeRandomizeCompose(dokploy, { + composeId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("composeRandomizeCompose failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ComposeRandomizeComposeRequest](../../models/operations/composerandomizecomposerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## getConverted + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.compose.getConverted({ + composeId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { composeGetConverted } from "dokploy/funcs/composeGetConverted.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await composeGetConverted(dokploy, { + composeId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("composeGetConverted failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ComposeGetConvertedComposeRequest](../../models/operations/composegetconvertedcomposerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## deploy + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.compose.deploy({ + composeId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { composeDeploy } from "dokploy/funcs/composeDeploy.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await composeDeploy(dokploy, { + composeId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("composeDeploy failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ComposeDeployRequest](../../models/operations/composedeployrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## redeploy + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.compose.redeploy({ + composeId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { composeRedeploy } from "dokploy/funcs/composeRedeploy.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await composeRedeploy(dokploy, { + composeId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("composeRedeploy failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ComposeRedeployRequest](../../models/operations/composeredeployrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## stop + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.compose.stop({ + composeId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { composeStop } from "dokploy/funcs/composeStop.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await composeStop(dokploy, { + composeId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("composeStop failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ComposeStopRequest](../../models/operations/composestoprequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## getDefaultCommand + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.compose.getDefaultCommand({ + composeId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { composeGetDefaultCommand } from "dokploy/funcs/composeGetDefaultCommand.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await composeGetDefaultCommand(dokploy, { + composeId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("composeGetDefaultCommand failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ComposeGetDefaultCommandRequest](../../models/operations/composegetdefaultcommandrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## refreshToken + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.compose.refreshToken({ + composeId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { composeRefreshToken } from "dokploy/funcs/composeRefreshToken.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await composeRefreshToken(dokploy, { + composeId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("composeRefreshToken failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ComposeRefreshTokenRequest](../../models/operations/composerefreshtokenrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## deployTemplate + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.compose.deployTemplate({ + projectId: "", + id: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { composeDeployTemplate } from "dokploy/funcs/composeDeployTemplate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await composeDeployTemplate(dokploy, { + projectId: "", + id: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("composeDeployTemplate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ComposeDeployTemplateRequest](../../models/operations/composedeploytemplaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## getTemplates + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.compose.getTemplates(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { composeGetTemplates } from "dokploy/funcs/composeGetTemplates.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await composeGetTemplates(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("composeGetTemplates failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## getTags + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.compose.getTags(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { composeGetTags } from "dokploy/funcs/composeGetTags.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await composeGetTags(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("composeGetTags failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/deployment/README.md b/docs/sdks/deployment/README.md new file mode 100644 index 0000000..e8b5437 --- /dev/null +++ b/docs/sdks/deployment/README.md @@ -0,0 +1,223 @@ +# Deployment +(*deployment*) + +## Overview + +### Available Operations + +* [get](#get) +* [allByCompose](#allbycompose) +* [allByServer](#allbyserver) + +## get + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.deployment.get({ + applicationId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { deploymentGet } from "dokploy/funcs/deploymentGet.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await deploymentGet(dokploy, { + applicationId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("deploymentGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeploymentAllRequest](../../models/operations/deploymentallrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## allByCompose + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.deployment.allByCompose({ + composeId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { deploymentAllByCompose } from "dokploy/funcs/deploymentAllByCompose.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await deploymentAllByCompose(dokploy, { + composeId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("deploymentAllByCompose failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeploymentAllByComposeRequest](../../models/operations/deploymentallbycomposerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## allByServer + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.deployment.allByServer({ + serverId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { deploymentAllByServer } from "dokploy/funcs/deploymentAllByServer.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await deploymentAllByServer(dokploy, { + serverId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("deploymentAllByServer failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeploymentAllByServerRequest](../../models/operations/deploymentallbyserverrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/destination/README.md b/docs/sdks/destination/README.md new file mode 100644 index 0000000..e9bae11 --- /dev/null +++ b/docs/sdks/destination/README.md @@ -0,0 +1,466 @@ +# Destination +(*destination*) + +## Overview + +### Available Operations + +* [create](#create) +* [testConnection](#testconnection) +* [getOne](#getone) +* [get](#get) +* [remove](#remove) +* [update](#update) + +## create + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.destination.create({ + name: "", + accessKey: "", + bucket: "", + region: "", + endpoint: "", + secretAccessKey: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { destinationCreate } from "dokploy/funcs/destinationCreate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await destinationCreate(dokploy, { + name: "", + accessKey: "", + bucket: "", + region: "", + endpoint: "", + secretAccessKey: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("destinationCreate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DestinationCreateRequest](../../models/operations/destinationcreaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## testConnection + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.destination.testConnection({ + name: "", + accessKey: "", + bucket: "", + region: "", + endpoint: "", + secretAccessKey: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { destinationTestConnection } from "dokploy/funcs/destinationTestConnection.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await destinationTestConnection(dokploy, { + name: "", + accessKey: "", + bucket: "", + region: "", + endpoint: "", + secretAccessKey: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("destinationTestConnection failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DestinationTestConnectionRequest](../../models/operations/destinationtestconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## getOne + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.destination.getOne({ + destinationId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { destinationGetOne } from "dokploy/funcs/destinationGetOne.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await destinationGetOne(dokploy, { + destinationId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("destinationGetOne failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DestinationOneRequest](../../models/operations/destinationonerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## get + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.destination.get(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { destinationGet } from "dokploy/funcs/destinationGet.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await destinationGet(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("destinationGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## remove + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.destination.remove({ + destinationId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { destinationRemove } from "dokploy/funcs/destinationRemove.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await destinationRemove(dokploy, { + destinationId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("destinationRemove failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DestinationRemoveRequest](../../models/operations/destinationremoverequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## update + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.destination.update({ + name: "", + accessKey: "", + bucket: "", + region: "", + endpoint: "", + secretAccessKey: "", + destinationId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { destinationUpdate } from "dokploy/funcs/destinationUpdate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await destinationUpdate(dokploy, { + name: "", + accessKey: "", + bucket: "", + region: "", + endpoint: "", + secretAccessKey: "", + destinationId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("destinationUpdate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DestinationUpdateRequest](../../models/operations/destinationupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/docker/README.md b/docs/sdks/docker/README.md new file mode 100644 index 0000000..75e87a0 --- /dev/null +++ b/docs/sdks/docker/README.md @@ -0,0 +1,363 @@ +# Docker +(*docker*) + +## Overview + +### Available Operations + +* [getContainers](#getcontainers) +* [restartContainer](#restartcontainer) +* [getConfig](#getconfig) +* [getContainersByAppNameMatch](#getcontainersbyappnamematch) +* [getContainersByAppLabel](#getcontainersbyapplabel) + +## getContainers + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.docker.getContainers(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { dockerGetContainers } from "dokploy/funcs/dockerGetContainers.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await dockerGetContainers(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("dockerGetContainers failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DockerGetContainersRequest](../../models/operations/dockergetcontainersrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## restartContainer + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.docker.restartContainer({ + containerId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { dockerRestartContainer } from "dokploy/funcs/dockerRestartContainer.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await dockerRestartContainer(dokploy, { + containerId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("dockerRestartContainer failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DockerRestartContainerRequest](../../models/operations/dockerrestartcontainerrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## getConfig + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.docker.getConfig({ + containerId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { dockerGetConfig } from "dokploy/funcs/dockerGetConfig.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await dockerGetConfig(dokploy, { + containerId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("dockerGetConfig failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DockerGetConfigRequest](../../models/operations/dockergetconfigrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## getContainersByAppNameMatch + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.docker.getContainersByAppNameMatch({ + appName: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { dockerGetContainersByAppNameMatch } from "dokploy/funcs/dockerGetContainersByAppNameMatch.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await dockerGetContainersByAppNameMatch(dokploy, { + appName: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("dockerGetContainersByAppNameMatch failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DockerGetContainersByAppNameMatchRequest](../../models/operations/dockergetcontainersbyappnamematchrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## getContainersByAppLabel + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.docker.getContainersByAppLabel({ + appName: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { dockerGetContainersByAppLabel } from "dokploy/funcs/dockerGetContainersByAppLabel.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await dockerGetContainersByAppLabel(dokploy, { + appName: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("dockerGetContainersByAppLabel failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DockerGetContainersByAppLabelRequest](../../models/operations/dockergetcontainersbyapplabelrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/dokploy/README.md b/docs/sdks/dokploy/README.md new file mode 100644 index 0000000..4bf8c39 --- /dev/null +++ b/docs/sdks/dokploy/README.md @@ -0,0 +1,8 @@ +# Dokploy SDK + +## Overview + +Dokploy API: Endpoints for dokploy + + +### Available Operations diff --git a/docs/sdks/domain/README.md b/docs/sdks/domain/README.md new file mode 100644 index 0000000..1e2d517 --- /dev/null +++ b/docs/sdks/domain/README.md @@ -0,0 +1,513 @@ +# Domain +(*domain*) + +## Overview + +### Available Operations + +* [create](#create) +* [byApplicationId](#byapplicationid) +* [byComposeId](#bycomposeid) +* [generateDomain](#generatedomain) +* [update](#update) +* [get](#get) +* [delete](#delete) + +## create + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.domain.create({ + host: "musty-merit.net", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { domainCreate } from "dokploy/funcs/domainCreate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await domainCreate(dokploy, { + host: "musty-merit.net", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("domainCreate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DomainCreateRequest](../../models/operations/domaincreaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## byApplicationId + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.domain.byApplicationId({ + applicationId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { domainByApplicationId } from "dokploy/funcs/domainByApplicationId.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await domainByApplicationId(dokploy, { + applicationId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("domainByApplicationId failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DomainByApplicationIdRequest](../../models/operations/domainbyapplicationidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## byComposeId + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.domain.byComposeId({ + composeId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { domainByComposeId } from "dokploy/funcs/domainByComposeId.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await domainByComposeId(dokploy, { + composeId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("domainByComposeId failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DomainByComposeIdRequest](../../models/operations/domainbycomposeidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## generateDomain + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.domain.generateDomain({ + appName: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { domainGenerateDomain } from "dokploy/funcs/domainGenerateDomain.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await domainGenerateDomain(dokploy, { + appName: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("domainGenerateDomain failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DomainGenerateDomainRequest](../../models/operations/domaingeneratedomainrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## update + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.domain.update({ + host: "unruly-toothbrush.info", + domainId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { domainUpdate } from "dokploy/funcs/domainUpdate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await domainUpdate(dokploy, { + host: "unruly-toothbrush.info", + domainId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("domainUpdate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DomainUpdateRequest](../../models/operations/domainupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## get + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.domain.get({ + domainId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { domainGet } from "dokploy/funcs/domainGet.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await domainGet(dokploy, { + domainId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("domainGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DomainOneRequest](../../models/operations/domainonerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## delete + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.domain.delete({ + domainId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { domainDelete } from "dokploy/funcs/domainDelete.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await domainDelete(dokploy, { + domainId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("domainDelete failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DomainDeleteRequest](../../models/operations/domaindeleterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/github/README.md b/docs/sdks/github/README.md new file mode 100644 index 0000000..499dbb9 --- /dev/null +++ b/docs/sdks/github/README.md @@ -0,0 +1,440 @@ +# Github +(*github*) + +## Overview + +### Available Operations + +* [one](#one) +* [getRepositories](#getrepositories) +* [getBranches](#getbranches) +* [getProviders](#getproviders) +* [testConnection](#testconnection) +* [update](#update) + +## one + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.github.one({ + githubId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { githubOne } from "dokploy/funcs/githubOne.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await githubOne(dokploy, { + githubId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("githubOne failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GithubOneRequest](../../models/operations/githubonerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## getRepositories + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.github.getRepositories({ + githubId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { githubGetRepositories } from "dokploy/funcs/githubGetRepositories.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await githubGetRepositories(dokploy, { + githubId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("githubGetRepositories failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GithubGetGithubRepositoriesRequest](../../models/operations/githubgetgithubrepositoriesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## getBranches + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.github.getBranches({ + repo: "", + owner: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { githubGetBranches } from "dokploy/funcs/githubGetBranches.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await githubGetBranches(dokploy, { + repo: "", + owner: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("githubGetBranches failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GithubGetGithubBranchesRequest](../../models/operations/githubgetgithubbranchesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## getProviders + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.github.getProviders(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { githubGetProviders } from "dokploy/funcs/githubGetProviders.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await githubGetProviders(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("githubGetProviders failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## testConnection + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.github.testConnection({ + githubId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { githubTestConnection } from "dokploy/funcs/githubTestConnection.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await githubTestConnection(dokploy, { + githubId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("githubTestConnection failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GithubTestConnectionRequest](../../models/operations/githubtestconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## update + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.github.update({ + githubId: "", + gitProviderId: "", + name: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { githubUpdate } from "dokploy/funcs/githubUpdate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await githubUpdate(dokploy, { + githubId: "", + gitProviderId: "", + name: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("githubUpdate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GithubUpdateRequest](../../models/operations/githubupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/gitlab/README.md b/docs/sdks/gitlab/README.md new file mode 100644 index 0000000..7aa1d2d --- /dev/null +++ b/docs/sdks/gitlab/README.md @@ -0,0 +1,510 @@ +# Gitlab +(*gitlab*) + +## Overview + +### Available Operations + +* [create](#create) +* [one](#one) +* [providers](#providers) +* [getGitlabRepositories](#getgitlabrepositories) +* [getGitlabBranches](#getgitlabbranches) +* [testConnection](#testconnection) +* [update](#update) + +## create + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.gitlab.create({ + authId: "", + name: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { gitlabCreate } from "dokploy/funcs/gitlabCreate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await gitlabCreate(dokploy, { + authId: "", + name: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("gitlabCreate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GitlabCreateRequest](../../models/operations/gitlabcreaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## one + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.gitlab.one({ + gitlabId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { gitlabOne } from "dokploy/funcs/gitlabOne.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await gitlabOne(dokploy, { + gitlabId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("gitlabOne failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GitlabOneRequest](../../models/operations/gitlabonerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## providers + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.gitlab.providers(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { gitlabProviders } from "dokploy/funcs/gitlabProviders.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await gitlabProviders(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("gitlabProviders failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## getGitlabRepositories + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.gitlab.getGitlabRepositories({ + gitlabId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { gitlabGetGitlabRepositories } from "dokploy/funcs/gitlabGetGitlabRepositories.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await gitlabGetGitlabRepositories(dokploy, { + gitlabId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("gitlabGetGitlabRepositories failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GitlabGetGitlabRepositoriesRequest](../../models/operations/gitlabgetgitlabrepositoriesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## getGitlabBranches + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.gitlab.getGitlabBranches({ + owner: "", + repo: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { gitlabGetGitlabBranches } from "dokploy/funcs/gitlabGetGitlabBranches.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await gitlabGetGitlabBranches(dokploy, { + owner: "", + repo: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("gitlabGetGitlabBranches failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GitlabGetGitlabBranchesRequest](../../models/operations/gitlabgetgitlabbranchesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## testConnection + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.gitlab.testConnection({}); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { gitlabTestConnection } from "dokploy/funcs/gitlabTestConnection.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await gitlabTestConnection(dokploy, {}); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("gitlabTestConnection failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GitlabTestConnectionRequest](../../models/operations/gitlabtestconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## update + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.gitlab.update({ + gitlabId: "", + gitProviderId: "", + name: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { gitlabUpdate } from "dokploy/funcs/gitlabUpdate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await gitlabUpdate(dokploy, { + gitlabId: "", + gitProviderId: "", + name: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("gitlabUpdate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GitlabUpdateRequest](../../models/operations/gitlabupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/gitprovider/README.md b/docs/sdks/gitprovider/README.md new file mode 100644 index 0000000..8fbd77a --- /dev/null +++ b/docs/sdks/gitprovider/README.md @@ -0,0 +1,146 @@ +# GitProvider +(*gitProvider*) + +## Overview + +### Available Operations + +* [getAll](#getall) +* [remove](#remove) + +## getAll + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.gitProvider.getAll(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { gitProviderGetAll } from "dokploy/funcs/gitProviderGetAll.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await gitProviderGetAll(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("gitProviderGetAll failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## remove + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.gitProvider.remove({ + gitProviderId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { gitProviderRemove } from "dokploy/funcs/gitProviderRemove.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await gitProviderRemove(dokploy, { + gitProviderId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("gitProviderRemove failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GitProviderRemoveRequest](../../models/operations/gitproviderremoverequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/mariadb/README.md b/docs/sdks/mariadb/README.md new file mode 100644 index 0000000..c3790c2 --- /dev/null +++ b/docs/sdks/mariadb/README.md @@ -0,0 +1,817 @@ +# Mariadb +(*mariadb*) + +## Overview + +### Available Operations + +* [create](#create) +* [get](#get) +* [start](#start) +* [stop](#stop) +* [saveExternalPort](#saveexternalport) +* [deploy](#deploy) +* [changeStatus](#changestatus) +* [remove](#remove) +* [saveEnvironment](#saveenvironment) +* [reload](#reload) +* [update](#update) + +## create + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.mariadb.create({ + name: "", + appName: "", + databaseRootPassword: "", + projectId: "", + databaseName: "", + databaseUser: "", + databasePassword: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { mariadbCreate } from "dokploy/funcs/mariadbCreate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await mariadbCreate(dokploy, { + name: "", + appName: "", + databaseRootPassword: "", + projectId: "", + databaseName: "", + databaseUser: "", + databasePassword: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mariadbCreate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MariadbCreateRequest](../../models/operations/mariadbcreaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## get + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.mariadb.get({ + mariadbId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { mariadbGet } from "dokploy/funcs/mariadbGet.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await mariadbGet(dokploy, { + mariadbId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mariadbGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MariadbOneRequest](../../models/operations/mariadbonerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## start + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.mariadb.start({ + mariadbId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { mariadbStart } from "dokploy/funcs/mariadbStart.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await mariadbStart(dokploy, { + mariadbId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mariadbStart failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MariadbStartRequest](../../models/operations/mariadbstartrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## stop + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.mariadb.stop({ + mariadbId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { mariadbStop } from "dokploy/funcs/mariadbStop.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await mariadbStop(dokploy, { + mariadbId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mariadbStop failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MariadbStopRequest](../../models/operations/mariadbstoprequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## saveExternalPort + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.mariadb.saveExternalPort({ + mariadbId: "", + externalPort: 1693.93, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { mariadbSaveExternalPort } from "dokploy/funcs/mariadbSaveExternalPort.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await mariadbSaveExternalPort(dokploy, { + mariadbId: "", + externalPort: 1693.93, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mariadbSaveExternalPort failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MariadbSaveExternalPortRequest](../../models/operations/mariadbsaveexternalportrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## deploy + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.mariadb.deploy({ + mariadbId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { mariadbDeploy } from "dokploy/funcs/mariadbDeploy.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await mariadbDeploy(dokploy, { + mariadbId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mariadbDeploy failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MariadbDeployRequest](../../models/operations/mariadbdeployrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## changeStatus + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.mariadb.changeStatus({ + mariadbId: "", + applicationStatus: "idle", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { mariadbChangeStatus } from "dokploy/funcs/mariadbChangeStatus.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await mariadbChangeStatus(dokploy, { + mariadbId: "", + applicationStatus: "idle", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mariadbChangeStatus failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MariadbChangeStatusRequest](../../models/operations/mariadbchangestatusrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## remove + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.mariadb.remove({ + mariadbId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { mariadbRemove } from "dokploy/funcs/mariadbRemove.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await mariadbRemove(dokploy, { + mariadbId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mariadbRemove failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MariadbRemoveRequest](../../models/operations/mariadbremoverequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## saveEnvironment + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.mariadb.saveEnvironment({ + mariadbId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { mariadbSaveEnvironment } from "dokploy/funcs/mariadbSaveEnvironment.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await mariadbSaveEnvironment(dokploy, { + mariadbId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mariadbSaveEnvironment failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MariadbSaveEnvironmentRequest](../../models/operations/mariadbsaveenvironmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## reload + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.mariadb.reload({ + mariadbId: "", + appName: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { mariadbReload } from "dokploy/funcs/mariadbReload.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await mariadbReload(dokploy, { + mariadbId: "", + appName: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mariadbReload failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MariadbReloadRequest](../../models/operations/mariadbreloadrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## update + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.mariadb.update({ + mariadbId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { mariadbUpdate } from "dokploy/funcs/mariadbUpdate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await mariadbUpdate(dokploy, { + mariadbId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mariadbUpdate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MariadbUpdateRequest](../../models/operations/mariadbupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/mongo/README.md b/docs/sdks/mongo/README.md new file mode 100644 index 0000000..3d4086a --- /dev/null +++ b/docs/sdks/mongo/README.md @@ -0,0 +1,813 @@ +# Mongo +(*mongo*) + +## Overview + +### Available Operations + +* [create](#create) +* [get](#get) +* [start](#start) +* [stop](#stop) +* [saveExternalPort](#saveexternalport) +* [deploy](#deploy) +* [changeStatus](#changestatus) +* [reload](#reload) +* [remove](#remove) +* [saveEnvironment](#saveenvironment) +* [update](#update) + +## create + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.mongo.create({ + name: "", + appName: "", + projectId: "", + databaseUser: "", + databasePassword: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { mongoCreate } from "dokploy/funcs/mongoCreate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await mongoCreate(dokploy, { + name: "", + appName: "", + projectId: "", + databaseUser: "", + databasePassword: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mongoCreate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MongoCreateRequest](../../models/operations/mongocreaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## get + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.mongo.get({ + mongoId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { mongoGet } from "dokploy/funcs/mongoGet.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await mongoGet(dokploy, { + mongoId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mongoGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MongoOneRequest](../../models/operations/mongoonerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## start + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.mongo.start({ + mongoId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { mongoStart } from "dokploy/funcs/mongoStart.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await mongoStart(dokploy, { + mongoId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mongoStart failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MongoStartRequest](../../models/operations/mongostartrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## stop + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.mongo.stop({ + mongoId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { mongoStop } from "dokploy/funcs/mongoStop.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await mongoStop(dokploy, { + mongoId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mongoStop failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MongoStopRequest](../../models/operations/mongostoprequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## saveExternalPort + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.mongo.saveExternalPort({ + mongoId: "", + externalPort: null, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { mongoSaveExternalPort } from "dokploy/funcs/mongoSaveExternalPort.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await mongoSaveExternalPort(dokploy, { + mongoId: "", + externalPort: null, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mongoSaveExternalPort failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MongoSaveExternalPortRequest](../../models/operations/mongosaveexternalportrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## deploy + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.mongo.deploy({ + mongoId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { mongoDeploy } from "dokploy/funcs/mongoDeploy.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await mongoDeploy(dokploy, { + mongoId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mongoDeploy failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MongoDeployRequest](../../models/operations/mongodeployrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## changeStatus + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.mongo.changeStatus({ + mongoId: "", + applicationStatus: "error", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { mongoChangeStatus } from "dokploy/funcs/mongoChangeStatus.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await mongoChangeStatus(dokploy, { + mongoId: "", + applicationStatus: "error", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mongoChangeStatus failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MongoChangeStatusRequest](../../models/operations/mongochangestatusrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## reload + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.mongo.reload({ + mongoId: "", + appName: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { mongoReload } from "dokploy/funcs/mongoReload.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await mongoReload(dokploy, { + mongoId: "", + appName: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mongoReload failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MongoReloadRequest](../../models/operations/mongoreloadrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## remove + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.mongo.remove({ + mongoId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { mongoRemove } from "dokploy/funcs/mongoRemove.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await mongoRemove(dokploy, { + mongoId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mongoRemove failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MongoRemoveRequest](../../models/operations/mongoremoverequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## saveEnvironment + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.mongo.saveEnvironment({ + mongoId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { mongoSaveEnvironment } from "dokploy/funcs/mongoSaveEnvironment.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await mongoSaveEnvironment(dokploy, { + mongoId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mongoSaveEnvironment failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MongoSaveEnvironmentRequest](../../models/operations/mongosaveenvironmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## update + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.mongo.update({ + mongoId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { mongoUpdate } from "dokploy/funcs/mongoUpdate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await mongoUpdate(dokploy, { + mongoId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mongoUpdate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MongoUpdateRequest](../../models/operations/mongoupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/mounts/README.md b/docs/sdks/mounts/README.md new file mode 100644 index 0000000..7ec1784 --- /dev/null +++ b/docs/sdks/mounts/README.md @@ -0,0 +1,299 @@ +# Mounts +(*mounts*) + +## Overview + +### Available Operations + +* [create](#create) +* [remove](#remove) +* [get](#get) +* [update](#update) + +## create + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.mounts.create({ + type: "file", + mountPath: "", + serviceId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { mountsCreate } from "dokploy/funcs/mountsCreate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await mountsCreate(dokploy, { + type: "file", + mountPath: "", + serviceId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mountsCreate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MountsCreateRequest](../../models/operations/mountscreaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## remove + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.mounts.remove({ + mountId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { mountsRemove } from "dokploy/funcs/mountsRemove.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await mountsRemove(dokploy, { + mountId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mountsRemove failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MountsRemoveRequest](../../models/operations/mountsremoverequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## get + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.mounts.get({ + mountId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { mountsGet } from "dokploy/funcs/mountsGet.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await mountsGet(dokploy, { + mountId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mountsGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MountsOneRequest](../../models/operations/mountsonerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## update + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.mounts.update({ + mountId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { mountsUpdate } from "dokploy/funcs/mountsUpdate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await mountsUpdate(dokploy, { + mountId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mountsUpdate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MountsUpdateRequest](../../models/operations/mountsupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/mysql/README.md b/docs/sdks/mysql/README.md new file mode 100644 index 0000000..8132c9f --- /dev/null +++ b/docs/sdks/mysql/README.md @@ -0,0 +1,817 @@ +# Mysql +(*mysql*) + +## Overview + +### Available Operations + +* [create](#create) +* [get](#get) +* [start](#start) +* [stop](#stop) +* [saveExternalPort](#saveexternalport) +* [deploy](#deploy) +* [changeStatus](#changestatus) +* [reload](#reload) +* [remove](#remove) +* [saveEnvironment](#saveenvironment) +* [update](#update) + +## create + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.mysql.create({ + name: "", + appName: "", + projectId: "", + databaseName: "", + databaseUser: "", + databasePassword: "", + databaseRootPassword: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { mysqlCreate } from "dokploy/funcs/mysqlCreate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await mysqlCreate(dokploy, { + name: "", + appName: "", + projectId: "", + databaseName: "", + databaseUser: "", + databasePassword: "", + databaseRootPassword: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mysqlCreate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MysqlCreateRequest](../../models/operations/mysqlcreaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## get + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.mysql.get({ + mysqlId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { mysqlGet } from "dokploy/funcs/mysqlGet.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await mysqlGet(dokploy, { + mysqlId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mysqlGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MysqlOneRequest](../../models/operations/mysqlonerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## start + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.mysql.start({ + mysqlId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { mysqlStart } from "dokploy/funcs/mysqlStart.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await mysqlStart(dokploy, { + mysqlId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mysqlStart failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MysqlStartRequest](../../models/operations/mysqlstartrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## stop + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.mysql.stop({ + mysqlId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { mysqlStop } from "dokploy/funcs/mysqlStop.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await mysqlStop(dokploy, { + mysqlId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mysqlStop failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MysqlStopRequest](../../models/operations/mysqlstoprequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## saveExternalPort + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.mysql.saveExternalPort({ + mysqlId: "", + externalPort: 6359.48, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { mysqlSaveExternalPort } from "dokploy/funcs/mysqlSaveExternalPort.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await mysqlSaveExternalPort(dokploy, { + mysqlId: "", + externalPort: 6359.48, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mysqlSaveExternalPort failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MysqlSaveExternalPortRequest](../../models/operations/mysqlsaveexternalportrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## deploy + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.mysql.deploy({ + mysqlId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { mysqlDeploy } from "dokploy/funcs/mysqlDeploy.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await mysqlDeploy(dokploy, { + mysqlId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mysqlDeploy failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MysqlDeployRequest](../../models/operations/mysqldeployrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## changeStatus + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.mysql.changeStatus({ + mysqlId: "", + applicationStatus: "error", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { mysqlChangeStatus } from "dokploy/funcs/mysqlChangeStatus.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await mysqlChangeStatus(dokploy, { + mysqlId: "", + applicationStatus: "error", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mysqlChangeStatus failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MysqlChangeStatusRequest](../../models/operations/mysqlchangestatusrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## reload + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.mysql.reload({ + mysqlId: "", + appName: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { mysqlReload } from "dokploy/funcs/mysqlReload.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await mysqlReload(dokploy, { + mysqlId: "", + appName: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mysqlReload failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MysqlReloadRequest](../../models/operations/mysqlreloadrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## remove + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.mysql.remove({ + mysqlId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { mysqlRemove } from "dokploy/funcs/mysqlRemove.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await mysqlRemove(dokploy, { + mysqlId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mysqlRemove failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MysqlRemoveRequest](../../models/operations/mysqlremoverequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## saveEnvironment + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.mysql.saveEnvironment({ + mysqlId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { mysqlSaveEnvironment } from "dokploy/funcs/mysqlSaveEnvironment.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await mysqlSaveEnvironment(dokploy, { + mysqlId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mysqlSaveEnvironment failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MysqlSaveEnvironmentRequest](../../models/operations/mysqlsaveenvironmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## update + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.mysql.update({ + mysqlId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { mysqlUpdate } from "dokploy/funcs/mysqlUpdate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await mysqlUpdate(dokploy, { + mysqlId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mysqlUpdate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MysqlUpdateRequest](../../models/operations/mysqlupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/notification/README.md b/docs/sdks/notification/README.md new file mode 100644 index 0000000..916c1e1 --- /dev/null +++ b/docs/sdks/notification/README.md @@ -0,0 +1,1100 @@ +# Notification +(*notification*) + +## Overview + +### Available Operations + +* [createSlack](#createslack) +* [updateSlack](#updateslack) +* [testSlackConnection](#testslackconnection) +* [createTelegram](#createtelegram) +* [updateTelegram](#updatetelegram) +* [testTelegramConnection](#testtelegramconnection) +* [createDiscord](#creatediscord) +* [updateDiscord](#updatediscord) +* [testDiscordConnection](#testdiscordconnection) +* [createEmail](#createemail) +* [updateEmail](#updateemail) +* [testEmailConnection](#testemailconnection) +* [remove](#remove) +* [getAll](#getall) + +## createSlack + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.notification.createSlack({ + appBuildError: true, + databaseBackup: true, + dokployRestart: false, + name: "", + appDeploy: false, + dockerCleanup: false, + webhookUrl: "https://familiar-custody.name", + channel: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { notificationCreateSlack } from "dokploy/funcs/notificationCreateSlack.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await notificationCreateSlack(dokploy, { + appBuildError: true, + databaseBackup: true, + dokployRestart: false, + name: "", + appDeploy: false, + dockerCleanup: false, + webhookUrl: "https://familiar-custody.name", + channel: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("notificationCreateSlack failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.NotificationCreateSlackRequest](../../models/operations/notificationcreateslackrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## updateSlack + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.notification.updateSlack({ + notificationId: "", + slackId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { notificationUpdateSlack } from "dokploy/funcs/notificationUpdateSlack.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await notificationUpdateSlack(dokploy, { + notificationId: "", + slackId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("notificationUpdateSlack failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.NotificationUpdateSlackRequest](../../models/operations/notificationupdateslackrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## testSlackConnection + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.notification.testSlackConnection({ + webhookUrl: "https://pointed-institute.com", + channel: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { notificationTestSlackConnection } from "dokploy/funcs/notificationTestSlackConnection.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await notificationTestSlackConnection(dokploy, { + webhookUrl: "https://pointed-institute.com", + channel: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("notificationTestSlackConnection failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.NotificationTestSlackConnectionRequest](../../models/operations/notificationtestslackconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## createTelegram + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.notification.createTelegram({ + appBuildError: false, + databaseBackup: true, + dokployRestart: false, + name: "", + appDeploy: true, + dockerCleanup: true, + botToken: "", + chatId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { notificationCreateTelegram } from "dokploy/funcs/notificationCreateTelegram.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await notificationCreateTelegram(dokploy, { + appBuildError: false, + databaseBackup: true, + dokployRestart: false, + name: "", + appDeploy: true, + dockerCleanup: true, + botToken: "", + chatId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("notificationCreateTelegram failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.NotificationCreateTelegramRequest](../../models/operations/notificationcreatetelegramrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## updateTelegram + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.notification.updateTelegram({ + notificationId: "", + telegramId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { notificationUpdateTelegram } from "dokploy/funcs/notificationUpdateTelegram.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await notificationUpdateTelegram(dokploy, { + notificationId: "", + telegramId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("notificationUpdateTelegram failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.NotificationUpdateTelegramRequest](../../models/operations/notificationupdatetelegramrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## testTelegramConnection + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.notification.testTelegramConnection({ + botToken: "", + chatId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { notificationTestTelegramConnection } from "dokploy/funcs/notificationTestTelegramConnection.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await notificationTestTelegramConnection(dokploy, { + botToken: "", + chatId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("notificationTestTelegramConnection failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.NotificationTestTelegramConnectionRequest](../../models/operations/notificationtesttelegramconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## createDiscord + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.notification.createDiscord({ + appBuildError: false, + databaseBackup: true, + dokployRestart: false, + name: "", + appDeploy: false, + dockerCleanup: true, + webhookUrl: "https://present-sport.net/", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { notificationCreateDiscord } from "dokploy/funcs/notificationCreateDiscord.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await notificationCreateDiscord(dokploy, { + appBuildError: false, + databaseBackup: true, + dokployRestart: false, + name: "", + appDeploy: false, + dockerCleanup: true, + webhookUrl: "https://present-sport.net/", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("notificationCreateDiscord failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.NotificationCreateDiscordRequest](../../models/operations/notificationcreatediscordrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## updateDiscord + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.notification.updateDiscord({ + notificationId: "", + discordId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { notificationUpdateDiscord } from "dokploy/funcs/notificationUpdateDiscord.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await notificationUpdateDiscord(dokploy, { + notificationId: "", + discordId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("notificationUpdateDiscord failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.NotificationUpdateDiscordRequest](../../models/operations/notificationupdatediscordrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## testDiscordConnection + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.notification.testDiscordConnection({ + webhookUrl: "https://radiant-fireplace.net", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { notificationTestDiscordConnection } from "dokploy/funcs/notificationTestDiscordConnection.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await notificationTestDiscordConnection(dokploy, { + webhookUrl: "https://radiant-fireplace.net", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("notificationTestDiscordConnection failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.NotificationTestDiscordConnectionRequest](../../models/operations/notificationtestdiscordconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## createEmail + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.notification.createEmail({ + appBuildError: false, + databaseBackup: false, + dokployRestart: true, + name: "", + appDeploy: false, + dockerCleanup: false, + smtpServer: "", + smtpPort: 8149.3, + username: "Krystal95", + password: "LGAnX2vuZKQTVc9", + fromAddress: "", + toAddresses: [], + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { notificationCreateEmail } from "dokploy/funcs/notificationCreateEmail.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await notificationCreateEmail(dokploy, { + appBuildError: false, + databaseBackup: false, + dokployRestart: true, + name: "", + appDeploy: false, + dockerCleanup: false, + smtpServer: "", + smtpPort: 8149.3, + username: "Krystal95", + password: "LGAnX2vuZKQTVc9", + fromAddress: "", + toAddresses: [], + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("notificationCreateEmail failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.NotificationCreateEmailRequest](../../models/operations/notificationcreateemailrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## updateEmail + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.notification.updateEmail({ + notificationId: "", + emailId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { notificationUpdateEmail } from "dokploy/funcs/notificationUpdateEmail.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await notificationUpdateEmail(dokploy, { + notificationId: "", + emailId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("notificationUpdateEmail failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.NotificationUpdateEmailRequest](../../models/operations/notificationupdateemailrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## testEmailConnection + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.notification.testEmailConnection({ + smtpServer: "", + smtpPort: 4799.46, + username: "Rollin96", + password: "xHtlQtIjbn2x0yV", + toAddresses: [ + "", + "", + ], + fromAddress: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { notificationTestEmailConnection } from "dokploy/funcs/notificationTestEmailConnection.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await notificationTestEmailConnection(dokploy, { + smtpServer: "", + smtpPort: 4799.46, + username: "Rollin96", + password: "xHtlQtIjbn2x0yV", + toAddresses: [ + "", + "", + ], + fromAddress: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("notificationTestEmailConnection failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.NotificationTestEmailConnectionRequest](../../models/operations/notificationtestemailconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## remove + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.notification.remove({ + notificationId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { notificationRemove } from "dokploy/funcs/notificationRemove.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await notificationRemove(dokploy, { + notificationId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("notificationRemove failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.NotificationRemoveRequest](../../models/operations/notificationremoverequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## getAll + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.notification.getAll(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { notificationGetAll } from "dokploy/funcs/notificationGetAll.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await notificationGetAll(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("notificationGetAll failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/notifications/README.md b/docs/sdks/notifications/README.md new file mode 100644 index 0000000..e8740e5 --- /dev/null +++ b/docs/sdks/notifications/README.md @@ -0,0 +1,79 @@ +# Notifications +(*notifications*) + +## Overview + +### Available Operations + +* [get](#get) + +## get + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.notifications.get({ + notificationId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { notificationsGet } from "dokploy/funcs/notificationsGet.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await notificationsGet(dokploy, { + notificationId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("notificationsGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.NotificationOneRequest](../../models/operations/notificationonerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/port/README.md b/docs/sdks/port/README.md new file mode 100644 index 0000000..b89bdd3 --- /dev/null +++ b/docs/sdks/port/README.md @@ -0,0 +1,303 @@ +# Port +(*port*) + +## Overview + +### Available Operations + +* [create](#create) +* [get](#get) +* [delete](#delete) +* [update](#update) + +## create + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.port.create({ + publishedPort: 9167.77, + targetPort: 2161.7, + applicationId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { portCreate } from "dokploy/funcs/portCreate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await portCreate(dokploy, { + publishedPort: 9167.77, + targetPort: 2161.7, + applicationId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("portCreate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PortCreateRequest](../../models/operations/portcreaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## get + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.port.get({ + portId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { portGet } from "dokploy/funcs/portGet.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await portGet(dokploy, { + portId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("portGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PortOneRequest](../../models/operations/portonerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## delete + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.port.delete({ + portId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { portDelete } from "dokploy/funcs/portDelete.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await portDelete(dokploy, { + portId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("portDelete failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PortDeleteRequest](../../models/operations/portdeleterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## update + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.port.update({ + portId: "", + publishedPort: 7240.07, + targetPort: 9496, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { portUpdate } from "dokploy/funcs/portUpdate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await portUpdate(dokploy, { + portId: "", + publishedPort: 7240.07, + targetPort: 9496, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("portUpdate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PortUpdateRequest](../../models/operations/portupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/postgres/README.md b/docs/sdks/postgres/README.md new file mode 100644 index 0000000..7f55e86 --- /dev/null +++ b/docs/sdks/postgres/README.md @@ -0,0 +1,815 @@ +# Postgres +(*postgres*) + +## Overview + +### Available Operations + +* [create](#create) +* [get](#get) +* [start](#start) +* [stop](#stop) +* [saveExternalPort](#saveexternalport) +* [deploy](#deploy) +* [changeStatus](#changestatus) +* [remove](#remove) +* [saveEnvironment](#saveenvironment) +* [reload](#reload) +* [update](#update) + +## create + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.postgres.create({ + name: "", + appName: "", + databaseName: "", + databaseUser: "", + databasePassword: "", + projectId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { postgresCreate } from "dokploy/funcs/postgresCreate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await postgresCreate(dokploy, { + name: "", + appName: "", + databaseName: "", + databaseUser: "", + databasePassword: "", + projectId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("postgresCreate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PostgresCreateRequest](../../models/operations/postgrescreaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## get + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.postgres.get({ + postgresId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { postgresGet } from "dokploy/funcs/postgresGet.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await postgresGet(dokploy, { + postgresId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("postgresGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PostgresOneRequest](../../models/operations/postgresonerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## start + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.postgres.start({ + postgresId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { postgresStart } from "dokploy/funcs/postgresStart.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await postgresStart(dokploy, { + postgresId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("postgresStart failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PostgresStartRequest](../../models/operations/postgresstartrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## stop + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.postgres.stop({ + postgresId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { postgresStop } from "dokploy/funcs/postgresStop.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await postgresStop(dokploy, { + postgresId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("postgresStop failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PostgresStopRequest](../../models/operations/postgresstoprequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## saveExternalPort + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.postgres.saveExternalPort({ + postgresId: "", + externalPort: 3135.23, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { postgresSaveExternalPort } from "dokploy/funcs/postgresSaveExternalPort.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await postgresSaveExternalPort(dokploy, { + postgresId: "", + externalPort: 3135.23, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("postgresSaveExternalPort failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PostgresSaveExternalPortRequest](../../models/operations/postgressaveexternalportrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## deploy + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.postgres.deploy({ + postgresId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { postgresDeploy } from "dokploy/funcs/postgresDeploy.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await postgresDeploy(dokploy, { + postgresId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("postgresDeploy failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PostgresDeployRequest](../../models/operations/postgresdeployrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## changeStatus + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.postgres.changeStatus({ + postgresId: "", + applicationStatus: "idle", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { postgresChangeStatus } from "dokploy/funcs/postgresChangeStatus.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await postgresChangeStatus(dokploy, { + postgresId: "", + applicationStatus: "idle", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("postgresChangeStatus failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PostgresChangeStatusRequest](../../models/operations/postgreschangestatusrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## remove + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.postgres.remove({ + postgresId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { postgresRemove } from "dokploy/funcs/postgresRemove.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await postgresRemove(dokploy, { + postgresId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("postgresRemove failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PostgresRemoveRequest](../../models/operations/postgresremoverequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## saveEnvironment + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.postgres.saveEnvironment({ + postgresId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { postgresSaveEnvironment } from "dokploy/funcs/postgresSaveEnvironment.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await postgresSaveEnvironment(dokploy, { + postgresId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("postgresSaveEnvironment failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PostgresSaveEnvironmentRequest](../../models/operations/postgressaveenvironmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## reload + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.postgres.reload({ + postgresId: "", + appName: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { postgresReload } from "dokploy/funcs/postgresReload.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await postgresReload(dokploy, { + postgresId: "", + appName: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("postgresReload failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PostgresReloadRequest](../../models/operations/postgresreloadrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## update + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.postgres.update({ + postgresId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { postgresUpdate } from "dokploy/funcs/postgresUpdate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await postgresUpdate(dokploy, { + postgresId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("postgresUpdate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PostgresUpdateRequest](../../models/operations/postgresupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/project/README.md b/docs/sdks/project/README.md new file mode 100644 index 0000000..58c5b31 --- /dev/null +++ b/docs/sdks/project/README.md @@ -0,0 +1,364 @@ +# Project +(*project*) + +## Overview + +### Available Operations + +* [create](#create) +* [get](#get) +* [all](#all) +* [remove](#remove) +* [update](#update) + +## create + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.project.create({ + name: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { projectCreate } from "dokploy/funcs/projectCreate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await projectCreate(dokploy, { + name: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("projectCreate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ProjectCreateRequest](../../models/operations/projectcreaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## get + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.project.get({ + projectId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { projectGet } from "dokploy/funcs/projectGet.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await projectGet(dokploy, { + projectId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("projectGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ProjectOneRequest](../../models/operations/projectonerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## all + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.project.all(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { projectAll } from "dokploy/funcs/projectAll.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await projectAll(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("projectAll failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## remove + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.project.remove({ + projectId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { projectRemove } from "dokploy/funcs/projectRemove.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await projectRemove(dokploy, { + projectId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("projectRemove failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ProjectRemoveRequest](../../models/operations/projectremoverequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## update + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.project.update({ + name: "", + projectId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { projectUpdate } from "dokploy/funcs/projectUpdate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await projectUpdate(dokploy, { + name: "", + projectId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("projectUpdate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ProjectUpdateRequest](../../models/operations/projectupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/redirects/README.md b/docs/sdks/redirects/README.md new file mode 100644 index 0000000..6af3100 --- /dev/null +++ b/docs/sdks/redirects/README.md @@ -0,0 +1,307 @@ +# Redirects +(*redirects*) + +## Overview + +### Available Operations + +* [create](#create) +* [getOne](#getone) +* [delete](#delete) +* [update](#update) + +## create + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.redirects.create({ + regex: "", + replacement: "", + permanent: false, + applicationId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { redirectsCreate } from "dokploy/funcs/redirectsCreate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await redirectsCreate(dokploy, { + regex: "", + replacement: "", + permanent: false, + applicationId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("redirectsCreate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RedirectsCreateRequest](../../models/operations/redirectscreaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## getOne + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.redirects.getOne({ + redirectId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { redirectsGetOne } from "dokploy/funcs/redirectsGetOne.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await redirectsGetOne(dokploy, { + redirectId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("redirectsGetOne failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RedirectsOneRequest](../../models/operations/redirectsonerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## delete + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.redirects.delete({ + redirectId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { redirectsDelete } from "dokploy/funcs/redirectsDelete.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await redirectsDelete(dokploy, { + redirectId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("redirectsDelete failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RedirectsDeleteRequest](../../models/operations/redirectsdeleterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## update + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.redirects.update({ + redirectId: "", + regex: "", + replacement: "", + permanent: false, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { redirectsUpdate } from "dokploy/funcs/redirectsUpdate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await redirectsUpdate(dokploy, { + redirectId: "", + regex: "", + replacement: "", + permanent: false, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("redirectsUpdate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RedirectsUpdateRequest](../../models/operations/redirectsupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/redis/README.md b/docs/sdks/redis/README.md new file mode 100644 index 0000000..c41bcec --- /dev/null +++ b/docs/sdks/redis/README.md @@ -0,0 +1,811 @@ +# Redis +(*redis*) + +## Overview + +### Available Operations + +* [create](#create) +* [get](#get) +* [start](#start) +* [reload](#reload) +* [stop](#stop) +* [saveExternalPort](#saveexternalport) +* [deploy](#deploy) +* [changeStatus](#changestatus) +* [remove](#remove) +* [saveEnvironment](#saveenvironment) +* [update](#update) + +## create + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.redis.create({ + name: "", + appName: "", + databasePassword: "", + projectId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { redisCreate } from "dokploy/funcs/redisCreate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await redisCreate(dokploy, { + name: "", + appName: "", + databasePassword: "", + projectId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("redisCreate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RedisCreateRequest](../../models/operations/rediscreaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## get + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.redis.get({ + redisId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { redisGet } from "dokploy/funcs/redisGet.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await redisGet(dokploy, { + redisId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("redisGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RedisOneRequest](../../models/operations/redisonerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## start + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.redis.start({ + redisId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { redisStart } from "dokploy/funcs/redisStart.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await redisStart(dokploy, { + redisId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("redisStart failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RedisStartRequest](../../models/operations/redisstartrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## reload + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.redis.reload({ + redisId: "", + appName: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { redisReload } from "dokploy/funcs/redisReload.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await redisReload(dokploy, { + redisId: "", + appName: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("redisReload failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RedisReloadRequest](../../models/operations/redisreloadrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## stop + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.redis.stop({ + redisId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { redisStop } from "dokploy/funcs/redisStop.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await redisStop(dokploy, { + redisId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("redisStop failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RedisStopRequest](../../models/operations/redisstoprequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## saveExternalPort + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.redis.saveExternalPort({ + redisId: "", + externalPort: 8375.12, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { redisSaveExternalPort } from "dokploy/funcs/redisSaveExternalPort.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await redisSaveExternalPort(dokploy, { + redisId: "", + externalPort: 8375.12, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("redisSaveExternalPort failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RedisSaveExternalPortRequest](../../models/operations/redissaveexternalportrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## deploy + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.redis.deploy({ + redisId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { redisDeploy } from "dokploy/funcs/redisDeploy.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await redisDeploy(dokploy, { + redisId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("redisDeploy failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RedisDeployRequest](../../models/operations/redisdeployrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## changeStatus + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.redis.changeStatus({ + redisId: "", + applicationStatus: "error", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { redisChangeStatus } from "dokploy/funcs/redisChangeStatus.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await redisChangeStatus(dokploy, { + redisId: "", + applicationStatus: "error", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("redisChangeStatus failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RedisChangeStatusRequest](../../models/operations/redischangestatusrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## remove + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.redis.remove({ + redisId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { redisRemove } from "dokploy/funcs/redisRemove.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await redisRemove(dokploy, { + redisId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("redisRemove failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RedisRemoveRequest](../../models/operations/redisremoverequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## saveEnvironment + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.redis.saveEnvironment({ + redisId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { redisSaveEnvironment } from "dokploy/funcs/redisSaveEnvironment.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await redisSaveEnvironment(dokploy, { + redisId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("redisSaveEnvironment failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RedisSaveEnvironmentRequest](../../models/operations/redissaveenvironmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## update + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.redis.update({ + redisId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { redisUpdate } from "dokploy/funcs/redisUpdate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await redisUpdate(dokploy, { + redisId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("redisUpdate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RedisUpdateRequest](../../models/operations/redisupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/registry/README.md b/docs/sdks/registry/README.md new file mode 100644 index 0000000..a5648c4 --- /dev/null +++ b/docs/sdks/registry/README.md @@ -0,0 +1,452 @@ +# Registry +(*registry*) + +## Overview + +### Available Operations + +* [create](#create) +* [remove](#remove) +* [update](#update) +* [getAll](#getall) +* [get](#get) +* [testRegistry](#testregistry) + +## create + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.registry.create({ + registryName: "", + username: "Edward97", + password: "Dgmo4uBNDUDA9K5", + registryUrl: "https://cute-declaration.name", + registryType: "cloud", + imagePrefix: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { registryCreate } from "dokploy/funcs/registryCreate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await registryCreate(dokploy, { + registryName: "", + username: "Edward97", + password: "Dgmo4uBNDUDA9K5", + registryUrl: "https://cute-declaration.name", + registryType: "cloud", + imagePrefix: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("registryCreate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RegistryCreateRequest](../../models/operations/registrycreaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## remove + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.registry.remove({ + registryId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { registryRemove } from "dokploy/funcs/registryRemove.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await registryRemove(dokploy, { + registryId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("registryRemove failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RegistryRemoveRequest](../../models/operations/registryremoverequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## update + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.registry.update({ + registryId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { registryUpdate } from "dokploy/funcs/registryUpdate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await registryUpdate(dokploy, { + registryId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("registryUpdate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RegistryUpdateRequest](../../models/operations/registryupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## getAll + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.registry.getAll(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { registryGetAll } from "dokploy/funcs/registryGetAll.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await registryGetAll(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("registryGetAll failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## get + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.registry.get({ + registryId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { registryGet } from "dokploy/funcs/registryGet.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await registryGet(dokploy, { + registryId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("registryGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RegistryOneRequest](../../models/operations/registryonerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## testRegistry + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.registry.testRegistry({ + registryName: "", + username: "Amani_Kohler", + password: "HbHSp2hcDiXugz1", + registryUrl: "https://biodegradable-priesthood.info/", + registryType: "cloud", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { registryTestRegistry } from "dokploy/funcs/registryTestRegistry.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await registryTestRegistry(dokploy, { + registryName: "", + username: "Amani_Kohler", + password: "HbHSp2hcDiXugz1", + registryUrl: "https://biodegradable-priesthood.info/", + registryType: "cloud", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("registryTestRegistry failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RegistryTestRegistryRequest](../../models/operations/registrytestregistryrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/security/README.md b/docs/sdks/security/README.md new file mode 100644 index 0000000..5e22a66 --- /dev/null +++ b/docs/sdks/security/README.md @@ -0,0 +1,303 @@ +# Security +(*security*) + +## Overview + +### Available Operations + +* [create](#create) +* [get](#get) +* [delete](#delete) +* [update](#update) + +## create + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.security.create({ + applicationId: "", + username: "Jaida.Zulauf", + password: "K9baGIdLMCnW0iF", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { securityCreate } from "dokploy/funcs/securityCreate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await securityCreate(dokploy, { + applicationId: "", + username: "Jaida.Zulauf", + password: "K9baGIdLMCnW0iF", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("securityCreate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SecurityCreateRequest](../../models/operations/securitycreaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## get + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.security.get({ + securityId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { securityGet } from "dokploy/funcs/securityGet.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await securityGet(dokploy, { + securityId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("securityGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SecurityOneRequest](../../models/operations/securityonerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## delete + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.security.delete({ + securityId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { securityDelete } from "dokploy/funcs/securityDelete.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await securityDelete(dokploy, { + securityId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("securityDelete failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SecurityDeleteRequest](../../models/operations/securitydeleterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## update + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.security.update({ + securityId: "", + username: "Easter19", + password: "lzeP1olfVZ7Co23", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { securityUpdate } from "dokploy/funcs/securityUpdate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await securityUpdate(dokploy, { + securityId: "", + username: "Easter19", + password: "lzeP1olfVZ7Co23", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("securityUpdate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SecurityUpdateRequest](../../models/operations/securityupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/server/README.md b/docs/sdks/server/README.md new file mode 100644 index 0000000..684752a --- /dev/null +++ b/docs/sdks/server/README.md @@ -0,0 +1,447 @@ +# Server +(*server*) + +## Overview + +### Available Operations + +* [create](#create) +* [all](#all) +* [withSSHKey](#withsshkey) +* [setup](#setup) +* [remove](#remove) +* [update](#update) + +## create + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.server.create({ + name: "", + ipAddress: "8.12.175.213", + port: 9154.55, + username: "Asia_Parker82", + sshKeyId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { serverCreate } from "dokploy/funcs/serverCreate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await serverCreate(dokploy, { + name: "", + ipAddress: "8.12.175.213", + port: 9154.55, + username: "Asia_Parker82", + sshKeyId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("serverCreate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ServerCreateRequest](../../models/operations/servercreaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## all + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.server.all(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { serverAll } from "dokploy/funcs/serverAll.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await serverAll(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("serverAll failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## withSSHKey + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.server.withSSHKey(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { serverWithSSHKey } from "dokploy/funcs/serverWithSSHKey.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await serverWithSSHKey(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("serverWithSSHKey failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## setup + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.server.setup({ + serverId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { serverSetup } from "dokploy/funcs/serverSetup.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await serverSetup(dokploy, { + serverId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("serverSetup failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ServerSetupRequest](../../models/operations/serversetuprequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## remove + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.server.remove({ + serverId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { serverRemove } from "dokploy/funcs/serverRemove.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await serverRemove(dokploy, { + serverId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("serverRemove failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ServerRemoveRequest](../../models/operations/serverremoverequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## update + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.server.update({ + name: "", + serverId: "", + ipAddress: "945d:4a06:ae40:dab4:6ecb:dbfc:8b3d:df1d", + port: 4322.18, + username: "Adelia.Casper", + sshKeyId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { serverUpdate } from "dokploy/funcs/serverUpdate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await serverUpdate(dokploy, { + name: "", + serverId: "", + ipAddress: "945d:4a06:ae40:dab4:6ecb:dbfc:8b3d:df1d", + port: 4322.18, + username: "Adelia.Casper", + sshKeyId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("serverUpdate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ServerUpdateRequest](../../models/operations/serverupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/servers/README.md b/docs/sdks/servers/README.md new file mode 100644 index 0000000..d7ca6e4 --- /dev/null +++ b/docs/sdks/servers/README.md @@ -0,0 +1,79 @@ +# Servers +(*servers*) + +## Overview + +### Available Operations + +* [get](#get) + +## get + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.servers.get({ + serverId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { serversGet } from "dokploy/funcs/serversGet.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await serversGet(dokploy, { + serverId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("serversGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ServerOneRequest](../../models/operations/serveronerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/settings/README.md b/docs/sdks/settings/README.md new file mode 100644 index 0000000..4711057 --- /dev/null +++ b/docs/sdks/settings/README.md @@ -0,0 +1,2617 @@ +# Settings +(*settings*) + +## Overview + +### Available Operations + +* [reloadServer](#reloadserver) +* [reloadTraefik](#reloadtraefik) +* [toggleDashboard](#toggledashboard) +* [cleanUnusedImages](#cleanunusedimages) +* [cleanUnusedVolumes](#cleanunusedvolumes) +* [cleanStoppedContainers](#cleanstoppedcontainers) +* [cleanDockerBuilder](#cleandockerbuilder) +* [cleanDockerPrune](#cleandockerprune) +* [cleanAll](#cleanall) +* [cleanMonitoring](#cleanmonitoring) +* [saveSshPrivateKey](#savesshprivatekey) +* [assignDomainServer](#assigndomainserver) +* [cleanSshPrivateKey](#cleansshprivatekey) +* [updateDockerCleanup](#updatedockercleanup) +* [readTraefikConfig](#readtraefikconfig) +* [updateTraefikConfig](#updatetraefikconfig) +* [readWebServerTraefikConfig](#readwebservertraefikconfig) +* [updateWebServerTraefikConfig](#updatewebservertraefikconfig) +* [readMiddlewareTraefikConfig](#readmiddlewaretraefikconfig) +* [updateMiddlewareTraefikConfig](#updatemiddlewaretraefikconfig) +* [checkAndUpdateImage](#checkandupdateimage) +* [updateServer](#updateserver) +* [getDokployVersion](#getdokployversion) +* [readDirectories](#readdirectories) +* [updateTraefikFile](#updatetraefikfile) +* [readTraefikFile](#readtraefikfile) +* [getIp](#getip) +* [getOpenApiDocument](#getopenapidocument) +* [readTraefikEnv](#readtraefikenv) +* [writeTraefikEnv](#writetraefikenv) +* [haveTraefikDashboardPortEnabled](#havetraefikdashboardportenabled) +* [readStats](#readstats) +* [getLogRotateStatus](#getlogrotatestatus) +* [toggleLogRotate](#togglelogrotate) +* [haveActivateRequests](#haveactivaterequests) +* [toggleRequests](#togglerequests) +* [isCloud](#iscloud) +* [health](#health) + +## reloadServer + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.reloadServer(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsReloadServer } from "dokploy/funcs/settingsReloadServer.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsReloadServer(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsReloadServer failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## reloadTraefik + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.reloadTraefik(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsReloadTraefik } from "dokploy/funcs/settingsReloadTraefik.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsReloadTraefik(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsReloadTraefik failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SettingsReloadTraefikRequest](../../models/operations/settingsreloadtraefikrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## toggleDashboard + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.toggleDashboard({}); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsToggleDashboard } from "dokploy/funcs/settingsToggleDashboard.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsToggleDashboard(dokploy, {}); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsToggleDashboard failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SettingsToggleDashboardRequest](../../models/operations/settingstoggledashboardrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## cleanUnusedImages + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.cleanUnusedImages(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsCleanUnusedImages } from "dokploy/funcs/settingsCleanUnusedImages.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsCleanUnusedImages(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsCleanUnusedImages failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SettingsCleanUnusedImagesRequest](../../models/operations/settingscleanunusedimagesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## cleanUnusedVolumes + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.cleanUnusedVolumes(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsCleanUnusedVolumes } from "dokploy/funcs/settingsCleanUnusedVolumes.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsCleanUnusedVolumes(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsCleanUnusedVolumes failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SettingsCleanUnusedVolumesRequest](../../models/operations/settingscleanunusedvolumesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## cleanStoppedContainers + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.cleanStoppedContainers(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsCleanStoppedContainers } from "dokploy/funcs/settingsCleanStoppedContainers.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsCleanStoppedContainers(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsCleanStoppedContainers failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SettingsCleanStoppedContainersRequest](../../models/operations/settingscleanstoppedcontainersrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## cleanDockerBuilder + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.cleanDockerBuilder(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsCleanDockerBuilder } from "dokploy/funcs/settingsCleanDockerBuilder.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsCleanDockerBuilder(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsCleanDockerBuilder failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SettingsCleanDockerBuilderRequest](../../models/operations/settingscleandockerbuilderrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## cleanDockerPrune + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.cleanDockerPrune(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsCleanDockerPrune } from "dokploy/funcs/settingsCleanDockerPrune.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsCleanDockerPrune(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsCleanDockerPrune failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SettingsCleanDockerPruneRequest](../../models/operations/settingscleandockerprunerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## cleanAll + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.cleanAll(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsCleanAll } from "dokploy/funcs/settingsCleanAll.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsCleanAll(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsCleanAll failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SettingsCleanAllRequest](../../models/operations/settingscleanallrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## cleanMonitoring + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.cleanMonitoring(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsCleanMonitoring } from "dokploy/funcs/settingsCleanMonitoring.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsCleanMonitoring(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsCleanMonitoring failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## saveSshPrivateKey + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.saveSshPrivateKey({}); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsSaveSshPrivateKey } from "dokploy/funcs/settingsSaveSshPrivateKey.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsSaveSshPrivateKey(dokploy, {}); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsSaveSshPrivateKey failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SettingsSaveSSHPrivateKeyRequest](../../models/operations/settingssavesshprivatekeyrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## assignDomainServer + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.assignDomainServer({ + host: "pure-alb.biz", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsAssignDomainServer } from "dokploy/funcs/settingsAssignDomainServer.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsAssignDomainServer(dokploy, { + host: "pure-alb.biz", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsAssignDomainServer failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SettingsAssignDomainServerRequest](../../models/operations/settingsassigndomainserverrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## cleanSshPrivateKey + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.cleanSshPrivateKey(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsCleanSshPrivateKey } from "dokploy/funcs/settingsCleanSshPrivateKey.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsCleanSshPrivateKey(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsCleanSshPrivateKey failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## updateDockerCleanup + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.updateDockerCleanup({ + enableDockerCleanup: true, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsUpdateDockerCleanup } from "dokploy/funcs/settingsUpdateDockerCleanup.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsUpdateDockerCleanup(dokploy, { + enableDockerCleanup: true, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsUpdateDockerCleanup failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SettingsUpdateDockerCleanupRequest](../../models/operations/settingsupdatedockercleanuprequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## readTraefikConfig + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.readTraefikConfig(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsReadTraefikConfig } from "dokploy/funcs/settingsReadTraefikConfig.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsReadTraefikConfig(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsReadTraefikConfig failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## updateTraefikConfig + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.updateTraefikConfig({ + traefikConfig: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsUpdateTraefikConfig } from "dokploy/funcs/settingsUpdateTraefikConfig.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsUpdateTraefikConfig(dokploy, { + traefikConfig: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsUpdateTraefikConfig failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SettingsUpdateTraefikConfigRequest](../../models/operations/settingsupdatetraefikconfigrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## readWebServerTraefikConfig + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.readWebServerTraefikConfig(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsReadWebServerTraefikConfig } from "dokploy/funcs/settingsReadWebServerTraefikConfig.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsReadWebServerTraefikConfig(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsReadWebServerTraefikConfig failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## updateWebServerTraefikConfig + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.updateWebServerTraefikConfig({ + traefikConfig: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsUpdateWebServerTraefikConfig } from "dokploy/funcs/settingsUpdateWebServerTraefikConfig.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsUpdateWebServerTraefikConfig(dokploy, { + traefikConfig: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsUpdateWebServerTraefikConfig failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SettingsUpdateWebServerTraefikConfigRequest](../../models/operations/settingsupdatewebservertraefikconfigrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## readMiddlewareTraefikConfig + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.readMiddlewareTraefikConfig(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsReadMiddlewareTraefikConfig } from "dokploy/funcs/settingsReadMiddlewareTraefikConfig.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsReadMiddlewareTraefikConfig(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsReadMiddlewareTraefikConfig failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## updateMiddlewareTraefikConfig + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.updateMiddlewareTraefikConfig({ + traefikConfig: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsUpdateMiddlewareTraefikConfig } from "dokploy/funcs/settingsUpdateMiddlewareTraefikConfig.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsUpdateMiddlewareTraefikConfig(dokploy, { + traefikConfig: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsUpdateMiddlewareTraefikConfig failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SettingsUpdateMiddlewareTraefikConfigRequest](../../models/operations/settingsupdatemiddlewaretraefikconfigrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## checkAndUpdateImage + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.checkAndUpdateImage(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsCheckAndUpdateImage } from "dokploy/funcs/settingsCheckAndUpdateImage.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsCheckAndUpdateImage(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsCheckAndUpdateImage failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## updateServer + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.updateServer(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsUpdateServer } from "dokploy/funcs/settingsUpdateServer.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsUpdateServer(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsUpdateServer failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## getDokployVersion + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.getDokployVersion(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsGetDokployVersion } from "dokploy/funcs/settingsGetDokployVersion.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsGetDokployVersion(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsGetDokployVersion failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## readDirectories + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.readDirectories(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsReadDirectories } from "dokploy/funcs/settingsReadDirectories.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsReadDirectories(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsReadDirectories failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SettingsReadDirectoriesRequest](../../models/operations/settingsreaddirectoriesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## updateTraefikFile + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.updateTraefikFile({ + path: "/var/tmp", + traefikConfig: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsUpdateTraefikFile } from "dokploy/funcs/settingsUpdateTraefikFile.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsUpdateTraefikFile(dokploy, { + path: "/var/tmp", + traefikConfig: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsUpdateTraefikFile failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SettingsUpdateTraefikFileRequest](../../models/operations/settingsupdatetraefikfilerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## readTraefikFile + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.readTraefikFile({ + path: "/mnt", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsReadTraefikFile } from "dokploy/funcs/settingsReadTraefikFile.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsReadTraefikFile(dokploy, { + path: "/mnt", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsReadTraefikFile failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SettingsReadTraefikFileRequest](../../models/operations/settingsreadtraefikfilerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## getIp + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.getIp(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsGetIp } from "dokploy/funcs/settingsGetIp.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsGetIp(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsGetIp failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## getOpenApiDocument + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.getOpenApiDocument(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsGetOpenApiDocument } from "dokploy/funcs/settingsGetOpenApiDocument.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsGetOpenApiDocument(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsGetOpenApiDocument failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## readTraefikEnv + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.readTraefikEnv(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsReadTraefikEnv } from "dokploy/funcs/settingsReadTraefikEnv.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsReadTraefikEnv(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsReadTraefikEnv failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SettingsReadTraefikEnvRequest](../../models/operations/settingsreadtraefikenvrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## writeTraefikEnv + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.writeTraefikEnv({ + env: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsWriteTraefikEnv } from "dokploy/funcs/settingsWriteTraefikEnv.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsWriteTraefikEnv(dokploy, { + env: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsWriteTraefikEnv failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SettingsWriteTraefikEnvRequest](../../models/operations/settingswritetraefikenvrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## haveTraefikDashboardPortEnabled + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.haveTraefikDashboardPortEnabled(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsHaveTraefikDashboardPortEnabled } from "dokploy/funcs/settingsHaveTraefikDashboardPortEnabled.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsHaveTraefikDashboardPortEnabled(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsHaveTraefikDashboardPortEnabled failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SettingsHaveTraefikDashboardPortEnabledRequest](../../models/operations/settingshavetraefikdashboardportenabledrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## readStats + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.readStats(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsReadStats } from "dokploy/funcs/settingsReadStats.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsReadStats(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsReadStats failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## getLogRotateStatus + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.getLogRotateStatus(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsGetLogRotateStatus } from "dokploy/funcs/settingsGetLogRotateStatus.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsGetLogRotateStatus(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsGetLogRotateStatus failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## toggleLogRotate + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.toggleLogRotate({ + enable: true, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsToggleLogRotate } from "dokploy/funcs/settingsToggleLogRotate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsToggleLogRotate(dokploy, { + enable: true, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsToggleLogRotate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SettingsToggleLogRotateRequest](../../models/operations/settingstogglelogrotaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## haveActivateRequests + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.haveActivateRequests(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsHaveActivateRequests } from "dokploy/funcs/settingsHaveActivateRequests.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsHaveActivateRequests(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsHaveActivateRequests failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## toggleRequests + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.toggleRequests({ + enable: true, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsToggleRequests } from "dokploy/funcs/settingsToggleRequests.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsToggleRequests(dokploy, { + enable: true, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsToggleRequests failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SettingsToggleRequestsRequest](../../models/operations/settingstogglerequestsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## isCloud + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.isCloud(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsIsCloud } from "dokploy/funcs/settingsIsCloud.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsIsCloud(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsIsCloud failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## health + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.settings.health(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { settingsHealth } from "dokploy/funcs/settingsHealth.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await settingsHealth(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("settingsHealth failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/sshkey/README.md b/docs/sdks/sshkey/README.md new file mode 100644 index 0000000..5ab0d7d --- /dev/null +++ b/docs/sdks/sshkey/README.md @@ -0,0 +1,291 @@ +# SshKey +(*sshKey*) + +## Overview + +### Available Operations + +* [remove](#remove) +* [get](#get) +* [generate](#generate) +* [update](#update) + +## remove + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.sshKey.remove({ + sshKeyId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { sshKeyRemove } from "dokploy/funcs/sshKeyRemove.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await sshKeyRemove(dokploy, { + sshKeyId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("sshKeyRemove failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SshKeyRemoveRequest](../../models/operations/sshkeyremoverequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## get + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.sshKey.get({ + sshKeyId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { sshKeyGet } from "dokploy/funcs/sshKeyGet.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await sshKeyGet(dokploy, { + sshKeyId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("sshKeyGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SshKeyOneRequest](../../models/operations/sshkeyonerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## generate + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.sshKey.generate({}); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { sshKeyGenerate } from "dokploy/funcs/sshKeyGenerate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await sshKeyGenerate(dokploy, {}); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("sshKeyGenerate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SshKeyGenerateRequest](../../models/operations/sshkeygeneraterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## update + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.sshKey.update({ + sshKeyId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { sshKeyUpdate } from "dokploy/funcs/sshKeyUpdate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await sshKeyUpdate(dokploy, { + sshKeyId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("sshKeyUpdate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SshKeyUpdateRequest](../../models/operations/sshkeyupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/sshkeys/README.md b/docs/sdks/sshkeys/README.md new file mode 100644 index 0000000..fdfce73 --- /dev/null +++ b/docs/sdks/sshkeys/README.md @@ -0,0 +1,150 @@ +# SshKeys +(*sshKeys*) + +## Overview + +### Available Operations + +* [create](#create) +* [all](#all) + +## create + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.sshKeys.create({ + name: "", + privateKey: "", + publicKey: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { sshKeysCreate } from "dokploy/funcs/sshKeysCreate.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await sshKeysCreate(dokploy, { + name: "", + privateKey: "", + publicKey: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("sshKeysCreate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SshKeyCreateRequest](../../models/operations/sshkeycreaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## all + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.sshKeys.all(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { sshKeysAll } from "dokploy/funcs/sshKeysAll.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await sshKeysAll(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("sshKeysAll failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/stripe/README.md b/docs/sdks/stripe/README.md new file mode 100644 index 0000000..cb8bfbb --- /dev/null +++ b/docs/sdks/stripe/README.md @@ -0,0 +1,284 @@ +# Stripe +(*stripe*) + +## Overview + +### Available Operations + +* [getProducts](#getproducts) +* [createCheckoutSession](#createcheckoutsession) +* [createCustomerPortalSession](#createcustomerportalsession) +* [canCreateMoreServers](#cancreatemoreservers) + +## getProducts + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.stripe.getProducts(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { stripeGetProducts } from "dokploy/funcs/stripeGetProducts.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await stripeGetProducts(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("stripeGetProducts failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## createCheckoutSession + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.stripe.createCheckoutSession({ + productId: "", + serverQuantity: 4592.6, + isAnnual: false, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { stripeCreateCheckoutSession } from "dokploy/funcs/stripeCreateCheckoutSession.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await stripeCreateCheckoutSession(dokploy, { + productId: "", + serverQuantity: 4592.6, + isAnnual: false, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("stripeCreateCheckoutSession failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.StripeCreateCheckoutSessionRequest](../../models/operations/stripecreatecheckoutsessionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## createCustomerPortalSession + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.stripe.createCustomerPortalSession(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { stripeCreateCustomerPortalSession } from "dokploy/funcs/stripeCreateCustomerPortalSession.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await stripeCreateCustomerPortalSession(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("stripeCreateCustomerPortalSession failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## canCreateMoreServers + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.stripe.canCreateMoreServers(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { stripeCanCreateMoreServers } from "dokploy/funcs/stripeCanCreateMoreServers.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await stripeCanCreateMoreServers(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("stripeCanCreateMoreServers failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/user/README.md b/docs/sdks/user/README.md new file mode 100644 index 0000000..b60857d --- /dev/null +++ b/docs/sdks/user/README.md @@ -0,0 +1,218 @@ +# User +(*user*) + +## Overview + +### Available Operations + +* [getAll](#getall) +* [byAuthId](#byauthid) +* [byUserId](#byuserid) + +## getAll + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.user.getAll(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { userGetAll } from "dokploy/funcs/userGetAll.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await userGetAll(dokploy); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("userGetAll failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## byAuthId + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.user.byAuthId({ + authId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { userByAuthId } from "dokploy/funcs/userByAuthId.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await userByAuthId(dokploy, { + authId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("userByAuthId failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UserByAuthIdRequest](../../models/operations/userbyauthidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | + +## byUserId + +### Example Usage + + +```typescript +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const result = await dokploy.user.byUserId({ + userId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { DokployCore } from "dokploy/core.js"; +import { userByUserId } from "dokploy/funcs/userByUserId.js"; + +// Use `DokployCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const dokploy = new DokployCore({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function run() { + const res = await userByUserId(dokploy, { + userId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("userByUserId failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UserByUserIdRequest](../../models/operations/userbyuseridrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ErrorT](../../models/errort.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.DokployDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..67bccfe --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,22 @@ +import globals from "globals"; +import pluginJs from "@eslint/js"; +import tseslint from "typescript-eslint"; + +/** @type {import('eslint').Linter.Config[]} */ +export default [ + { files: ["**/*.{js,mjs,cjs,ts}"] }, + { languageOptions: { globals: globals.browser } }, + pluginJs.configs.recommended, + ...tseslint.configs.recommended, + { + rules: { + "no-constant-condition": "off", + "no-useless-escape": "off", + // Handled by typescript compiler + "@typescript-eslint/no-unused-vars": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-empty-object-type": "off", + "@typescript-eslint/no-namespace": "off", + }, + }, +]; diff --git a/examples/.env.template b/examples/.env.template new file mode 100644 index 0000000..aee46e0 --- /dev/null +++ b/examples/.env.template @@ -0,0 +1,14 @@ +# dokploy SDK Environment Variables +# Copy this file to .env and fill in your actual values +# DO NOT commit the .env file to version control + +# Security Configuration +# The SDK supports loading security credentials from environment variables +# with the prefix: DOKPLOY_ +# +# Security environment variables: +DOKPLOY_AUTHORIZATION=your_authorization_here + +# Debug Configuration +# Enable HTTP request/response logging for debugging +DOKPLOY_DEBUG=true diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 0000000..163c69d --- /dev/null +++ b/examples/README.md @@ -0,0 +1,31 @@ +# dokploy Examples + +This directory contains example scripts demonstrating how to use the dokploy SDK. + +## Prerequisites + +- Node.js (v18 or higher) +- npm + +## Setup + +1. Copy `.env.template` to `.env`: + ```bash + cp .env.template .env + ``` + +2. Edit `.env` and add your actual credentials (API keys, tokens, etc.) + +## Running the Examples + +To run an example file from the examples directory: + +```bash +npm run build && npx tsx example.ts +``` + +## Creating new examples + +Duplicate an existing example file, they won't be overwritten by the generation process. + + diff --git a/examples/adminGetOne.example.ts b/examples/adminGetOne.example.ts new file mode 100644 index 0000000..094ec87 --- /dev/null +++ b/examples/adminGetOne.example.ts @@ -0,0 +1,26 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import dotenv from "dotenv"; +dotenv.config(); +/** + * Example usage of the dokploy SDK + * + * To run this example from the examples directory: + * npm run build && npx tsx adminGetOne.example.ts + */ + +import { Dokploy } from "dokploy"; + +const dokploy = new Dokploy({ + authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "", +}); + +async function main() { + const result = await dokploy.admin.getOne(); + + console.log(result); +} + +main().catch(console.error); diff --git a/examples/package-lock.json b/examples/package-lock.json new file mode 100644 index 0000000..a88bd9b --- /dev/null +++ b/examples/package-lock.json @@ -0,0 +1,611 @@ +{ + "name": "dokploy-examples", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "dokploy-examples", + "version": "1.0.0", + "dependencies": { + "dokploy": "file:.." + }, + "devDependencies": { + "@types/node": "^20.0.0", + "dotenv": "^16.4.5", + "tsx": "^4.19.2" + } + }, + "..": { + "name": "dokploy", + "version": "0.1.2", + "dependencies": { + "zod": "^3.20.0" + }, + "devDependencies": { + "@eslint/js": "^9.19.0", + "eslint": "^9.19.0", + "globals": "^15.14.0", + "tshy": "^2.0.0", + "typescript": "~5.8.3", + "typescript-eslint": "^8.26.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.10.tgz", + "integrity": "sha512-0NFWnA+7l41irNuaSVlLfgNT12caWJVLzp5eAVhZ0z1qpxbockccEt3s+149rE64VUI3Ml2zt8Nv5JVc4QXTsw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.10.tgz", + "integrity": "sha512-dQAxF1dW1C3zpeCDc5KqIYuZ1tgAdRXNoZP7vkBIRtKZPYe2xVr/d3SkirklCHudW1B45tGiUlz2pUWDfbDD4w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.10.tgz", + "integrity": "sha512-LSQa7eDahypv/VO6WKohZGPSJDq5OVOo3UoFR1E4t4Gj1W7zEQMUhI+lo81H+DtB+kP+tDgBp+M4oNCwp6kffg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.10.tgz", + "integrity": "sha512-MiC9CWdPrfhibcXwr39p9ha1x0lZJ9KaVfvzA0Wxwz9ETX4v5CHfF09bx935nHlhi+MxhA63dKRRQLiVgSUtEg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.10.tgz", + "integrity": "sha512-JC74bdXcQEpW9KkV326WpZZjLguSZ3DfS8wrrvPMHgQOIEIG/sPXEN/V8IssoJhbefLRcRqw6RQH2NnpdprtMA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.10.tgz", + "integrity": "sha512-tguWg1olF6DGqzws97pKZ8G2L7Ig1vjDmGTwcTuYHbuU6TTjJe5FXbgs5C1BBzHbJ2bo1m3WkQDbWO2PvamRcg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.10.tgz", + "integrity": "sha512-3ZioSQSg1HT2N05YxeJWYR+Libe3bREVSdWhEEgExWaDtyFbbXWb49QgPvFH8u03vUPX10JhJPcz7s9t9+boWg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.10.tgz", + "integrity": "sha512-LLgJfHJk014Aa4anGDbh8bmI5Lk+QidDmGzuC2D+vP7mv/GeSN+H39zOf7pN5N8p059FcOfs2bVlrRr4SK9WxA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.10.tgz", + "integrity": "sha512-oR31GtBTFYCqEBALI9r6WxoU/ZofZl962pouZRTEYECvNF/dtXKku8YXcJkhgK/beU+zedXfIzHijSRapJY3vg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.10.tgz", + "integrity": "sha512-5luJWN6YKBsawd5f9i4+c+geYiVEw20FVW5x0v1kEMWNq8UctFjDiMATBxLvmmHA4bf7F6hTRaJgtghFr9iziQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.10.tgz", + "integrity": "sha512-NrSCx2Kim3EnnWgS4Txn0QGt0Xipoumb6z6sUtl5bOEZIVKhzfyp/Lyw4C1DIYvzeW/5mWYPBFJU3a/8Yr75DQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.10.tgz", + "integrity": "sha512-xoSphrd4AZda8+rUDDfD9J6FUMjrkTz8itpTITM4/xgerAZZcFW7Dv+sun7333IfKxGG8gAq+3NbfEMJfiY+Eg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.10.tgz", + "integrity": "sha512-ab6eiuCwoMmYDyTnyptoKkVS3k8fy/1Uvq7Dj5czXI6DF2GqD2ToInBI0SHOp5/X1BdZ26RKc5+qjQNGRBelRA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.10.tgz", + "integrity": "sha512-NLinzzOgZQsGpsTkEbdJTCanwA5/wozN9dSgEl12haXJBzMTpssebuXR42bthOF3z7zXFWH1AmvWunUCkBE4EA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.10.tgz", + "integrity": "sha512-FE557XdZDrtX8NMIeA8LBJX3dC2M8VGXwfrQWU7LB5SLOajfJIxmSdyL/gU1m64Zs9CBKvm4UAuBp5aJ8OgnrA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.10.tgz", + "integrity": "sha512-3BBSbgzuB9ajLoVZk0mGu+EHlBwkusRmeNYdqmznmMc9zGASFjSsxgkNsqmXugpPk00gJ0JNKh/97nxmjctdew==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.10.tgz", + "integrity": "sha512-QSX81KhFoZGwenVyPoberggdW1nrQZSvfVDAIUXr3WqLRZGZqWk/P4T8p2SP+de2Sr5HPcvjhcJzEiulKgnxtA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.10.tgz", + "integrity": "sha512-AKQM3gfYfSW8XRk8DdMCzaLUFB15dTrZfnX8WXQoOUpUBQ+NaAFCP1kPS/ykbbGYz7rxn0WS48/81l9hFl3u4A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.10.tgz", + "integrity": "sha512-7RTytDPGU6fek/hWuN9qQpeGPBZFfB4zZgcz2VK2Z5VpdUxEI8JKYsg3JfO0n/Z1E/6l05n0unDCNc4HnhQGig==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.10.tgz", + "integrity": "sha512-5Se0VM9Wtq797YFn+dLimf2Zx6McttsH2olUBsDml+lm0GOCRVebRWUvDtkY4BWYv/3NgzS8b/UM3jQNh5hYyw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.10.tgz", + "integrity": "sha512-XkA4frq1TLj4bEMB+2HnI0+4RnjbuGZfet2gs/LNs5Hc7D89ZQBHQ0gL2ND6Lzu1+QVkjp3x1gIcPKzRNP8bXw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.10.tgz", + "integrity": "sha512-AVTSBhTX8Y/Fz6OmIVBip9tJzZEUcY8WLh7I59+upa5/GPhh2/aM6bvOMQySspnCCHvFi79kMtdJS1w0DXAeag==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.10.tgz", + "integrity": "sha512-fswk3XT0Uf2pGJmOpDB7yknqhVkJQkAQOcW/ccVOtfx05LkbWOaRAtn5SaqXypeKQra1QaEa841PgrSL9ubSPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.10.tgz", + "integrity": "sha512-ah+9b59KDTSfpaCg6VdJoOQvKjI33nTaQr4UluQwW7aEwZQsbMCfTmfEO4VyewOxx4RaDT/xCy9ra2GPWmO7Kw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.10.tgz", + "integrity": "sha512-QHPDbKkrGO8/cz9LKVnJU22HOi4pxZnZhhA2HYHez5Pz4JeffhDjf85E57Oyco163GnzNCVkZK0b/n4Y0UHcSw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.10.tgz", + "integrity": "sha512-9KpxSVFCu0iK1owoez6aC/s/EdUQLDN3adTxGCqxMVhrPDj6bt5dbrHDXUuq+Bs2vATFBBrQS5vdQ/Ed2P+nbw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@types/node": { + "version": "20.19.17", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.17.tgz", + "integrity": "sha512-gfehUI8N1z92kygssiuWvLiwcbOB3IRktR6hTDgJlXMYh5OvkPSRmgfoBUmfZt+vhwJtX7v1Yw4KvvAf7c5QKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/dokploy": { + "resolved": "..", + "link": true + }, + "node_modules/dotenv": { + "version": "16.6.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz", + "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/esbuild": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.10.tgz", + "integrity": "sha512-9RiGKvCwaqxO2owP61uQ4BgNborAQskMR6QusfWzQqv7AZOg5oGehdY2pRJMTKuwxd1IDBP4rSbI5lHzU7SMsQ==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.10", + "@esbuild/android-arm": "0.25.10", + "@esbuild/android-arm64": "0.25.10", + "@esbuild/android-x64": "0.25.10", + "@esbuild/darwin-arm64": "0.25.10", + "@esbuild/darwin-x64": "0.25.10", + "@esbuild/freebsd-arm64": "0.25.10", + "@esbuild/freebsd-x64": "0.25.10", + "@esbuild/linux-arm": "0.25.10", + "@esbuild/linux-arm64": "0.25.10", + "@esbuild/linux-ia32": "0.25.10", + "@esbuild/linux-loong64": "0.25.10", + "@esbuild/linux-mips64el": "0.25.10", + "@esbuild/linux-ppc64": "0.25.10", + "@esbuild/linux-riscv64": "0.25.10", + "@esbuild/linux-s390x": "0.25.10", + "@esbuild/linux-x64": "0.25.10", + "@esbuild/netbsd-arm64": "0.25.10", + "@esbuild/netbsd-x64": "0.25.10", + "@esbuild/openbsd-arm64": "0.25.10", + "@esbuild/openbsd-x64": "0.25.10", + "@esbuild/openharmony-arm64": "0.25.10", + "@esbuild/sunos-x64": "0.25.10", + "@esbuild/win32-arm64": "0.25.10", + "@esbuild/win32-ia32": "0.25.10", + "@esbuild/win32-x64": "0.25.10" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-tsconfig": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.10.1.tgz", + "integrity": "sha512-auHyJ4AgMz7vgS8Hp3N6HXSmlMdUyhSUrfBF16w153rxtLIEOE+HGqaBppczZvnHLqQJfiHotCYpNhl0lUROFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, + "node_modules/tsx": { + "version": "4.20.6", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.20.6.tgz", + "integrity": "sha512-ytQKuwgmrrkDTFP4LjR0ToE2nqgy886GpvRSpU0JAnrdBYppuY5rLkRUYPU1yCryb24SsKBTL/hlDQAEFVwtZg==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "~0.25.0", + "get-tsconfig": "^4.7.5" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" + } + } +} diff --git a/examples/package.json b/examples/package.json new file mode 100644 index 0000000..3916eec --- /dev/null +++ b/examples/package.json @@ -0,0 +1,18 @@ +{ + "name": "dokploy-examples", + "version": "1.0.0", + "private": true, + "scripts": { + "build:parent": "cd .. && npm i && npm run build && cd -", + "build:examples": "npm i", + "build": "npm run build:parent && npm run build:examples" + }, + "devDependencies": { + "@types/node": "^20.0.0", + "dotenv": "^16.4.5", + "tsx": "^4.19.2" + }, + "dependencies": { + "dokploy": "file:.." + } +} \ No newline at end of file diff --git a/jsr.json b/jsr.json new file mode 100644 index 0000000..43f674e --- /dev/null +++ b/jsr.json @@ -0,0 +1,27 @@ + + +{ + "name": "dokploy", + "version": "0.1.2", + "exports": { + ".": "./src/index.ts", + "./models/errors": "./src/models/errors/index.ts", + "./models": "./src/models/index.ts", + "./models/operations": "./src/models/operations/index.ts", + "./lib/config": "./src/lib/config.ts", + "./lib/http": "./src/lib/http.ts", + "./lib/retries": "./src/lib/retries.ts", + "./lib/sdks": "./src/lib/sdks.ts", + "./types": "./src/types/index.ts" + }, + "publish": { + "include": [ + "LICENSE", + "README.md", + "RUNTIMES.md", + "USAGE.md", + "jsr.json", + "src/**/*.ts" + ] + } +} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..b966ee8 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,2322 @@ +{ + "name": "dokploy", + "version": "0.1.2", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "dokploy", + "version": "0.1.2", + "dependencies": { + "zod": "^3.20.0" + }, + "devDependencies": { + "@eslint/js": "^9.19.0", + "eslint": "^9.19.0", + "globals": "^15.14.0", + "tshy": "^2.0.0", + "typescript": "~5.8.3", + "typescript-eslint": "^8.26.0" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz", + "integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.0.tgz", + "integrity": "sha512-ENIdc4iLu0d93HeYirvKmrzshzofPw6VkZRKQGe9Nv46ZnWUzcF1xV01dcvEg/1wXUR61OmmlSfyeyO7EvjLxQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.6", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.3.1.tgz", + "integrity": "sha512-xR93k9WhrDYpXHORXpxVL5oHj3Era7wo6k/Wd8/IsQNnZUTzkGS29lyn3nAT05v6ltUuTFVCCYDEGfy2Or/sPA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.2.tgz", + "integrity": "sha512-78Md3/Rrxh83gCxoUc0EiciuOHsIITzLy53m3d9UyiW8y9Dj2D29FeETqyKA+BRK76tnTp6RXWb3pCay8Oyomg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", + "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/js": { + "version": "9.36.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.36.0.tgz", + "integrity": "sha512-uhCbYtYynH30iZErszX78U+nR3pJU3RHGQ57NXy5QupD4SBVwDeU8TNBy+MjMngc1UyIW9noKqsRqfjQTBU2dw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", + "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.5.tgz", + "integrity": "sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.15.2", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.7", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz", + "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.4.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.44.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.44.1.tgz", + "integrity": "sha512-molgphGqOBT7t4YKCSkbasmu1tb1MgrZ2szGzHbclF7PNmOkSTQVHy+2jXOSnxvR3+Xe1yySHFZoqMpz3TfQsw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.44.1", + "@typescript-eslint/type-utils": "8.44.1", + "@typescript-eslint/utils": "8.44.1", + "@typescript-eslint/visitor-keys": "8.44.1", + "graphemer": "^1.4.0", + "ignore": "^7.0.0", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.44.1", + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.44.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.44.1.tgz", + "integrity": "sha512-EHrrEsyhOhxYt8MTg4zTF+DJMuNBzWwgvvOYNj/zm1vnaD/IC5zCXFehZv94Piqa2cRFfXrTFxIvO95L7Qc/cw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/scope-manager": "8.44.1", + "@typescript-eslint/types": "8.44.1", + "@typescript-eslint/typescript-estree": "8.44.1", + "@typescript-eslint/visitor-keys": "8.44.1", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.44.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.44.1.tgz", + "integrity": "sha512-ycSa60eGg8GWAkVsKV4E6Nz33h+HjTXbsDT4FILyL8Obk5/mx4tbvCNsLf9zret3ipSumAOG89UcCs/KRaKYrA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.44.1", + "@typescript-eslint/types": "^8.44.1", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.44.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.44.1.tgz", + "integrity": "sha512-NdhWHgmynpSvyhchGLXh+w12OMT308Gm25JoRIyTZqEbApiBiQHD/8xgb6LqCWCFcxFtWwaVdFsLPQI3jvhywg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.44.1", + "@typescript-eslint/visitor-keys": "8.44.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.44.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.44.1.tgz", + "integrity": "sha512-B5OyACouEjuIvof3o86lRMvyDsFwZm+4fBOqFHccIctYgBjqR3qT39FBYGN87khcgf0ExpdCBeGKpKRhSFTjKQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.44.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.44.1.tgz", + "integrity": "sha512-KdEerZqHWXsRNKjF9NYswNISnFzXfXNDfPxoTh7tqohU/PRIbwTmsjGK6V9/RTYWau7NZvfo52lgVk+sJh0K3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.44.1", + "@typescript-eslint/typescript-estree": "8.44.1", + "@typescript-eslint/utils": "8.44.1", + "debug": "^4.3.4", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.44.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.44.1.tgz", + "integrity": "sha512-Lk7uj7y9uQUOEguiDIDLYLJOrYHQa7oBiURYVFqIpGxclAFQ78f6VUOM8lI2XEuNOKNB7XuvM2+2cMXAoq4ALQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.44.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.44.1.tgz", + "integrity": "sha512-qnQJ+mVa7szevdEyvfItbO5Vo+GfZ4/GZWWDRRLjrxYPkhM+6zYB2vRYwCsoJLzqFCdZT4mEqyJoyzkunsZ96A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.44.1", + "@typescript-eslint/tsconfig-utils": "8.44.1", + "@typescript-eslint/types": "8.44.1", + "@typescript-eslint/visitor-keys": "8.44.1", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.44.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.44.1.tgz", + "integrity": "sha512-DpX5Fp6edTlocMCwA+mHY8Mra+pPjRZ0TfHkXI8QFelIKcbADQz1LUPNtzOFUriBB2UYqw4Pi9+xV4w9ZczHFg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.7.0", + "@typescript-eslint/scope-manager": "8.44.1", + "@typescript-eslint/types": "8.44.1", + "@typescript-eslint/typescript-estree": "8.44.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.44.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.44.1.tgz", + "integrity": "sha512-576+u0QD+Jp3tZzvfRfxon0EA2lzcDt3lhUbsC6Lgzy9x2VR4E+JUiNyGHi5T8vk0TV+fpJ5GLG1JsJuWCaKhw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.44.1", + "eslint-visitor-keys": "^4.2.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/acorn": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true, + "license": "MIT" + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "9.36.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.36.0.tgz", + "integrity": "sha512-hB4FIzXovouYzwzECDcUkJ4OcfOEkXTv2zRY6B9bkwjx/cprAq0uvm1nl7zvQ0/TsUk0zQiN4uPfJpB9m+rPMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.21.0", + "@eslint/config-helpers": "^0.3.1", + "@eslint/core": "^0.15.2", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "9.36.0", + "@eslint/plugin-kit": "^0.3.5", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^8.4.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", + "esquery": "^1.5.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", + "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", + "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.15.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.2.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fastq": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/flatted": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "dev": true, + "license": "ISC" + }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/globals": { + "version": "15.15.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-15.15.0.tgz", + "integrity": "sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true, + "license": "MIT" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/mkdirp": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "dev": true, + "license": "MIT", + "bin": { + "mkdirp": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/polite-json": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/polite-json/-/polite-json-5.0.0.tgz", + "integrity": "sha512-OLS/0XeUAcE8a2fdwemNja+udKgXNnY6yKVIXqAD2zVRx1KvY6Ato/rZ2vdzbxqYwPW0u6SCNC/bAMPNzpzxbw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/resolve-import": { + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/resolve-import/-/resolve-import-1.4.6.tgz", + "integrity": "sha512-CIw9e64QcKcCFUj9+KxUCJPy8hYofv6eVfo3U9wdhCm2E4IjvFnZ6G4/yIC4yP3f11+h6uU5b3LdS7O64LgqrA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "glob": "^10.3.3", + "walk-up-path": "^3.0.1" + }, + "engines": { + "node": "16 >=16.17.0 || 18 >= 18.6.0 || >=20" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.10.tgz", + "integrity": "sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^10.3.7" + }, + "bin": { + "rimraf": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/sync-content": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/sync-content/-/sync-content-1.0.2.tgz", + "integrity": "sha512-znd3rYiiSxU3WteWyS9a6FXkTA/Wjk8WQsOyzHbineeL837dLn3DA4MRhsIX3qGcxDMH6+uuFV4axztssk7wEQ==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "glob": "^10.2.6", + "mkdirp": "^3.0.1", + "path-scurry": "^1.9.2", + "rimraf": "^5.0.1" + }, + "bin": { + "sync-content": "dist/mjs/bin.mjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-api-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", + "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, + "node_modules/tshy": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/tshy/-/tshy-2.0.1.tgz", + "integrity": "sha512-U5fC+3pMaGfmULhPTVpxKMd62AcX13yfsFrjhAP/daTLG6LFRLIuxqYOmkejJ4MT/s5bEa29+1Jy/9mXkMiMfA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "chalk": "^5.3.0", + "chokidar": "^3.6.0", + "foreground-child": "^3.1.1", + "minimatch": "^9.0.4", + "mkdirp": "^3.0.1", + "polite-json": "^5.0.0", + "resolve-import": "^1.4.5", + "rimraf": "^5.0.1", + "sync-content": "^1.0.2", + "typescript": "5", + "walk-up-path": "^3.0.1" + }, + "bin": { + "tshy": "dist/esm/index.js" + }, + "engines": { + "node": "16 >=16.17 || 18 >=18.15.0 || >=20.6.1" + } + }, + "node_modules/tshy/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/tshy/node_modules/chalk": { + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", + "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/tshy/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/typescript": { + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", + "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typescript-eslint": { + "version": "8.44.1", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.44.1.tgz", + "integrity": "sha512-0ws8uWGrUVTjEeN2OM4K1pLKHK/4NiNP/vz6ns+LjT/6sqpaYzIVFajZb1fj/IDwpsrrHb3Jy0Qm5u9CPcKaeg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.44.1", + "@typescript-eslint/parser": "8.44.1", + "@typescript-eslint/typescript-estree": "8.44.1", + "@typescript-eslint/utils": "8.44.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/walk-up-path": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/walk-up-path/-/walk-up-path-3.0.1.tgz", + "integrity": "sha512-9YlCL/ynK3CTlrSRrDxZvUauLzAswPCrsaCgilqFevUYpeEW0/3ScEjaa3kbW/T0ghhkEr7mv+fpjqn1Y1YuTA==", + "dev": true, + "license": "ISC" + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/zod": { + "version": "3.25.76", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", + "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..a77a0e5 --- /dev/null +++ b/package.json @@ -0,0 +1,122 @@ +{ + "name": "dokploy", + "version": "0.1.2", + "author": "Speakeasy", + "type": "module", + "tshy": { + "sourceDialects": [ + "dokploy/source" + ], + "exports": { + ".": "./src/index.ts", + "./package.json": "./package.json", + "./types": "./src/types/index.ts", + "./models/errors": "./src/models/errors/index.ts", + "./models": "./src/models/index.ts", + "./models/operations": "./src/models/operations/index.ts", + "./*.js": "./src/*.ts", + "./*": "./src/*.ts" + } + }, + "sideEffects": false, + "scripts": { + "lint": "eslint --cache --max-warnings=0 src", + "build": "tshy", + "prepublishOnly": "npm run build" + }, + "peerDependencies": {}, + "devDependencies": { + "@eslint/js": "^9.19.0", + "eslint": "^9.19.0", + "globals": "^15.14.0", + "tshy": "^2.0.0", + "typescript": "~5.8.3", + "typescript-eslint": "^8.26.0" + }, + "dependencies": { + "zod": "^3.20.0" + }, + "exports": { + ".": { + "import": { + "dokploy/source": "./src/index.ts", + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" + } + }, + "./package.json": "./package.json", + "./types": { + "import": { + "dokploy/source": "./src/types/index.ts", + "types": "./dist/esm/types/index.d.ts", + "default": "./dist/esm/types/index.js" + }, + "require": { + "types": "./dist/commonjs/types/index.d.ts", + "default": "./dist/commonjs/types/index.js" + } + }, + "./models/errors": { + "import": { + "dokploy/source": "./src/models/errors/index.ts", + "types": "./dist/esm/models/errors/index.d.ts", + "default": "./dist/esm/models/errors/index.js" + }, + "require": { + "types": "./dist/commonjs/models/errors/index.d.ts", + "default": "./dist/commonjs/models/errors/index.js" + } + }, + "./models": { + "import": { + "dokploy/source": "./src/models/index.ts", + "types": "./dist/esm/models/index.d.ts", + "default": "./dist/esm/models/index.js" + }, + "require": { + "types": "./dist/commonjs/models/index.d.ts", + "default": "./dist/commonjs/models/index.js" + } + }, + "./models/operations": { + "import": { + "dokploy/source": "./src/models/operations/index.ts", + "types": "./dist/esm/models/operations/index.d.ts", + "default": "./dist/esm/models/operations/index.js" + }, + "require": { + "types": "./dist/commonjs/models/operations/index.d.ts", + "default": "./dist/commonjs/models/operations/index.js" + } + }, + "./*.js": { + "import": { + "dokploy/source": "./src/*.ts", + "types": "./dist/esm/*.d.ts", + "default": "./dist/esm/*.js" + }, + "require": { + "types": "./dist/commonjs/*.d.ts", + "default": "./dist/commonjs/*.js" + } + }, + "./*": { + "import": { + "dokploy/source": "./src/*.ts", + "types": "./dist/esm/*.d.ts", + "default": "./dist/esm/*.js" + }, + "require": { + "types": "./dist/commonjs/*.d.ts", + "default": "./dist/commonjs/*.js" + } + } + }, + "main": "./dist/commonjs/index.js", + "types": "./dist/commonjs/index.d.ts", + "module": "./dist/esm/index.js" +} diff --git a/src/core.ts b/src/core.ts new file mode 100644 index 0000000..b379cbb --- /dev/null +++ b/src/core.ts @@ -0,0 +1,13 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ClientSDK } from "./lib/sdks.js"; + +/** + * A minimal client to use when calling standalone SDK functions. Typically, an + * instance of this class would be instantiated once at the start of an + * application and passed around through some dependency injection mechanism to + * parts of an application that need to make SDK calls. + */ +export class DokployCore extends ClientSDK {} diff --git a/src/funcs/adminAssignPermissions.ts b/src/funcs/adminAssignPermissions.ts new file mode 100644 index 0000000..592ccd7 --- /dev/null +++ b/src/funcs/adminAssignPermissions.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function adminAssignPermissions( + client: DokployCore, + request: operations.AdminAssignPermissionsRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.AdminAssignPermissionsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.AdminAssignPermissionsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/admin.assignPermissions")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "admin-assignPermissions", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/adminCreateUserInvitation.ts b/src/funcs/adminCreateUserInvitation.ts new file mode 100644 index 0000000..8a25030 --- /dev/null +++ b/src/funcs/adminCreateUserInvitation.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function adminCreateUserInvitation( + client: DokployCore, + request: operations.AdminCreateUserInvitationRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.AdminCreateUserInvitationRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.AdminCreateUserInvitationRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/admin.createUserInvitation")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "admin-createUserInvitation", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/adminGetOne.ts b/src/funcs/adminGetOne.ts new file mode 100644 index 0000000..d76a3d1 --- /dev/null +++ b/src/funcs/adminGetOne.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function adminGetOne( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/admin.one")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "admin-one", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/adminGetUserByToken.ts b/src/funcs/adminGetUserByToken.ts new file mode 100644 index 0000000..4806380 --- /dev/null +++ b/src/funcs/adminGetUserByToken.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function adminGetUserByToken( + client: DokployCore, + request: operations.AdminGetUserByTokenRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.AdminGetUserByTokenRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.AdminGetUserByTokenRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/admin.getUserByToken")(); + + const query = encodeFormQuery({ + "token": payload.token, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "admin-getUserByToken", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/adminRemoveUser.ts b/src/funcs/adminRemoveUser.ts new file mode 100644 index 0000000..dc33628 --- /dev/null +++ b/src/funcs/adminRemoveUser.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function adminRemoveUser( + client: DokployCore, + request: operations.AdminRemoveUserRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.AdminRemoveUserRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.AdminRemoveUserRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/admin.removeUser")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "admin-removeUser", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/applicationCleanQueues.ts b/src/funcs/applicationCleanQueues.ts new file mode 100644 index 0000000..1cba27b --- /dev/null +++ b/src/funcs/applicationCleanQueues.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function applicationCleanQueues( + client: DokployCore, + request: operations.ApplicationCleanQueuesRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ApplicationCleanQueuesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ApplicationCleanQueuesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/application.cleanQueues")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "application-cleanQueues", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/applicationCreate.ts b/src/funcs/applicationCreate.ts new file mode 100644 index 0000000..4c9b169 --- /dev/null +++ b/src/funcs/applicationCreate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function applicationCreate( + client: DokployCore, + request: operations.ApplicationCreateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ApplicationCreateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ApplicationCreateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/application.create")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "application-create", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/applicationDelete.ts b/src/funcs/applicationDelete.ts new file mode 100644 index 0000000..1d9b4a3 --- /dev/null +++ b/src/funcs/applicationDelete.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function applicationDelete( + client: DokployCore, + request: operations.ApplicationDeleteRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ApplicationDeleteRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ApplicationDeleteRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/application.delete")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "application-delete", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/applicationDeploy.ts b/src/funcs/applicationDeploy.ts new file mode 100644 index 0000000..51e7311 --- /dev/null +++ b/src/funcs/applicationDeploy.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function applicationDeploy( + client: DokployCore, + request: operations.ApplicationDeployRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ApplicationDeployRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ApplicationDeployRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/application.deploy")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "application-deploy", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/applicationGetOne.ts b/src/funcs/applicationGetOne.ts new file mode 100644 index 0000000..064a06f --- /dev/null +++ b/src/funcs/applicationGetOne.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function applicationGetOne( + client: DokployCore, + request: operations.ApplicationOneRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ApplicationOneRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ApplicationOneRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/application.one")(); + + const query = encodeFormQuery({ + "applicationId": payload.applicationId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "application-one", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/applicationMarkRunning.ts b/src/funcs/applicationMarkRunning.ts new file mode 100644 index 0000000..4decbae --- /dev/null +++ b/src/funcs/applicationMarkRunning.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function applicationMarkRunning( + client: DokployCore, + request: operations.ApplicationMarkRunningRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ApplicationMarkRunningRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ApplicationMarkRunningRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/application.markRunning")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "application-markRunning", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/applicationReadAppMonitoring.ts b/src/funcs/applicationReadAppMonitoring.ts new file mode 100644 index 0000000..854ce12 --- /dev/null +++ b/src/funcs/applicationReadAppMonitoring.ts @@ -0,0 +1,163 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function applicationReadAppMonitoring( + client: DokployCore, + request: operations.ApplicationReadAppMonitoringRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ApplicationReadAppMonitoringRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ApplicationReadAppMonitoringRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/application.readAppMonitoring")(); + + const query = encodeFormQuery({ + "appName": payload.appName, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "application-readAppMonitoring", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/applicationReadTraefikConfig.ts b/src/funcs/applicationReadTraefikConfig.ts new file mode 100644 index 0000000..ceea9ca --- /dev/null +++ b/src/funcs/applicationReadTraefikConfig.ts @@ -0,0 +1,163 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function applicationReadTraefikConfig( + client: DokployCore, + request: operations.ApplicationReadTraefikConfigRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ApplicationReadTraefikConfigRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ApplicationReadTraefikConfigRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/application.readTraefikConfig")(); + + const query = encodeFormQuery({ + "applicationId": payload.applicationId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "application-readTraefikConfig", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/applicationRedeploy.ts b/src/funcs/applicationRedeploy.ts new file mode 100644 index 0000000..64895c1 --- /dev/null +++ b/src/funcs/applicationRedeploy.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function applicationRedeploy( + client: DokployCore, + request: operations.ApplicationRedeployRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ApplicationRedeployRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ApplicationRedeployRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/application.redeploy")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "application-redeploy", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/applicationRefreshToken.ts b/src/funcs/applicationRefreshToken.ts new file mode 100644 index 0000000..5792211 --- /dev/null +++ b/src/funcs/applicationRefreshToken.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function applicationRefreshToken( + client: DokployCore, + request: operations.ApplicationRefreshTokenRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ApplicationRefreshTokenRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ApplicationRefreshTokenRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/application.refreshToken")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "application-refreshToken", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/applicationReload.ts b/src/funcs/applicationReload.ts new file mode 100644 index 0000000..d392704 --- /dev/null +++ b/src/funcs/applicationReload.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function applicationReload( + client: DokployCore, + request: operations.ApplicationReloadRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ApplicationReloadRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ApplicationReloadRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/application.reload")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "application-reload", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/applicationSaveBitbucketProvider.ts b/src/funcs/applicationSaveBitbucketProvider.ts new file mode 100644 index 0000000..3b572ce --- /dev/null +++ b/src/funcs/applicationSaveBitbucketProvider.ts @@ -0,0 +1,159 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function applicationSaveBitbucketProvider( + client: DokployCore, + request: operations.ApplicationSaveBitbucketProviderRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ApplicationSaveBitbucketProviderRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ApplicationSaveBitbucketProviderRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/application.saveBitbucketProvider")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "application-saveBitbucketProvider", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/applicationSaveBuildType.ts b/src/funcs/applicationSaveBuildType.ts new file mode 100644 index 0000000..0de9782 --- /dev/null +++ b/src/funcs/applicationSaveBuildType.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function applicationSaveBuildType( + client: DokployCore, + request: operations.ApplicationSaveBuildTypeRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ApplicationSaveBuildTypeRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ApplicationSaveBuildTypeRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/application.saveBuildType")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "application-saveBuildType", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/applicationSaveDockerProvider.ts b/src/funcs/applicationSaveDockerProvider.ts new file mode 100644 index 0000000..2ef66ca --- /dev/null +++ b/src/funcs/applicationSaveDockerProvider.ts @@ -0,0 +1,159 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function applicationSaveDockerProvider( + client: DokployCore, + request: operations.ApplicationSaveDockerProviderRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ApplicationSaveDockerProviderRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ApplicationSaveDockerProviderRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/application.saveDockerProvider")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "application-saveDockerProvider", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/applicationSaveEnvironment.ts b/src/funcs/applicationSaveEnvironment.ts new file mode 100644 index 0000000..fbb3a6f --- /dev/null +++ b/src/funcs/applicationSaveEnvironment.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function applicationSaveEnvironment( + client: DokployCore, + request: operations.ApplicationSaveEnvironmentRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ApplicationSaveEnvironmentRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ApplicationSaveEnvironmentRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/application.saveEnvironment")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "application-saveEnvironment", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/applicationSaveGitProdiver.ts b/src/funcs/applicationSaveGitProdiver.ts new file mode 100644 index 0000000..6a87757 --- /dev/null +++ b/src/funcs/applicationSaveGitProdiver.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function applicationSaveGitProdiver( + client: DokployCore, + request: operations.ApplicationSaveGitProdiverRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ApplicationSaveGitProdiverRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ApplicationSaveGitProdiverRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/application.saveGitProdiver")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "application-saveGitProdiver", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/applicationSaveGithubProvider.ts b/src/funcs/applicationSaveGithubProvider.ts new file mode 100644 index 0000000..b91cf24 --- /dev/null +++ b/src/funcs/applicationSaveGithubProvider.ts @@ -0,0 +1,159 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function applicationSaveGithubProvider( + client: DokployCore, + request: operations.ApplicationSaveGithubProviderRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ApplicationSaveGithubProviderRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ApplicationSaveGithubProviderRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/application.saveGithubProvider")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "application-saveGithubProvider", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/applicationSaveGitlabProvider.ts b/src/funcs/applicationSaveGitlabProvider.ts new file mode 100644 index 0000000..0d994a9 --- /dev/null +++ b/src/funcs/applicationSaveGitlabProvider.ts @@ -0,0 +1,159 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function applicationSaveGitlabProvider( + client: DokployCore, + request: operations.ApplicationSaveGitlabProviderRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ApplicationSaveGitlabProviderRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ApplicationSaveGitlabProviderRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/application.saveGitlabProvider")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "application-saveGitlabProvider", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/applicationStart.ts b/src/funcs/applicationStart.ts new file mode 100644 index 0000000..b684db9 --- /dev/null +++ b/src/funcs/applicationStart.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function applicationStart( + client: DokployCore, + request: operations.ApplicationStartRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ApplicationStartRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ApplicationStartRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/application.start")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "application-start", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/applicationStop.ts b/src/funcs/applicationStop.ts new file mode 100644 index 0000000..1c1018b --- /dev/null +++ b/src/funcs/applicationStop.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function applicationStop( + client: DokployCore, + request: operations.ApplicationStopRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ApplicationStopRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ApplicationStopRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/application.stop")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "application-stop", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/applicationUpdate.ts b/src/funcs/applicationUpdate.ts new file mode 100644 index 0000000..cfc73a1 --- /dev/null +++ b/src/funcs/applicationUpdate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function applicationUpdate( + client: DokployCore, + request: operations.ApplicationUpdateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ApplicationUpdateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ApplicationUpdateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/application.update")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "application-update", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/applicationUpdateTraefikConfig.ts b/src/funcs/applicationUpdateTraefikConfig.ts new file mode 100644 index 0000000..12f3afa --- /dev/null +++ b/src/funcs/applicationUpdateTraefikConfig.ts @@ -0,0 +1,159 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function applicationUpdateTraefikConfig( + client: DokployCore, + request: operations.ApplicationUpdateTraefikConfigRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ApplicationUpdateTraefikConfigRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ApplicationUpdateTraefikConfigRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/application.updateTraefikConfig")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "application-updateTraefikConfig", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/authConfirmEmail.ts b/src/funcs/authConfirmEmail.ts new file mode 100644 index 0000000..3824ac5 --- /dev/null +++ b/src/funcs/authConfirmEmail.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function authConfirmEmail( + client: DokployCore, + request: operations.AuthConfirmEmailRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.AuthConfirmEmailRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.AuthConfirmEmailRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/auth.confirmEmail")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "auth-confirmEmail", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/authCreateAdmin.ts b/src/funcs/authCreateAdmin.ts new file mode 100644 index 0000000..791dcfa --- /dev/null +++ b/src/funcs/authCreateAdmin.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function authCreateAdmin( + client: DokployCore, + request: operations.AuthCreateAdminRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.AuthCreateAdminRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.AuthCreateAdminRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/auth.createAdmin")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "auth-createAdmin", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/authCreateUser.ts b/src/funcs/authCreateUser.ts new file mode 100644 index 0000000..d8e161a --- /dev/null +++ b/src/funcs/authCreateUser.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function authCreateUser( + client: DokployCore, + request: operations.AuthCreateUserRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.AuthCreateUserRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.AuthCreateUserRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/auth.createUser")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "auth-createUser", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/authDisable2FA.ts b/src/funcs/authDisable2FA.ts new file mode 100644 index 0000000..66fdaf9 --- /dev/null +++ b/src/funcs/authDisable2FA.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function authDisable2FA( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/auth.disable2FA")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "auth-disable2FA", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/authGenerate2FASecret.ts b/src/funcs/authGenerate2FASecret.ts new file mode 100644 index 0000000..b482d2e --- /dev/null +++ b/src/funcs/authGenerate2FASecret.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function authGenerate2FASecret( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/auth.generate2FASecret")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "auth-generate2FASecret", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/authGenerateToken.ts b/src/funcs/authGenerateToken.ts new file mode 100644 index 0000000..e77bf7f --- /dev/null +++ b/src/funcs/authGenerateToken.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function authGenerateToken( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/auth.generateToken")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "auth-generateToken", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/authGet.ts b/src/funcs/authGet.ts new file mode 100644 index 0000000..037d9e8 --- /dev/null +++ b/src/funcs/authGet.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function authGet( + client: DokployCore, + request: operations.AuthOneRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.AuthOneRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.AuthOneRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/auth.one")(); + + const query = encodeFormQuery({ + "id": payload.id, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "auth-one", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/authGetOne.ts b/src/funcs/authGetOne.ts new file mode 100644 index 0000000..99981a0 --- /dev/null +++ b/src/funcs/authGetOne.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function authGetOne( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/auth.get")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "auth-get", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/authLogin.ts b/src/funcs/authLogin.ts new file mode 100644 index 0000000..7e9590b --- /dev/null +++ b/src/funcs/authLogin.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function authLogin( + client: DokployCore, + request: operations.AuthLoginRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.AuthLoginRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.AuthLoginRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/auth.login")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "auth-login", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/authLogout.ts b/src/funcs/authLogout.ts new file mode 100644 index 0000000..46657f0 --- /dev/null +++ b/src/funcs/authLogout.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function authLogout( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/auth.logout")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "auth-logout", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/authResetPassword.ts b/src/funcs/authResetPassword.ts new file mode 100644 index 0000000..4d622a4 --- /dev/null +++ b/src/funcs/authResetPassword.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function authResetPassword( + client: DokployCore, + request: operations.AuthResetPasswordRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.AuthResetPasswordRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.AuthResetPasswordRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/auth.resetPassword")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "auth-resetPassword", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/authSendResetPasswordEmail.ts b/src/funcs/authSendResetPasswordEmail.ts new file mode 100644 index 0000000..76ea3ca --- /dev/null +++ b/src/funcs/authSendResetPasswordEmail.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function authSendResetPasswordEmail( + client: DokployCore, + request: operations.AuthSendResetPasswordEmailRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.AuthSendResetPasswordEmailRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.AuthSendResetPasswordEmailRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/auth.sendResetPasswordEmail")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "auth-sendResetPasswordEmail", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/authUpdate.ts b/src/funcs/authUpdate.ts new file mode 100644 index 0000000..3f95e60 --- /dev/null +++ b/src/funcs/authUpdate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function authUpdate( + client: DokployCore, + request: operations.AuthUpdateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.AuthUpdateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.AuthUpdateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/auth.update")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "auth-update", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/authVerify2faSetup.ts b/src/funcs/authVerify2faSetup.ts new file mode 100644 index 0000000..3a883b8 --- /dev/null +++ b/src/funcs/authVerify2faSetup.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function authVerify2faSetup( + client: DokployCore, + request: operations.AuthVerify2FASetupRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.AuthVerify2FASetupRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.AuthVerify2FASetupRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/auth.verify2FASetup")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "auth-verify2FASetup", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/authVerifyLogin2FA.ts b/src/funcs/authVerifyLogin2FA.ts new file mode 100644 index 0000000..25a0bb6 --- /dev/null +++ b/src/funcs/authVerifyLogin2FA.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function authVerifyLogin2FA( + client: DokployCore, + request: operations.AuthVerifyLogin2FARequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.AuthVerifyLogin2FARequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.AuthVerifyLogin2FARequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/auth.verifyLogin2FA")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "auth-verifyLogin2FA", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/backupCreate.ts b/src/funcs/backupCreate.ts new file mode 100644 index 0000000..15b6d37 --- /dev/null +++ b/src/funcs/backupCreate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function backupCreate( + client: DokployCore, + request: operations.BackupCreateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.BackupCreateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.BackupCreateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/backup.create")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "backup-create", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/backupGet.ts b/src/funcs/backupGet.ts new file mode 100644 index 0000000..ffc8efc --- /dev/null +++ b/src/funcs/backupGet.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function backupGet( + client: DokployCore, + request: operations.BackupOneRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.BackupOneRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.BackupOneRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/backup.one")(); + + const query = encodeFormQuery({ + "backupId": payload.backupId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "backup-one", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/backupManualBackupMariadb.ts b/src/funcs/backupManualBackupMariadb.ts new file mode 100644 index 0000000..6c4aff8 --- /dev/null +++ b/src/funcs/backupManualBackupMariadb.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function backupManualBackupMariadb( + client: DokployCore, + request: operations.BackupManualBackupMariadbRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.BackupManualBackupMariadbRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.BackupManualBackupMariadbRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/backup.manualBackupMariadb")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "backup-manualBackupMariadb", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/backupManualBackupMongo.ts b/src/funcs/backupManualBackupMongo.ts new file mode 100644 index 0000000..1c2c014 --- /dev/null +++ b/src/funcs/backupManualBackupMongo.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function backupManualBackupMongo( + client: DokployCore, + request: operations.BackupManualBackupMongoRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.BackupManualBackupMongoRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.BackupManualBackupMongoRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/backup.manualBackupMongo")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "backup-manualBackupMongo", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/backupManualBackupMysql.ts b/src/funcs/backupManualBackupMysql.ts new file mode 100644 index 0000000..c95d965 --- /dev/null +++ b/src/funcs/backupManualBackupMysql.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function backupManualBackupMysql( + client: DokployCore, + request: operations.BackupManualBackupMySqlRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.BackupManualBackupMySqlRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.BackupManualBackupMySqlRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/backup.manualBackupMySql")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "backup-manualBackupMySql", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/backupManualBackupPostgres.ts b/src/funcs/backupManualBackupPostgres.ts new file mode 100644 index 0000000..09e2b62 --- /dev/null +++ b/src/funcs/backupManualBackupPostgres.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function backupManualBackupPostgres( + client: DokployCore, + request: operations.BackupManualBackupPostgresRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.BackupManualBackupPostgresRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.BackupManualBackupPostgresRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/backup.manualBackupPostgres")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "backup-manualBackupPostgres", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/backupRemove.ts b/src/funcs/backupRemove.ts new file mode 100644 index 0000000..494d0a2 --- /dev/null +++ b/src/funcs/backupRemove.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function backupRemove( + client: DokployCore, + request: operations.BackupRemoveRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.BackupRemoveRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.BackupRemoveRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/backup.remove")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "backup-remove", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/backupUpdate.ts b/src/funcs/backupUpdate.ts new file mode 100644 index 0000000..f5bfedd --- /dev/null +++ b/src/funcs/backupUpdate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function backupUpdate( + client: DokployCore, + request: operations.BackupUpdateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.BackupUpdateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.BackupUpdateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/backup.update")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "backup-update", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/bitbucketCreate.ts b/src/funcs/bitbucketCreate.ts new file mode 100644 index 0000000..4d2d96d --- /dev/null +++ b/src/funcs/bitbucketCreate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function bitbucketCreate( + client: DokployCore, + request: operations.BitbucketCreateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.BitbucketCreateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.BitbucketCreateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/bitbucket.create")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "bitbucket-create", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/bitbucketGet.ts b/src/funcs/bitbucketGet.ts new file mode 100644 index 0000000..03948d9 --- /dev/null +++ b/src/funcs/bitbucketGet.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function bitbucketGet( + client: DokployCore, + request: operations.BitbucketOneRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.BitbucketOneRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.BitbucketOneRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/bitbucket.one")(); + + const query = encodeFormQuery({ + "bitbucketId": payload.bitbucketId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "bitbucket-one", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/bitbucketGetBranches.ts b/src/funcs/bitbucketGetBranches.ts new file mode 100644 index 0000000..788e4ee --- /dev/null +++ b/src/funcs/bitbucketGetBranches.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function bitbucketGetBranches( + client: DokployCore, + request: operations.BitbucketGetBitbucketBranchesRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.BitbucketGetBitbucketBranchesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.BitbucketGetBitbucketBranchesRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/bitbucket.getBitbucketBranches")(); + + const query = encodeFormQuery({ + "bitbucketId": payload.bitbucketId, + "owner": payload.owner, + "repo": payload.repo, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "bitbucket-getBitbucketBranches", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/bitbucketGetRepositories.ts b/src/funcs/bitbucketGetRepositories.ts new file mode 100644 index 0000000..ccbf70c --- /dev/null +++ b/src/funcs/bitbucketGetRepositories.ts @@ -0,0 +1,163 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function bitbucketGetRepositories( + client: DokployCore, + request: operations.BitbucketGetBitbucketRepositoriesRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.BitbucketGetBitbucketRepositoriesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.BitbucketGetBitbucketRepositoriesRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/bitbucket.getBitbucketRepositories")(); + + const query = encodeFormQuery({ + "bitbucketId": payload.bitbucketId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "bitbucket-getBitbucketRepositories", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/bitbucketProviders.ts b/src/funcs/bitbucketProviders.ts new file mode 100644 index 0000000..87baa77 --- /dev/null +++ b/src/funcs/bitbucketProviders.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function bitbucketProviders( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/bitbucket.bitbucketProviders")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "bitbucket-bitbucketProviders", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/bitbucketTestConnection.ts b/src/funcs/bitbucketTestConnection.ts new file mode 100644 index 0000000..9bb38d7 --- /dev/null +++ b/src/funcs/bitbucketTestConnection.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function bitbucketTestConnection( + client: DokployCore, + request: operations.BitbucketTestConnectionRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.BitbucketTestConnectionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.BitbucketTestConnectionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/bitbucket.testConnection")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "bitbucket-testConnection", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/bitbucketUpdate.ts b/src/funcs/bitbucketUpdate.ts new file mode 100644 index 0000000..fdd675d --- /dev/null +++ b/src/funcs/bitbucketUpdate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function bitbucketUpdate( + client: DokployCore, + request: operations.BitbucketUpdateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.BitbucketUpdateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.BitbucketUpdateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/bitbucket.update")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "bitbucket-update", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/certificatesAll.ts b/src/funcs/certificatesAll.ts new file mode 100644 index 0000000..71979fc --- /dev/null +++ b/src/funcs/certificatesAll.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function certificatesAll( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/certificates.all")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "certificates-all", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/certificatesCreate.ts b/src/funcs/certificatesCreate.ts new file mode 100644 index 0000000..da76f3d --- /dev/null +++ b/src/funcs/certificatesCreate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function certificatesCreate( + client: DokployCore, + request: operations.CertificatesCreateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.CertificatesCreateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.CertificatesCreateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/certificates.create")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "certificates-create", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/certificatesGet.ts b/src/funcs/certificatesGet.ts new file mode 100644 index 0000000..32b0927 --- /dev/null +++ b/src/funcs/certificatesGet.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function certificatesGet( + client: DokployCore, + request: operations.CertificatesOneRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.CertificatesOneRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.CertificatesOneRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/certificates.one")(); + + const query = encodeFormQuery({ + "certificateId": payload.certificateId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "certificates-one", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/certificatesRemove.ts b/src/funcs/certificatesRemove.ts new file mode 100644 index 0000000..9020714 --- /dev/null +++ b/src/funcs/certificatesRemove.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function certificatesRemove( + client: DokployCore, + request: operations.CertificatesRemoveRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.CertificatesRemoveRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.CertificatesRemoveRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/certificates.remove")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "certificates-remove", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/clusterAddManager.ts b/src/funcs/clusterAddManager.ts new file mode 100644 index 0000000..568e347 --- /dev/null +++ b/src/funcs/clusterAddManager.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function clusterAddManager( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/cluster.addManager")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "cluster-addManager", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/clusterAddWorker.ts b/src/funcs/clusterAddWorker.ts new file mode 100644 index 0000000..4289cf5 --- /dev/null +++ b/src/funcs/clusterAddWorker.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function clusterAddWorker( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/cluster.addWorker")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "cluster-addWorker", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/clusterGetNodes.ts b/src/funcs/clusterGetNodes.ts new file mode 100644 index 0000000..7ce3297 --- /dev/null +++ b/src/funcs/clusterGetNodes.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function clusterGetNodes( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/cluster.getNodes")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "cluster-getNodes", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/clusterRemoveWorker.ts b/src/funcs/clusterRemoveWorker.ts new file mode 100644 index 0000000..646cbaf --- /dev/null +++ b/src/funcs/clusterRemoveWorker.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function clusterRemoveWorker( + client: DokployCore, + request: operations.ClusterRemoveWorkerRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ClusterRemoveWorkerRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ClusterRemoveWorkerRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/cluster.removeWorker")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "cluster-removeWorker", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/composeCleanQueues.ts b/src/funcs/composeCleanQueues.ts new file mode 100644 index 0000000..663aac0 --- /dev/null +++ b/src/funcs/composeCleanQueues.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function composeCleanQueues( + client: DokployCore, + request: operations.ComposeCleanQueuesRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ComposeCleanQueuesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ComposeCleanQueuesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/compose.cleanQueues")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "compose-cleanQueues", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/composeCreate.ts b/src/funcs/composeCreate.ts new file mode 100644 index 0000000..7332e83 --- /dev/null +++ b/src/funcs/composeCreate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function composeCreate( + client: DokployCore, + request: operations.ComposeCreateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ComposeCreateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ComposeCreateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/compose.create")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "compose-create", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/composeDelete.ts b/src/funcs/composeDelete.ts new file mode 100644 index 0000000..a50faea --- /dev/null +++ b/src/funcs/composeDelete.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function composeDelete( + client: DokployCore, + request: operations.ComposeDeleteRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ComposeDeleteRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ComposeDeleteRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/compose.delete")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "compose-delete", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/composeDeploy.ts b/src/funcs/composeDeploy.ts new file mode 100644 index 0000000..43108d6 --- /dev/null +++ b/src/funcs/composeDeploy.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function composeDeploy( + client: DokployCore, + request: operations.ComposeDeployRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ComposeDeployRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ComposeDeployRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/compose.deploy")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "compose-deploy", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/composeDeployTemplate.ts b/src/funcs/composeDeployTemplate.ts new file mode 100644 index 0000000..179c8eb --- /dev/null +++ b/src/funcs/composeDeployTemplate.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function composeDeployTemplate( + client: DokployCore, + request: operations.ComposeDeployTemplateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ComposeDeployTemplateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ComposeDeployTemplateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/compose.deployTemplate")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "compose-deployTemplate", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/composeFetchSourceType.ts b/src/funcs/composeFetchSourceType.ts new file mode 100644 index 0000000..0c8e0c6 --- /dev/null +++ b/src/funcs/composeFetchSourceType.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function composeFetchSourceType( + client: DokployCore, + request: operations.ComposeFetchSourceTypeRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ComposeFetchSourceTypeRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ComposeFetchSourceTypeRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/compose.fetchSourceType")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "compose-fetchSourceType", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/composeGetConverted.ts b/src/funcs/composeGetConverted.ts new file mode 100644 index 0000000..77342ea --- /dev/null +++ b/src/funcs/composeGetConverted.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function composeGetConverted( + client: DokployCore, + request: operations.ComposeGetConvertedComposeRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ComposeGetConvertedComposeRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ComposeGetConvertedComposeRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/compose.getConvertedCompose")(); + + const query = encodeFormQuery({ + "composeId": payload.composeId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "compose-getConvertedCompose", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/composeGetDefaultCommand.ts b/src/funcs/composeGetDefaultCommand.ts new file mode 100644 index 0000000..af7e0ce --- /dev/null +++ b/src/funcs/composeGetDefaultCommand.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function composeGetDefaultCommand( + client: DokployCore, + request: operations.ComposeGetDefaultCommandRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ComposeGetDefaultCommandRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ComposeGetDefaultCommandRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/compose.getDefaultCommand")(); + + const query = encodeFormQuery({ + "composeId": payload.composeId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "compose-getDefaultCommand", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/composeGetOne.ts b/src/funcs/composeGetOne.ts new file mode 100644 index 0000000..a5499b1 --- /dev/null +++ b/src/funcs/composeGetOne.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function composeGetOne( + client: DokployCore, + request: operations.ComposeOneRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ComposeOneRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ComposeOneRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/compose.one")(); + + const query = encodeFormQuery({ + "composeId": payload.composeId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "compose-one", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/composeGetTags.ts b/src/funcs/composeGetTags.ts new file mode 100644 index 0000000..9837614 --- /dev/null +++ b/src/funcs/composeGetTags.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function composeGetTags( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/compose.getTags")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "compose-getTags", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/composeGetTemplates.ts b/src/funcs/composeGetTemplates.ts new file mode 100644 index 0000000..a0338cd --- /dev/null +++ b/src/funcs/composeGetTemplates.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function composeGetTemplates( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/compose.templates")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "compose-templates", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/composeRandomizeCompose.ts b/src/funcs/composeRandomizeCompose.ts new file mode 100644 index 0000000..91e9d69 --- /dev/null +++ b/src/funcs/composeRandomizeCompose.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function composeRandomizeCompose( + client: DokployCore, + request: operations.ComposeRandomizeComposeRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ComposeRandomizeComposeRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ComposeRandomizeComposeRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/compose.randomizeCompose")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "compose-randomizeCompose", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/composeRedeploy.ts b/src/funcs/composeRedeploy.ts new file mode 100644 index 0000000..0bcb615 --- /dev/null +++ b/src/funcs/composeRedeploy.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function composeRedeploy( + client: DokployCore, + request: operations.ComposeRedeployRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ComposeRedeployRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ComposeRedeployRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/compose.redeploy")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "compose-redeploy", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/composeRefreshToken.ts b/src/funcs/composeRefreshToken.ts new file mode 100644 index 0000000..4ff9652 --- /dev/null +++ b/src/funcs/composeRefreshToken.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function composeRefreshToken( + client: DokployCore, + request: operations.ComposeRefreshTokenRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ComposeRefreshTokenRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ComposeRefreshTokenRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/compose.refreshToken")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "compose-refreshToken", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/composeStop.ts b/src/funcs/composeStop.ts new file mode 100644 index 0000000..9690902 --- /dev/null +++ b/src/funcs/composeStop.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function composeStop( + client: DokployCore, + request: operations.ComposeStopRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ComposeStopRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ComposeStopRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/compose.stop")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "compose-stop", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/composeUpdate.ts b/src/funcs/composeUpdate.ts new file mode 100644 index 0000000..cba431d --- /dev/null +++ b/src/funcs/composeUpdate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function composeUpdate( + client: DokployCore, + request: operations.ComposeUpdateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ComposeUpdateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ComposeUpdateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/compose.update")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "compose-update", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/deploymentAllByCompose.ts b/src/funcs/deploymentAllByCompose.ts new file mode 100644 index 0000000..bff9eb9 --- /dev/null +++ b/src/funcs/deploymentAllByCompose.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function deploymentAllByCompose( + client: DokployCore, + request: operations.DeploymentAllByComposeRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.DeploymentAllByComposeRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeploymentAllByComposeRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/deployment.allByCompose")(); + + const query = encodeFormQuery({ + "composeId": payload.composeId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "deployment-allByCompose", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/deploymentAllByServer.ts b/src/funcs/deploymentAllByServer.ts new file mode 100644 index 0000000..b77496f --- /dev/null +++ b/src/funcs/deploymentAllByServer.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function deploymentAllByServer( + client: DokployCore, + request: operations.DeploymentAllByServerRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.DeploymentAllByServerRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeploymentAllByServerRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/deployment.allByServer")(); + + const query = encodeFormQuery({ + "serverId": payload.serverId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "deployment-allByServer", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/deploymentGet.ts b/src/funcs/deploymentGet.ts new file mode 100644 index 0000000..efc51aa --- /dev/null +++ b/src/funcs/deploymentGet.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function deploymentGet( + client: DokployCore, + request: operations.DeploymentAllRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.DeploymentAllRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeploymentAllRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/deployment.all")(); + + const query = encodeFormQuery({ + "applicationId": payload.applicationId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "deployment-all", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/destinationCreate.ts b/src/funcs/destinationCreate.ts new file mode 100644 index 0000000..2e7e866 --- /dev/null +++ b/src/funcs/destinationCreate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function destinationCreate( + client: DokployCore, + request: operations.DestinationCreateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.DestinationCreateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DestinationCreateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/destination.create")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "destination-create", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/destinationGet.ts b/src/funcs/destinationGet.ts new file mode 100644 index 0000000..9d4ea1a --- /dev/null +++ b/src/funcs/destinationGet.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function destinationGet( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/destination.all")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "destination-all", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/destinationGetOne.ts b/src/funcs/destinationGetOne.ts new file mode 100644 index 0000000..f8cae5c --- /dev/null +++ b/src/funcs/destinationGetOne.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function destinationGetOne( + client: DokployCore, + request: operations.DestinationOneRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.DestinationOneRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DestinationOneRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/destination.one")(); + + const query = encodeFormQuery({ + "destinationId": payload.destinationId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "destination-one", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/destinationRemove.ts b/src/funcs/destinationRemove.ts new file mode 100644 index 0000000..69e76c4 --- /dev/null +++ b/src/funcs/destinationRemove.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function destinationRemove( + client: DokployCore, + request: operations.DestinationRemoveRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.DestinationRemoveRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DestinationRemoveRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/destination.remove")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "destination-remove", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/destinationTestConnection.ts b/src/funcs/destinationTestConnection.ts new file mode 100644 index 0000000..973e50e --- /dev/null +++ b/src/funcs/destinationTestConnection.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function destinationTestConnection( + client: DokployCore, + request: operations.DestinationTestConnectionRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.DestinationTestConnectionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DestinationTestConnectionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/destination.testConnection")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "destination-testConnection", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/destinationUpdate.ts b/src/funcs/destinationUpdate.ts new file mode 100644 index 0000000..328f16d --- /dev/null +++ b/src/funcs/destinationUpdate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function destinationUpdate( + client: DokployCore, + request: operations.DestinationUpdateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.DestinationUpdateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DestinationUpdateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/destination.update")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "destination-update", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/dockerGetConfig.ts b/src/funcs/dockerGetConfig.ts new file mode 100644 index 0000000..cb41d85 --- /dev/null +++ b/src/funcs/dockerGetConfig.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function dockerGetConfig( + client: DokployCore, + request: operations.DockerGetConfigRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.DockerGetConfigRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DockerGetConfigRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/docker.getConfig")(); + + const query = encodeFormQuery({ + "containerId": payload.containerId, + "serverId": payload.serverId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "docker-getConfig", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/dockerGetContainers.ts b/src/funcs/dockerGetContainers.ts new file mode 100644 index 0000000..965919f --- /dev/null +++ b/src/funcs/dockerGetContainers.ts @@ -0,0 +1,163 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function dockerGetContainers( + client: DokployCore, + request?: operations.DockerGetContainersRequest | undefined, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request?: operations.DockerGetContainersRequest | undefined, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DockerGetContainersRequest$outboundSchema.optional().parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/docker.getContainers")(); + + const query = encodeFormQuery({ + "serverId": payload?.serverId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "docker-getContainers", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/dockerGetContainersByAppLabel.ts b/src/funcs/dockerGetContainersByAppLabel.ts new file mode 100644 index 0000000..0c5aee0 --- /dev/null +++ b/src/funcs/dockerGetContainersByAppLabel.ts @@ -0,0 +1,164 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function dockerGetContainersByAppLabel( + client: DokployCore, + request: operations.DockerGetContainersByAppLabelRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.DockerGetContainersByAppLabelRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DockerGetContainersByAppLabelRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/docker.getContainersByAppLabel")(); + + const query = encodeFormQuery({ + "appName": payload.appName, + "serverId": payload.serverId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "docker-getContainersByAppLabel", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/dockerGetContainersByAppNameMatch.ts b/src/funcs/dockerGetContainersByAppNameMatch.ts new file mode 100644 index 0000000..6c8a260 --- /dev/null +++ b/src/funcs/dockerGetContainersByAppNameMatch.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function dockerGetContainersByAppNameMatch( + client: DokployCore, + request: operations.DockerGetContainersByAppNameMatchRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.DockerGetContainersByAppNameMatchRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DockerGetContainersByAppNameMatchRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/docker.getContainersByAppNameMatch")(); + + const query = encodeFormQuery({ + "appName": payload.appName, + "appType": payload.appType, + "serverId": payload.serverId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "docker-getContainersByAppNameMatch", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/dockerRestartContainer.ts b/src/funcs/dockerRestartContainer.ts new file mode 100644 index 0000000..35261bf --- /dev/null +++ b/src/funcs/dockerRestartContainer.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function dockerRestartContainer( + client: DokployCore, + request: operations.DockerRestartContainerRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.DockerRestartContainerRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DockerRestartContainerRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/docker.restartContainer")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "docker-restartContainer", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/domainByApplicationId.ts b/src/funcs/domainByApplicationId.ts new file mode 100644 index 0000000..2659083 --- /dev/null +++ b/src/funcs/domainByApplicationId.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function domainByApplicationId( + client: DokployCore, + request: operations.DomainByApplicationIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.DomainByApplicationIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DomainByApplicationIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/domain.byApplicationId")(); + + const query = encodeFormQuery({ + "applicationId": payload.applicationId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "domain-byApplicationId", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/domainByComposeId.ts b/src/funcs/domainByComposeId.ts new file mode 100644 index 0000000..cb27755 --- /dev/null +++ b/src/funcs/domainByComposeId.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function domainByComposeId( + client: DokployCore, + request: operations.DomainByComposeIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.DomainByComposeIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DomainByComposeIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/domain.byComposeId")(); + + const query = encodeFormQuery({ + "composeId": payload.composeId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "domain-byComposeId", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/domainCreate.ts b/src/funcs/domainCreate.ts new file mode 100644 index 0000000..db3ebcb --- /dev/null +++ b/src/funcs/domainCreate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function domainCreate( + client: DokployCore, + request: operations.DomainCreateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.DomainCreateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DomainCreateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/domain.create")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "domain-create", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/domainDelete.ts b/src/funcs/domainDelete.ts new file mode 100644 index 0000000..695d4a7 --- /dev/null +++ b/src/funcs/domainDelete.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function domainDelete( + client: DokployCore, + request: operations.DomainDeleteRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.DomainDeleteRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DomainDeleteRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/domain.delete")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "domain-delete", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/domainGenerateDomain.ts b/src/funcs/domainGenerateDomain.ts new file mode 100644 index 0000000..504e074 --- /dev/null +++ b/src/funcs/domainGenerateDomain.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function domainGenerateDomain( + client: DokployCore, + request: operations.DomainGenerateDomainRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.DomainGenerateDomainRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DomainGenerateDomainRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/domain.generateDomain")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "domain-generateDomain", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/domainGet.ts b/src/funcs/domainGet.ts new file mode 100644 index 0000000..cf83007 --- /dev/null +++ b/src/funcs/domainGet.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function domainGet( + client: DokployCore, + request: operations.DomainOneRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.DomainOneRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DomainOneRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/domain.one")(); + + const query = encodeFormQuery({ + "domainId": payload.domainId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "domain-one", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/domainUpdate.ts b/src/funcs/domainUpdate.ts new file mode 100644 index 0000000..09d73d7 --- /dev/null +++ b/src/funcs/domainUpdate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function domainUpdate( + client: DokployCore, + request: operations.DomainUpdateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.DomainUpdateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DomainUpdateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/domain.update")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "domain-update", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/gitProviderGetAll.ts b/src/funcs/gitProviderGetAll.ts new file mode 100644 index 0000000..e717249 --- /dev/null +++ b/src/funcs/gitProviderGetAll.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function gitProviderGetAll( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/gitProvider.getAll")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "gitProvider-getAll", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/gitProviderRemove.ts b/src/funcs/gitProviderRemove.ts new file mode 100644 index 0000000..76e027c --- /dev/null +++ b/src/funcs/gitProviderRemove.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function gitProviderRemove( + client: DokployCore, + request: operations.GitProviderRemoveRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.GitProviderRemoveRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GitProviderRemoveRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/gitProvider.remove")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "gitProvider-remove", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/githubGetBranches.ts b/src/funcs/githubGetBranches.ts new file mode 100644 index 0000000..08616c1 --- /dev/null +++ b/src/funcs/githubGetBranches.ts @@ -0,0 +1,163 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function githubGetBranches( + client: DokployCore, + request: operations.GithubGetGithubBranchesRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.GithubGetGithubBranchesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GithubGetGithubBranchesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/github.getGithubBranches")(); + + const query = encodeFormQuery({ + "githubId": payload.githubId, + "owner": payload.owner, + "repo": payload.repo, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "github-getGithubBranches", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/githubGetProviders.ts b/src/funcs/githubGetProviders.ts new file mode 100644 index 0000000..b433a60 --- /dev/null +++ b/src/funcs/githubGetProviders.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function githubGetProviders( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/github.githubProviders")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "github-githubProviders", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/githubGetRepositories.ts b/src/funcs/githubGetRepositories.ts new file mode 100644 index 0000000..f9450b0 --- /dev/null +++ b/src/funcs/githubGetRepositories.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function githubGetRepositories( + client: DokployCore, + request: operations.GithubGetGithubRepositoriesRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.GithubGetGithubRepositoriesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GithubGetGithubRepositoriesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/github.getGithubRepositories")(); + + const query = encodeFormQuery({ + "githubId": payload.githubId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "github-getGithubRepositories", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/githubOne.ts b/src/funcs/githubOne.ts new file mode 100644 index 0000000..5c445ca --- /dev/null +++ b/src/funcs/githubOne.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function githubOne( + client: DokployCore, + request: operations.GithubOneRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.GithubOneRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GithubOneRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/github.one")(); + + const query = encodeFormQuery({ + "githubId": payload.githubId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "github-one", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/githubTestConnection.ts b/src/funcs/githubTestConnection.ts new file mode 100644 index 0000000..97665c7 --- /dev/null +++ b/src/funcs/githubTestConnection.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function githubTestConnection( + client: DokployCore, + request: operations.GithubTestConnectionRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.GithubTestConnectionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GithubTestConnectionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/github.testConnection")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "github-testConnection", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/githubUpdate.ts b/src/funcs/githubUpdate.ts new file mode 100644 index 0000000..f1e66d2 --- /dev/null +++ b/src/funcs/githubUpdate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function githubUpdate( + client: DokployCore, + request: operations.GithubUpdateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.GithubUpdateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GithubUpdateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/github.update")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "github-update", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/gitlabCreate.ts b/src/funcs/gitlabCreate.ts new file mode 100644 index 0000000..d3ee034 --- /dev/null +++ b/src/funcs/gitlabCreate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function gitlabCreate( + client: DokployCore, + request: operations.GitlabCreateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.GitlabCreateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GitlabCreateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/gitlab.create")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "gitlab-create", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/gitlabGetGitlabBranches.ts b/src/funcs/gitlabGetGitlabBranches.ts new file mode 100644 index 0000000..ee44dfb --- /dev/null +++ b/src/funcs/gitlabGetGitlabBranches.ts @@ -0,0 +1,164 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function gitlabGetGitlabBranches( + client: DokployCore, + request: operations.GitlabGetGitlabBranchesRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.GitlabGetGitlabBranchesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GitlabGetGitlabBranchesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/gitlab.getGitlabBranches")(); + + const query = encodeFormQuery({ + "gitlabId": payload.gitlabId, + "id": payload.id, + "owner": payload.owner, + "repo": payload.repo, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "gitlab-getGitlabBranches", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/gitlabGetGitlabRepositories.ts b/src/funcs/gitlabGetGitlabRepositories.ts new file mode 100644 index 0000000..33f8544 --- /dev/null +++ b/src/funcs/gitlabGetGitlabRepositories.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function gitlabGetGitlabRepositories( + client: DokployCore, + request: operations.GitlabGetGitlabRepositoriesRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.GitlabGetGitlabRepositoriesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GitlabGetGitlabRepositoriesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/gitlab.getGitlabRepositories")(); + + const query = encodeFormQuery({ + "gitlabId": payload.gitlabId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "gitlab-getGitlabRepositories", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/gitlabOne.ts b/src/funcs/gitlabOne.ts new file mode 100644 index 0000000..2760e36 --- /dev/null +++ b/src/funcs/gitlabOne.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function gitlabOne( + client: DokployCore, + request: operations.GitlabOneRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.GitlabOneRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GitlabOneRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/gitlab.one")(); + + const query = encodeFormQuery({ + "gitlabId": payload.gitlabId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "gitlab-one", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/gitlabProviders.ts b/src/funcs/gitlabProviders.ts new file mode 100644 index 0000000..428e19c --- /dev/null +++ b/src/funcs/gitlabProviders.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function gitlabProviders( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/gitlab.gitlabProviders")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "gitlab-gitlabProviders", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/gitlabTestConnection.ts b/src/funcs/gitlabTestConnection.ts new file mode 100644 index 0000000..5a20935 --- /dev/null +++ b/src/funcs/gitlabTestConnection.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function gitlabTestConnection( + client: DokployCore, + request: operations.GitlabTestConnectionRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.GitlabTestConnectionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GitlabTestConnectionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/gitlab.testConnection")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "gitlab-testConnection", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/gitlabUpdate.ts b/src/funcs/gitlabUpdate.ts new file mode 100644 index 0000000..4e80409 --- /dev/null +++ b/src/funcs/gitlabUpdate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function gitlabUpdate( + client: DokployCore, + request: operations.GitlabUpdateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.GitlabUpdateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GitlabUpdateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/gitlab.update")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "gitlab-update", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mariadbChangeStatus.ts b/src/funcs/mariadbChangeStatus.ts new file mode 100644 index 0000000..de6989c --- /dev/null +++ b/src/funcs/mariadbChangeStatus.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function mariadbChangeStatus( + client: DokployCore, + request: operations.MariadbChangeStatusRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.MariadbChangeStatusRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.MariadbChangeStatusRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/mariadb.changeStatus")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mariadb-changeStatus", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mariadbCreate.ts b/src/funcs/mariadbCreate.ts new file mode 100644 index 0000000..c7b31c9 --- /dev/null +++ b/src/funcs/mariadbCreate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function mariadbCreate( + client: DokployCore, + request: operations.MariadbCreateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.MariadbCreateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MariadbCreateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/mariadb.create")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mariadb-create", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mariadbDeploy.ts b/src/funcs/mariadbDeploy.ts new file mode 100644 index 0000000..efd0c83 --- /dev/null +++ b/src/funcs/mariadbDeploy.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function mariadbDeploy( + client: DokployCore, + request: operations.MariadbDeployRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.MariadbDeployRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MariadbDeployRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/mariadb.deploy")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mariadb-deploy", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mariadbGet.ts b/src/funcs/mariadbGet.ts new file mode 100644 index 0000000..f9ba249 --- /dev/null +++ b/src/funcs/mariadbGet.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function mariadbGet( + client: DokployCore, + request: operations.MariadbOneRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.MariadbOneRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MariadbOneRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/mariadb.one")(); + + const query = encodeFormQuery({ + "mariadbId": payload.mariadbId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mariadb-one", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mariadbReload.ts b/src/funcs/mariadbReload.ts new file mode 100644 index 0000000..7b1f0c3 --- /dev/null +++ b/src/funcs/mariadbReload.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function mariadbReload( + client: DokployCore, + request: operations.MariadbReloadRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.MariadbReloadRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MariadbReloadRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/mariadb.reload")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mariadb-reload", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mariadbRemove.ts b/src/funcs/mariadbRemove.ts new file mode 100644 index 0000000..f6a0eb0 --- /dev/null +++ b/src/funcs/mariadbRemove.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function mariadbRemove( + client: DokployCore, + request: operations.MariadbRemoveRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.MariadbRemoveRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MariadbRemoveRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/mariadb.remove")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mariadb-remove", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mariadbSaveEnvironment.ts b/src/funcs/mariadbSaveEnvironment.ts new file mode 100644 index 0000000..14f0f1b --- /dev/null +++ b/src/funcs/mariadbSaveEnvironment.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function mariadbSaveEnvironment( + client: DokployCore, + request: operations.MariadbSaveEnvironmentRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.MariadbSaveEnvironmentRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.MariadbSaveEnvironmentRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/mariadb.saveEnvironment")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mariadb-saveEnvironment", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mariadbSaveExternalPort.ts b/src/funcs/mariadbSaveExternalPort.ts new file mode 100644 index 0000000..14889ca --- /dev/null +++ b/src/funcs/mariadbSaveExternalPort.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function mariadbSaveExternalPort( + client: DokployCore, + request: operations.MariadbSaveExternalPortRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.MariadbSaveExternalPortRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.MariadbSaveExternalPortRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/mariadb.saveExternalPort")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mariadb-saveExternalPort", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mariadbStart.ts b/src/funcs/mariadbStart.ts new file mode 100644 index 0000000..2e94e53 --- /dev/null +++ b/src/funcs/mariadbStart.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function mariadbStart( + client: DokployCore, + request: operations.MariadbStartRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.MariadbStartRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MariadbStartRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/mariadb.start")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mariadb-start", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mariadbStop.ts b/src/funcs/mariadbStop.ts new file mode 100644 index 0000000..67859eb --- /dev/null +++ b/src/funcs/mariadbStop.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function mariadbStop( + client: DokployCore, + request: operations.MariadbStopRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.MariadbStopRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MariadbStopRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/mariadb.stop")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mariadb-stop", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mariadbUpdate.ts b/src/funcs/mariadbUpdate.ts new file mode 100644 index 0000000..f860403 --- /dev/null +++ b/src/funcs/mariadbUpdate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function mariadbUpdate( + client: DokployCore, + request: operations.MariadbUpdateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.MariadbUpdateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MariadbUpdateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/mariadb.update")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mariadb-update", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mongoChangeStatus.ts b/src/funcs/mongoChangeStatus.ts new file mode 100644 index 0000000..5fb37a6 --- /dev/null +++ b/src/funcs/mongoChangeStatus.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function mongoChangeStatus( + client: DokployCore, + request: operations.MongoChangeStatusRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.MongoChangeStatusRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MongoChangeStatusRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/mongo.changeStatus")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mongo-changeStatus", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mongoCreate.ts b/src/funcs/mongoCreate.ts new file mode 100644 index 0000000..6e3209b --- /dev/null +++ b/src/funcs/mongoCreate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function mongoCreate( + client: DokployCore, + request: operations.MongoCreateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.MongoCreateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MongoCreateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/mongo.create")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mongo-create", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mongoDeploy.ts b/src/funcs/mongoDeploy.ts new file mode 100644 index 0000000..a874daa --- /dev/null +++ b/src/funcs/mongoDeploy.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function mongoDeploy( + client: DokployCore, + request: operations.MongoDeployRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.MongoDeployRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MongoDeployRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/mongo.deploy")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mongo-deploy", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mongoGet.ts b/src/funcs/mongoGet.ts new file mode 100644 index 0000000..620777b --- /dev/null +++ b/src/funcs/mongoGet.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function mongoGet( + client: DokployCore, + request: operations.MongoOneRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.MongoOneRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MongoOneRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/mongo.one")(); + + const query = encodeFormQuery({ + "mongoId": payload.mongoId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mongo-one", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mongoReload.ts b/src/funcs/mongoReload.ts new file mode 100644 index 0000000..3539f9e --- /dev/null +++ b/src/funcs/mongoReload.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function mongoReload( + client: DokployCore, + request: operations.MongoReloadRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.MongoReloadRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MongoReloadRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/mongo.reload")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mongo-reload", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mongoRemove.ts b/src/funcs/mongoRemove.ts new file mode 100644 index 0000000..2de2ff5 --- /dev/null +++ b/src/funcs/mongoRemove.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function mongoRemove( + client: DokployCore, + request: operations.MongoRemoveRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.MongoRemoveRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MongoRemoveRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/mongo.remove")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mongo-remove", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mongoSaveEnvironment.ts b/src/funcs/mongoSaveEnvironment.ts new file mode 100644 index 0000000..9f1f5ce --- /dev/null +++ b/src/funcs/mongoSaveEnvironment.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function mongoSaveEnvironment( + client: DokployCore, + request: operations.MongoSaveEnvironmentRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.MongoSaveEnvironmentRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.MongoSaveEnvironmentRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/mongo.saveEnvironment")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mongo-saveEnvironment", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mongoSaveExternalPort.ts b/src/funcs/mongoSaveExternalPort.ts new file mode 100644 index 0000000..7537eb0 --- /dev/null +++ b/src/funcs/mongoSaveExternalPort.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function mongoSaveExternalPort( + client: DokployCore, + request: operations.MongoSaveExternalPortRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.MongoSaveExternalPortRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.MongoSaveExternalPortRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/mongo.saveExternalPort")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mongo-saveExternalPort", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mongoStart.ts b/src/funcs/mongoStart.ts new file mode 100644 index 0000000..bdd6c6f --- /dev/null +++ b/src/funcs/mongoStart.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function mongoStart( + client: DokployCore, + request: operations.MongoStartRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.MongoStartRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MongoStartRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/mongo.start")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mongo-start", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mongoStop.ts b/src/funcs/mongoStop.ts new file mode 100644 index 0000000..bd62fe2 --- /dev/null +++ b/src/funcs/mongoStop.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function mongoStop( + client: DokployCore, + request: operations.MongoStopRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.MongoStopRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MongoStopRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/mongo.stop")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mongo-stop", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mongoUpdate.ts b/src/funcs/mongoUpdate.ts new file mode 100644 index 0000000..9d124fd --- /dev/null +++ b/src/funcs/mongoUpdate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function mongoUpdate( + client: DokployCore, + request: operations.MongoUpdateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.MongoUpdateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MongoUpdateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/mongo.update")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mongo-update", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mountsCreate.ts b/src/funcs/mountsCreate.ts new file mode 100644 index 0000000..4cc0a3b --- /dev/null +++ b/src/funcs/mountsCreate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function mountsCreate( + client: DokployCore, + request: operations.MountsCreateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.MountsCreateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MountsCreateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/mounts.create")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mounts-create", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mountsGet.ts b/src/funcs/mountsGet.ts new file mode 100644 index 0000000..66379cd --- /dev/null +++ b/src/funcs/mountsGet.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function mountsGet( + client: DokployCore, + request: operations.MountsOneRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.MountsOneRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MountsOneRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/mounts.one")(); + + const query = encodeFormQuery({ + "mountId": payload.mountId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mounts-one", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mountsRemove.ts b/src/funcs/mountsRemove.ts new file mode 100644 index 0000000..e8723dc --- /dev/null +++ b/src/funcs/mountsRemove.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function mountsRemove( + client: DokployCore, + request: operations.MountsRemoveRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.MountsRemoveRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MountsRemoveRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/mounts.remove")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mounts-remove", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mountsUpdate.ts b/src/funcs/mountsUpdate.ts new file mode 100644 index 0000000..8e7ad68 --- /dev/null +++ b/src/funcs/mountsUpdate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function mountsUpdate( + client: DokployCore, + request: operations.MountsUpdateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.MountsUpdateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MountsUpdateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/mounts.update")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mounts-update", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mysqlChangeStatus.ts b/src/funcs/mysqlChangeStatus.ts new file mode 100644 index 0000000..d60dee6 --- /dev/null +++ b/src/funcs/mysqlChangeStatus.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function mysqlChangeStatus( + client: DokployCore, + request: operations.MysqlChangeStatusRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.MysqlChangeStatusRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MysqlChangeStatusRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/mysql.changeStatus")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mysql-changeStatus", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mysqlCreate.ts b/src/funcs/mysqlCreate.ts new file mode 100644 index 0000000..773458a --- /dev/null +++ b/src/funcs/mysqlCreate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function mysqlCreate( + client: DokployCore, + request: operations.MysqlCreateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.MysqlCreateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MysqlCreateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/mysql.create")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mysql-create", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mysqlDeploy.ts b/src/funcs/mysqlDeploy.ts new file mode 100644 index 0000000..d798602 --- /dev/null +++ b/src/funcs/mysqlDeploy.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function mysqlDeploy( + client: DokployCore, + request: operations.MysqlDeployRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.MysqlDeployRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MysqlDeployRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/mysql.deploy")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mysql-deploy", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mysqlGet.ts b/src/funcs/mysqlGet.ts new file mode 100644 index 0000000..bf03439 --- /dev/null +++ b/src/funcs/mysqlGet.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function mysqlGet( + client: DokployCore, + request: operations.MysqlOneRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.MysqlOneRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MysqlOneRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/mysql.one")(); + + const query = encodeFormQuery({ + "mysqlId": payload.mysqlId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mysql-one", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mysqlReload.ts b/src/funcs/mysqlReload.ts new file mode 100644 index 0000000..9de6536 --- /dev/null +++ b/src/funcs/mysqlReload.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function mysqlReload( + client: DokployCore, + request: operations.MysqlReloadRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.MysqlReloadRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MysqlReloadRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/mysql.reload")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mysql-reload", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mysqlRemove.ts b/src/funcs/mysqlRemove.ts new file mode 100644 index 0000000..4c855e5 --- /dev/null +++ b/src/funcs/mysqlRemove.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function mysqlRemove( + client: DokployCore, + request: operations.MysqlRemoveRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.MysqlRemoveRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MysqlRemoveRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/mysql.remove")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mysql-remove", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mysqlSaveEnvironment.ts b/src/funcs/mysqlSaveEnvironment.ts new file mode 100644 index 0000000..1ea894d --- /dev/null +++ b/src/funcs/mysqlSaveEnvironment.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function mysqlSaveEnvironment( + client: DokployCore, + request: operations.MysqlSaveEnvironmentRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.MysqlSaveEnvironmentRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.MysqlSaveEnvironmentRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/mysql.saveEnvironment")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mysql-saveEnvironment", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mysqlSaveExternalPort.ts b/src/funcs/mysqlSaveExternalPort.ts new file mode 100644 index 0000000..a5c8ef7 --- /dev/null +++ b/src/funcs/mysqlSaveExternalPort.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function mysqlSaveExternalPort( + client: DokployCore, + request: operations.MysqlSaveExternalPortRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.MysqlSaveExternalPortRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.MysqlSaveExternalPortRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/mysql.saveExternalPort")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mysql-saveExternalPort", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mysqlStart.ts b/src/funcs/mysqlStart.ts new file mode 100644 index 0000000..2ebd4b2 --- /dev/null +++ b/src/funcs/mysqlStart.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function mysqlStart( + client: DokployCore, + request: operations.MysqlStartRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.MysqlStartRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MysqlStartRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/mysql.start")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mysql-start", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mysqlStop.ts b/src/funcs/mysqlStop.ts new file mode 100644 index 0000000..cfb80cb --- /dev/null +++ b/src/funcs/mysqlStop.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function mysqlStop( + client: DokployCore, + request: operations.MysqlStopRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.MysqlStopRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MysqlStopRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/mysql.stop")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mysql-stop", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mysqlUpdate.ts b/src/funcs/mysqlUpdate.ts new file mode 100644 index 0000000..fba3a68 --- /dev/null +++ b/src/funcs/mysqlUpdate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function mysqlUpdate( + client: DokployCore, + request: operations.MysqlUpdateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.MysqlUpdateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MysqlUpdateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/mysql.update")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mysql-update", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/notificationCreateDiscord.ts b/src/funcs/notificationCreateDiscord.ts new file mode 100644 index 0000000..025f1aa --- /dev/null +++ b/src/funcs/notificationCreateDiscord.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function notificationCreateDiscord( + client: DokployCore, + request: operations.NotificationCreateDiscordRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.NotificationCreateDiscordRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.NotificationCreateDiscordRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/notification.createDiscord")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "notification-createDiscord", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/notificationCreateEmail.ts b/src/funcs/notificationCreateEmail.ts new file mode 100644 index 0000000..90b2a46 --- /dev/null +++ b/src/funcs/notificationCreateEmail.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function notificationCreateEmail( + client: DokployCore, + request: operations.NotificationCreateEmailRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.NotificationCreateEmailRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.NotificationCreateEmailRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/notification.createEmail")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "notification-createEmail", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/notificationCreateSlack.ts b/src/funcs/notificationCreateSlack.ts new file mode 100644 index 0000000..ba365f6 --- /dev/null +++ b/src/funcs/notificationCreateSlack.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function notificationCreateSlack( + client: DokployCore, + request: operations.NotificationCreateSlackRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.NotificationCreateSlackRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.NotificationCreateSlackRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/notification.createSlack")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "notification-createSlack", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/notificationCreateTelegram.ts b/src/funcs/notificationCreateTelegram.ts new file mode 100644 index 0000000..94a1103 --- /dev/null +++ b/src/funcs/notificationCreateTelegram.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function notificationCreateTelegram( + client: DokployCore, + request: operations.NotificationCreateTelegramRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.NotificationCreateTelegramRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.NotificationCreateTelegramRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/notification.createTelegram")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "notification-createTelegram", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/notificationGetAll.ts b/src/funcs/notificationGetAll.ts new file mode 100644 index 0000000..34ae932 --- /dev/null +++ b/src/funcs/notificationGetAll.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function notificationGetAll( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/notification.all")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "notification-all", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/notificationRemove.ts b/src/funcs/notificationRemove.ts new file mode 100644 index 0000000..70f0013 --- /dev/null +++ b/src/funcs/notificationRemove.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function notificationRemove( + client: DokployCore, + request: operations.NotificationRemoveRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.NotificationRemoveRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.NotificationRemoveRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/notification.remove")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "notification-remove", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/notificationTestDiscordConnection.ts b/src/funcs/notificationTestDiscordConnection.ts new file mode 100644 index 0000000..138fed9 --- /dev/null +++ b/src/funcs/notificationTestDiscordConnection.ts @@ -0,0 +1,159 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function notificationTestDiscordConnection( + client: DokployCore, + request: operations.NotificationTestDiscordConnectionRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.NotificationTestDiscordConnectionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.NotificationTestDiscordConnectionRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/notification.testDiscordConnection")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "notification-testDiscordConnection", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/notificationTestEmailConnection.ts b/src/funcs/notificationTestEmailConnection.ts new file mode 100644 index 0000000..fec859d --- /dev/null +++ b/src/funcs/notificationTestEmailConnection.ts @@ -0,0 +1,159 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function notificationTestEmailConnection( + client: DokployCore, + request: operations.NotificationTestEmailConnectionRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.NotificationTestEmailConnectionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.NotificationTestEmailConnectionRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/notification.testEmailConnection")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "notification-testEmailConnection", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/notificationTestSlackConnection.ts b/src/funcs/notificationTestSlackConnection.ts new file mode 100644 index 0000000..a40b6aa --- /dev/null +++ b/src/funcs/notificationTestSlackConnection.ts @@ -0,0 +1,159 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function notificationTestSlackConnection( + client: DokployCore, + request: operations.NotificationTestSlackConnectionRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.NotificationTestSlackConnectionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.NotificationTestSlackConnectionRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/notification.testSlackConnection")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "notification-testSlackConnection", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/notificationTestTelegramConnection.ts b/src/funcs/notificationTestTelegramConnection.ts new file mode 100644 index 0000000..692eff3 --- /dev/null +++ b/src/funcs/notificationTestTelegramConnection.ts @@ -0,0 +1,159 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function notificationTestTelegramConnection( + client: DokployCore, + request: operations.NotificationTestTelegramConnectionRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.NotificationTestTelegramConnectionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.NotificationTestTelegramConnectionRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/notification.testTelegramConnection")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "notification-testTelegramConnection", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/notificationUpdateDiscord.ts b/src/funcs/notificationUpdateDiscord.ts new file mode 100644 index 0000000..f3d3e51 --- /dev/null +++ b/src/funcs/notificationUpdateDiscord.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function notificationUpdateDiscord( + client: DokployCore, + request: operations.NotificationUpdateDiscordRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.NotificationUpdateDiscordRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.NotificationUpdateDiscordRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/notification.updateDiscord")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "notification-updateDiscord", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/notificationUpdateEmail.ts b/src/funcs/notificationUpdateEmail.ts new file mode 100644 index 0000000..20ec43a --- /dev/null +++ b/src/funcs/notificationUpdateEmail.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function notificationUpdateEmail( + client: DokployCore, + request: operations.NotificationUpdateEmailRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.NotificationUpdateEmailRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.NotificationUpdateEmailRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/notification.updateEmail")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "notification-updateEmail", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/notificationUpdateSlack.ts b/src/funcs/notificationUpdateSlack.ts new file mode 100644 index 0000000..f38966c --- /dev/null +++ b/src/funcs/notificationUpdateSlack.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function notificationUpdateSlack( + client: DokployCore, + request: operations.NotificationUpdateSlackRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.NotificationUpdateSlackRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.NotificationUpdateSlackRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/notification.updateSlack")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "notification-updateSlack", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/notificationUpdateTelegram.ts b/src/funcs/notificationUpdateTelegram.ts new file mode 100644 index 0000000..c7a8f4d --- /dev/null +++ b/src/funcs/notificationUpdateTelegram.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function notificationUpdateTelegram( + client: DokployCore, + request: operations.NotificationUpdateTelegramRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.NotificationUpdateTelegramRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.NotificationUpdateTelegramRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/notification.updateTelegram")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "notification-updateTelegram", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/notificationsGet.ts b/src/funcs/notificationsGet.ts new file mode 100644 index 0000000..0eee75a --- /dev/null +++ b/src/funcs/notificationsGet.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function notificationsGet( + client: DokployCore, + request: operations.NotificationOneRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.NotificationOneRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.NotificationOneRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/notification.one")(); + + const query = encodeFormQuery({ + "notificationId": payload.notificationId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "notification-one", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/portCreate.ts b/src/funcs/portCreate.ts new file mode 100644 index 0000000..d9d2d4d --- /dev/null +++ b/src/funcs/portCreate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function portCreate( + client: DokployCore, + request: operations.PortCreateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.PortCreateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.PortCreateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/port.create")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "port-create", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/portDelete.ts b/src/funcs/portDelete.ts new file mode 100644 index 0000000..c20cbc2 --- /dev/null +++ b/src/funcs/portDelete.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function portDelete( + client: DokployCore, + request: operations.PortDeleteRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.PortDeleteRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.PortDeleteRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/port.delete")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "port-delete", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/portGet.ts b/src/funcs/portGet.ts new file mode 100644 index 0000000..226b44f --- /dev/null +++ b/src/funcs/portGet.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function portGet( + client: DokployCore, + request: operations.PortOneRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.PortOneRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.PortOneRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/port.one")(); + + const query = encodeFormQuery({ + "portId": payload.portId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "port-one", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/portUpdate.ts b/src/funcs/portUpdate.ts new file mode 100644 index 0000000..b00135a --- /dev/null +++ b/src/funcs/portUpdate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function portUpdate( + client: DokployCore, + request: operations.PortUpdateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.PortUpdateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.PortUpdateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/port.update")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "port-update", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/postgresChangeStatus.ts b/src/funcs/postgresChangeStatus.ts new file mode 100644 index 0000000..6d2a7e8 --- /dev/null +++ b/src/funcs/postgresChangeStatus.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function postgresChangeStatus( + client: DokployCore, + request: operations.PostgresChangeStatusRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.PostgresChangeStatusRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.PostgresChangeStatusRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/postgres.changeStatus")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "postgres-changeStatus", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/postgresCreate.ts b/src/funcs/postgresCreate.ts new file mode 100644 index 0000000..f9386d4 --- /dev/null +++ b/src/funcs/postgresCreate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function postgresCreate( + client: DokployCore, + request: operations.PostgresCreateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.PostgresCreateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.PostgresCreateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/postgres.create")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "postgres-create", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/postgresDeploy.ts b/src/funcs/postgresDeploy.ts new file mode 100644 index 0000000..11f61d0 --- /dev/null +++ b/src/funcs/postgresDeploy.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function postgresDeploy( + client: DokployCore, + request: operations.PostgresDeployRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.PostgresDeployRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.PostgresDeployRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/postgres.deploy")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "postgres-deploy", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/postgresGet.ts b/src/funcs/postgresGet.ts new file mode 100644 index 0000000..85b1fe9 --- /dev/null +++ b/src/funcs/postgresGet.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function postgresGet( + client: DokployCore, + request: operations.PostgresOneRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.PostgresOneRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.PostgresOneRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/postgres.one")(); + + const query = encodeFormQuery({ + "postgresId": payload.postgresId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "postgres-one", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/postgresReload.ts b/src/funcs/postgresReload.ts new file mode 100644 index 0000000..c66b614 --- /dev/null +++ b/src/funcs/postgresReload.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function postgresReload( + client: DokployCore, + request: operations.PostgresReloadRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.PostgresReloadRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.PostgresReloadRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/postgres.reload")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "postgres-reload", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/postgresRemove.ts b/src/funcs/postgresRemove.ts new file mode 100644 index 0000000..9b9da70 --- /dev/null +++ b/src/funcs/postgresRemove.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function postgresRemove( + client: DokployCore, + request: operations.PostgresRemoveRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.PostgresRemoveRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.PostgresRemoveRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/postgres.remove")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "postgres-remove", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/postgresSaveEnvironment.ts b/src/funcs/postgresSaveEnvironment.ts new file mode 100644 index 0000000..955ab2f --- /dev/null +++ b/src/funcs/postgresSaveEnvironment.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function postgresSaveEnvironment( + client: DokployCore, + request: operations.PostgresSaveEnvironmentRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.PostgresSaveEnvironmentRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.PostgresSaveEnvironmentRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/postgres.saveEnvironment")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "postgres-saveEnvironment", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/postgresSaveExternalPort.ts b/src/funcs/postgresSaveExternalPort.ts new file mode 100644 index 0000000..90f9044 --- /dev/null +++ b/src/funcs/postgresSaveExternalPort.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function postgresSaveExternalPort( + client: DokployCore, + request: operations.PostgresSaveExternalPortRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.PostgresSaveExternalPortRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.PostgresSaveExternalPortRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/postgres.saveExternalPort")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "postgres-saveExternalPort", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/postgresStart.ts b/src/funcs/postgresStart.ts new file mode 100644 index 0000000..8401e4a --- /dev/null +++ b/src/funcs/postgresStart.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function postgresStart( + client: DokployCore, + request: operations.PostgresStartRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.PostgresStartRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.PostgresStartRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/postgres.start")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "postgres-start", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/postgresStop.ts b/src/funcs/postgresStop.ts new file mode 100644 index 0000000..fe7456f --- /dev/null +++ b/src/funcs/postgresStop.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function postgresStop( + client: DokployCore, + request: operations.PostgresStopRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.PostgresStopRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.PostgresStopRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/postgres.stop")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "postgres-stop", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/postgresUpdate.ts b/src/funcs/postgresUpdate.ts new file mode 100644 index 0000000..00bcbbd --- /dev/null +++ b/src/funcs/postgresUpdate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function postgresUpdate( + client: DokployCore, + request: operations.PostgresUpdateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.PostgresUpdateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.PostgresUpdateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/postgres.update")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "postgres-update", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/projectAll.ts b/src/funcs/projectAll.ts new file mode 100644 index 0000000..7045ec6 --- /dev/null +++ b/src/funcs/projectAll.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function projectAll( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/project.all")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "project-all", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/projectCreate.ts b/src/funcs/projectCreate.ts new file mode 100644 index 0000000..b0ba627 --- /dev/null +++ b/src/funcs/projectCreate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function projectCreate( + client: DokployCore, + request: operations.ProjectCreateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ProjectCreateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ProjectCreateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/project.create")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "project-create", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/projectGet.ts b/src/funcs/projectGet.ts new file mode 100644 index 0000000..29639e6 --- /dev/null +++ b/src/funcs/projectGet.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function projectGet( + client: DokployCore, + request: operations.ProjectOneRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ProjectOneRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ProjectOneRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/project.one")(); + + const query = encodeFormQuery({ + "projectId": payload.projectId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "project-one", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/projectRemove.ts b/src/funcs/projectRemove.ts new file mode 100644 index 0000000..52523f1 --- /dev/null +++ b/src/funcs/projectRemove.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function projectRemove( + client: DokployCore, + request: operations.ProjectRemoveRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ProjectRemoveRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ProjectRemoveRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/project.remove")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "project-remove", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/projectUpdate.ts b/src/funcs/projectUpdate.ts new file mode 100644 index 0000000..6b69f9d --- /dev/null +++ b/src/funcs/projectUpdate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function projectUpdate( + client: DokployCore, + request: operations.ProjectUpdateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ProjectUpdateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ProjectUpdateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/project.update")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "project-update", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/redirectsCreate.ts b/src/funcs/redirectsCreate.ts new file mode 100644 index 0000000..57c7a20 --- /dev/null +++ b/src/funcs/redirectsCreate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function redirectsCreate( + client: DokployCore, + request: operations.RedirectsCreateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.RedirectsCreateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.RedirectsCreateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/redirects.create")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "redirects-create", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/redirectsDelete.ts b/src/funcs/redirectsDelete.ts new file mode 100644 index 0000000..ab6ed27 --- /dev/null +++ b/src/funcs/redirectsDelete.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function redirectsDelete( + client: DokployCore, + request: operations.RedirectsDeleteRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.RedirectsDeleteRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.RedirectsDeleteRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/redirects.delete")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "redirects-delete", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/redirectsGetOne.ts b/src/funcs/redirectsGetOne.ts new file mode 100644 index 0000000..0b519ef --- /dev/null +++ b/src/funcs/redirectsGetOne.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function redirectsGetOne( + client: DokployCore, + request: operations.RedirectsOneRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.RedirectsOneRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.RedirectsOneRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/redirects.one")(); + + const query = encodeFormQuery({ + "redirectId": payload.redirectId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "redirects-one", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/redirectsUpdate.ts b/src/funcs/redirectsUpdate.ts new file mode 100644 index 0000000..695ad04 --- /dev/null +++ b/src/funcs/redirectsUpdate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function redirectsUpdate( + client: DokployCore, + request: operations.RedirectsUpdateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.RedirectsUpdateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.RedirectsUpdateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/redirects.update")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "redirects-update", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/redisChangeStatus.ts b/src/funcs/redisChangeStatus.ts new file mode 100644 index 0000000..b04ea43 --- /dev/null +++ b/src/funcs/redisChangeStatus.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function redisChangeStatus( + client: DokployCore, + request: operations.RedisChangeStatusRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.RedisChangeStatusRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.RedisChangeStatusRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/redis.changeStatus")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "redis-changeStatus", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/redisCreate.ts b/src/funcs/redisCreate.ts new file mode 100644 index 0000000..66e988e --- /dev/null +++ b/src/funcs/redisCreate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function redisCreate( + client: DokployCore, + request: operations.RedisCreateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.RedisCreateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.RedisCreateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/redis.create")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "redis-create", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/redisDeploy.ts b/src/funcs/redisDeploy.ts new file mode 100644 index 0000000..fad88e8 --- /dev/null +++ b/src/funcs/redisDeploy.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function redisDeploy( + client: DokployCore, + request: operations.RedisDeployRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.RedisDeployRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.RedisDeployRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/redis.deploy")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "redis-deploy", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/redisGet.ts b/src/funcs/redisGet.ts new file mode 100644 index 0000000..bb1501d --- /dev/null +++ b/src/funcs/redisGet.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function redisGet( + client: DokployCore, + request: operations.RedisOneRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.RedisOneRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.RedisOneRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/redis.one")(); + + const query = encodeFormQuery({ + "redisId": payload.redisId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "redis-one", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/redisReload.ts b/src/funcs/redisReload.ts new file mode 100644 index 0000000..8b00d95 --- /dev/null +++ b/src/funcs/redisReload.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function redisReload( + client: DokployCore, + request: operations.RedisReloadRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.RedisReloadRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.RedisReloadRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/redis.reload")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "redis-reload", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/redisRemove.ts b/src/funcs/redisRemove.ts new file mode 100644 index 0000000..570615f --- /dev/null +++ b/src/funcs/redisRemove.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function redisRemove( + client: DokployCore, + request: operations.RedisRemoveRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.RedisRemoveRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.RedisRemoveRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/redis.remove")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "redis-remove", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/redisSaveEnvironment.ts b/src/funcs/redisSaveEnvironment.ts new file mode 100644 index 0000000..283080c --- /dev/null +++ b/src/funcs/redisSaveEnvironment.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function redisSaveEnvironment( + client: DokployCore, + request: operations.RedisSaveEnvironmentRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.RedisSaveEnvironmentRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.RedisSaveEnvironmentRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/redis.saveEnvironment")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "redis-saveEnvironment", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/redisSaveExternalPort.ts b/src/funcs/redisSaveExternalPort.ts new file mode 100644 index 0000000..fa7fbbf --- /dev/null +++ b/src/funcs/redisSaveExternalPort.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function redisSaveExternalPort( + client: DokployCore, + request: operations.RedisSaveExternalPortRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.RedisSaveExternalPortRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.RedisSaveExternalPortRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/redis.saveExternalPort")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "redis-saveExternalPort", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/redisStart.ts b/src/funcs/redisStart.ts new file mode 100644 index 0000000..91df938 --- /dev/null +++ b/src/funcs/redisStart.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function redisStart( + client: DokployCore, + request: operations.RedisStartRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.RedisStartRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.RedisStartRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/redis.start")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "redis-start", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/redisStop.ts b/src/funcs/redisStop.ts new file mode 100644 index 0000000..9d60422 --- /dev/null +++ b/src/funcs/redisStop.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function redisStop( + client: DokployCore, + request: operations.RedisStopRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.RedisStopRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.RedisStopRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/redis.stop")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "redis-stop", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/redisUpdate.ts b/src/funcs/redisUpdate.ts new file mode 100644 index 0000000..5a6e67a --- /dev/null +++ b/src/funcs/redisUpdate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function redisUpdate( + client: DokployCore, + request: operations.RedisUpdateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.RedisUpdateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.RedisUpdateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/redis.update")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "redis-update", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/registryCreate.ts b/src/funcs/registryCreate.ts new file mode 100644 index 0000000..e97d036 --- /dev/null +++ b/src/funcs/registryCreate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function registryCreate( + client: DokployCore, + request: operations.RegistryCreateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.RegistryCreateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.RegistryCreateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/registry.create")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "registry-create", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/registryGet.ts b/src/funcs/registryGet.ts new file mode 100644 index 0000000..a02ac4b --- /dev/null +++ b/src/funcs/registryGet.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function registryGet( + client: DokployCore, + request: operations.RegistryOneRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.RegistryOneRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.RegistryOneRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/registry.one")(); + + const query = encodeFormQuery({ + "registryId": payload.registryId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "registry-one", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/registryGetAll.ts b/src/funcs/registryGetAll.ts new file mode 100644 index 0000000..9c4f4c1 --- /dev/null +++ b/src/funcs/registryGetAll.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function registryGetAll( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/registry.all")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "registry-all", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/registryRemove.ts b/src/funcs/registryRemove.ts new file mode 100644 index 0000000..cc2c7dd --- /dev/null +++ b/src/funcs/registryRemove.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function registryRemove( + client: DokployCore, + request: operations.RegistryRemoveRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.RegistryRemoveRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.RegistryRemoveRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/registry.remove")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "registry-remove", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/registryTestRegistry.ts b/src/funcs/registryTestRegistry.ts new file mode 100644 index 0000000..3dc2235 --- /dev/null +++ b/src/funcs/registryTestRegistry.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function registryTestRegistry( + client: DokployCore, + request: operations.RegistryTestRegistryRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.RegistryTestRegistryRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.RegistryTestRegistryRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/registry.testRegistry")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "registry-testRegistry", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/registryUpdate.ts b/src/funcs/registryUpdate.ts new file mode 100644 index 0000000..004d628 --- /dev/null +++ b/src/funcs/registryUpdate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function registryUpdate( + client: DokployCore, + request: operations.RegistryUpdateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.RegistryUpdateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.RegistryUpdateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/registry.update")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "registry-update", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/securityCreate.ts b/src/funcs/securityCreate.ts new file mode 100644 index 0000000..a7211d4 --- /dev/null +++ b/src/funcs/securityCreate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function securityCreate( + client: DokployCore, + request: operations.SecurityCreateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.SecurityCreateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.SecurityCreateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/security.create")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "security-create", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/securityDelete.ts b/src/funcs/securityDelete.ts new file mode 100644 index 0000000..00cf159 --- /dev/null +++ b/src/funcs/securityDelete.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function securityDelete( + client: DokployCore, + request: operations.SecurityDeleteRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.SecurityDeleteRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.SecurityDeleteRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/security.delete")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "security-delete", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/securityGet.ts b/src/funcs/securityGet.ts new file mode 100644 index 0000000..bd64d4d --- /dev/null +++ b/src/funcs/securityGet.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function securityGet( + client: DokployCore, + request: operations.SecurityOneRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.SecurityOneRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.SecurityOneRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/security.one")(); + + const query = encodeFormQuery({ + "securityId": payload.securityId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "security-one", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/securityUpdate.ts b/src/funcs/securityUpdate.ts new file mode 100644 index 0000000..8ed6f83 --- /dev/null +++ b/src/funcs/securityUpdate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function securityUpdate( + client: DokployCore, + request: operations.SecurityUpdateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.SecurityUpdateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.SecurityUpdateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/security.update")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "security-update", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/serverAll.ts b/src/funcs/serverAll.ts new file mode 100644 index 0000000..34b7fe6 --- /dev/null +++ b/src/funcs/serverAll.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function serverAll( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/server.all")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "server-all", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/serverCreate.ts b/src/funcs/serverCreate.ts new file mode 100644 index 0000000..ae5e521 --- /dev/null +++ b/src/funcs/serverCreate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function serverCreate( + client: DokployCore, + request: operations.ServerCreateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ServerCreateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ServerCreateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/server.create")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "server-create", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/serverRemove.ts b/src/funcs/serverRemove.ts new file mode 100644 index 0000000..2e5bc8a --- /dev/null +++ b/src/funcs/serverRemove.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function serverRemove( + client: DokployCore, + request: operations.ServerRemoveRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ServerRemoveRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ServerRemoveRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/server.remove")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "server-remove", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/serverSetup.ts b/src/funcs/serverSetup.ts new file mode 100644 index 0000000..b52a6ed --- /dev/null +++ b/src/funcs/serverSetup.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function serverSetup( + client: DokployCore, + request: operations.ServerSetupRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ServerSetupRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ServerSetupRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/server.setup")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "server-setup", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/serverUpdate.ts b/src/funcs/serverUpdate.ts new file mode 100644 index 0000000..eccf7e5 --- /dev/null +++ b/src/funcs/serverUpdate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function serverUpdate( + client: DokployCore, + request: operations.ServerUpdateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ServerUpdateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ServerUpdateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/server.update")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "server-update", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/serverWithSSHKey.ts b/src/funcs/serverWithSSHKey.ts new file mode 100644 index 0000000..7dce131 --- /dev/null +++ b/src/funcs/serverWithSSHKey.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function serverWithSSHKey( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/server.withSSHKey")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "server-withSSHKey", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/serversGet.ts b/src/funcs/serversGet.ts new file mode 100644 index 0000000..6c51634 --- /dev/null +++ b/src/funcs/serversGet.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function serversGet( + client: DokployCore, + request: operations.ServerOneRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.ServerOneRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ServerOneRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/server.one")(); + + const query = encodeFormQuery({ + "serverId": payload.serverId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "server-one", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsAssignDomainServer.ts b/src/funcs/settingsAssignDomainServer.ts new file mode 100644 index 0000000..64d6a06 --- /dev/null +++ b/src/funcs/settingsAssignDomainServer.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsAssignDomainServer( + client: DokployCore, + request: operations.SettingsAssignDomainServerRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.SettingsAssignDomainServerRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.SettingsAssignDomainServerRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/settings.assignDomainServer")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-assignDomainServer", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsCheckAndUpdateImage.ts b/src/funcs/settingsCheckAndUpdateImage.ts new file mode 100644 index 0000000..ab5636c --- /dev/null +++ b/src/funcs/settingsCheckAndUpdateImage.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsCheckAndUpdateImage( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/settings.checkAndUpdateImage")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-checkAndUpdateImage", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsCleanAll.ts b/src/funcs/settingsCleanAll.ts new file mode 100644 index 0000000..79a9da7 --- /dev/null +++ b/src/funcs/settingsCleanAll.ts @@ -0,0 +1,159 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsCleanAll( + client: DokployCore, + request?: operations.SettingsCleanAllRequest | undefined, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request?: operations.SettingsCleanAllRequest | undefined, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.SettingsCleanAllRequest$outboundSchema.optional().parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = payload === undefined + ? null + : encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/settings.cleanAll")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-cleanAll", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsCleanDockerBuilder.ts b/src/funcs/settingsCleanDockerBuilder.ts new file mode 100644 index 0000000..1ae0e66 --- /dev/null +++ b/src/funcs/settingsCleanDockerBuilder.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsCleanDockerBuilder( + client: DokployCore, + request?: operations.SettingsCleanDockerBuilderRequest | undefined, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request?: operations.SettingsCleanDockerBuilderRequest | undefined, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.SettingsCleanDockerBuilderRequest$outboundSchema.optional() + .parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = payload === undefined + ? null + : encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/settings.cleanDockerBuilder")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-cleanDockerBuilder", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsCleanDockerPrune.ts b/src/funcs/settingsCleanDockerPrune.ts new file mode 100644 index 0000000..1ed2def --- /dev/null +++ b/src/funcs/settingsCleanDockerPrune.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsCleanDockerPrune( + client: DokployCore, + request?: operations.SettingsCleanDockerPruneRequest | undefined, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request?: operations.SettingsCleanDockerPruneRequest | undefined, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.SettingsCleanDockerPruneRequest$outboundSchema.optional() + .parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = payload === undefined + ? null + : encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/settings.cleanDockerPrune")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-cleanDockerPrune", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsCleanMonitoring.ts b/src/funcs/settingsCleanMonitoring.ts new file mode 100644 index 0000000..505703e --- /dev/null +++ b/src/funcs/settingsCleanMonitoring.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsCleanMonitoring( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/settings.cleanMonitoring")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-cleanMonitoring", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsCleanSshPrivateKey.ts b/src/funcs/settingsCleanSshPrivateKey.ts new file mode 100644 index 0000000..bfd2bac --- /dev/null +++ b/src/funcs/settingsCleanSshPrivateKey.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsCleanSshPrivateKey( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/settings.cleanSSHPrivateKey")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-cleanSSHPrivateKey", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsCleanStoppedContainers.ts b/src/funcs/settingsCleanStoppedContainers.ts new file mode 100644 index 0000000..982a3b4 --- /dev/null +++ b/src/funcs/settingsCleanStoppedContainers.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsCleanStoppedContainers( + client: DokployCore, + request?: operations.SettingsCleanStoppedContainersRequest | undefined, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request?: operations.SettingsCleanStoppedContainersRequest | undefined, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.SettingsCleanStoppedContainersRequest$outboundSchema.optional() + .parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = payload === undefined + ? null + : encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/settings.cleanStoppedContainers")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-cleanStoppedContainers", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsCleanUnusedImages.ts b/src/funcs/settingsCleanUnusedImages.ts new file mode 100644 index 0000000..73b972a --- /dev/null +++ b/src/funcs/settingsCleanUnusedImages.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsCleanUnusedImages( + client: DokployCore, + request?: operations.SettingsCleanUnusedImagesRequest | undefined, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request?: operations.SettingsCleanUnusedImagesRequest | undefined, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.SettingsCleanUnusedImagesRequest$outboundSchema.optional() + .parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = payload === undefined + ? null + : encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/settings.cleanUnusedImages")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-cleanUnusedImages", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsCleanUnusedVolumes.ts b/src/funcs/settingsCleanUnusedVolumes.ts new file mode 100644 index 0000000..a8b4a87 --- /dev/null +++ b/src/funcs/settingsCleanUnusedVolumes.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsCleanUnusedVolumes( + client: DokployCore, + request?: operations.SettingsCleanUnusedVolumesRequest | undefined, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request?: operations.SettingsCleanUnusedVolumesRequest | undefined, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.SettingsCleanUnusedVolumesRequest$outboundSchema.optional() + .parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = payload === undefined + ? null + : encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/settings.cleanUnusedVolumes")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-cleanUnusedVolumes", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsGetDokployVersion.ts b/src/funcs/settingsGetDokployVersion.ts new file mode 100644 index 0000000..59439fa --- /dev/null +++ b/src/funcs/settingsGetDokployVersion.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsGetDokployVersion( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/settings.getDokployVersion")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-getDokployVersion", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsGetIp.ts b/src/funcs/settingsGetIp.ts new file mode 100644 index 0000000..92add93 --- /dev/null +++ b/src/funcs/settingsGetIp.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsGetIp( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/settings.getIp")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-getIp", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsGetLogRotateStatus.ts b/src/funcs/settingsGetLogRotateStatus.ts new file mode 100644 index 0000000..f81f010 --- /dev/null +++ b/src/funcs/settingsGetLogRotateStatus.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsGetLogRotateStatus( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/settings.getLogRotateStatus")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-getLogRotateStatus", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsGetOpenApiDocument.ts b/src/funcs/settingsGetOpenApiDocument.ts new file mode 100644 index 0000000..1db5864 --- /dev/null +++ b/src/funcs/settingsGetOpenApiDocument.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsGetOpenApiDocument( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/settings.getOpenApiDocument")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-getOpenApiDocument", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsHaveActivateRequests.ts b/src/funcs/settingsHaveActivateRequests.ts new file mode 100644 index 0000000..fa7b7f4 --- /dev/null +++ b/src/funcs/settingsHaveActivateRequests.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsHaveActivateRequests( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/settings.haveActivateRequests")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-haveActivateRequests", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsHaveTraefikDashboardPortEnabled.ts b/src/funcs/settingsHaveTraefikDashboardPortEnabled.ts new file mode 100644 index 0000000..c8f4a44 --- /dev/null +++ b/src/funcs/settingsHaveTraefikDashboardPortEnabled.ts @@ -0,0 +1,166 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsHaveTraefikDashboardPortEnabled( + client: DokployCore, + request?: + | operations.SettingsHaveTraefikDashboardPortEnabledRequest + | undefined, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request?: + | operations.SettingsHaveTraefikDashboardPortEnabledRequest + | undefined, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.SettingsHaveTraefikDashboardPortEnabledRequest$outboundSchema + .optional().parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/settings.haveTraefikDashboardPortEnabled")(); + + const query = encodeFormQuery({ + "serverId": payload?.serverId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-haveTraefikDashboardPortEnabled", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsHealth.ts b/src/funcs/settingsHealth.ts new file mode 100644 index 0000000..d9202ba --- /dev/null +++ b/src/funcs/settingsHealth.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsHealth( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/settings.health")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-health", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsIsCloud.ts b/src/funcs/settingsIsCloud.ts new file mode 100644 index 0000000..b65a39b --- /dev/null +++ b/src/funcs/settingsIsCloud.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsIsCloud( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/settings.isCloud")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-isCloud", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsReadDirectories.ts b/src/funcs/settingsReadDirectories.ts new file mode 100644 index 0000000..4706f53 --- /dev/null +++ b/src/funcs/settingsReadDirectories.ts @@ -0,0 +1,163 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsReadDirectories( + client: DokployCore, + request?: operations.SettingsReadDirectoriesRequest | undefined, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request?: operations.SettingsReadDirectoriesRequest | undefined, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.SettingsReadDirectoriesRequest$outboundSchema.optional().parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/settings.readDirectories")(); + + const query = encodeFormQuery({ + "serverId": payload?.serverId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-readDirectories", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsReadMiddlewareTraefikConfig.ts b/src/funcs/settingsReadMiddlewareTraefikConfig.ts new file mode 100644 index 0000000..29f5907 --- /dev/null +++ b/src/funcs/settingsReadMiddlewareTraefikConfig.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsReadMiddlewareTraefikConfig( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/settings.readMiddlewareTraefikConfig")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-readMiddlewareTraefikConfig", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsReadStats.ts b/src/funcs/settingsReadStats.ts new file mode 100644 index 0000000..716a15b --- /dev/null +++ b/src/funcs/settingsReadStats.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsReadStats( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/settings.readStats")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-readStats", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsReadTraefikConfig.ts b/src/funcs/settingsReadTraefikConfig.ts new file mode 100644 index 0000000..7d80f8f --- /dev/null +++ b/src/funcs/settingsReadTraefikConfig.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsReadTraefikConfig( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/settings.readTraefikConfig")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-readTraefikConfig", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsReadTraefikEnv.ts b/src/funcs/settingsReadTraefikEnv.ts new file mode 100644 index 0000000..f0eee45 --- /dev/null +++ b/src/funcs/settingsReadTraefikEnv.ts @@ -0,0 +1,163 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsReadTraefikEnv( + client: DokployCore, + request?: operations.SettingsReadTraefikEnvRequest | undefined, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request?: operations.SettingsReadTraefikEnvRequest | undefined, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.SettingsReadTraefikEnvRequest$outboundSchema.optional().parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/settings.readTraefikEnv")(); + + const query = encodeFormQuery({ + "serverId": payload?.serverId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-readTraefikEnv", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsReadTraefikFile.ts b/src/funcs/settingsReadTraefikFile.ts new file mode 100644 index 0000000..b2d36b8 --- /dev/null +++ b/src/funcs/settingsReadTraefikFile.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsReadTraefikFile( + client: DokployCore, + request: operations.SettingsReadTraefikFileRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.SettingsReadTraefikFileRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.SettingsReadTraefikFileRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/settings.readTraefikFile")(); + + const query = encodeFormQuery({ + "path": payload.path, + "serverId": payload.serverId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-readTraefikFile", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsReadWebServerTraefikConfig.ts b/src/funcs/settingsReadWebServerTraefikConfig.ts new file mode 100644 index 0000000..ac01a62 --- /dev/null +++ b/src/funcs/settingsReadWebServerTraefikConfig.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsReadWebServerTraefikConfig( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/settings.readWebServerTraefikConfig")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-readWebServerTraefikConfig", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsReloadServer.ts b/src/funcs/settingsReloadServer.ts new file mode 100644 index 0000000..3186295 --- /dev/null +++ b/src/funcs/settingsReloadServer.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsReloadServer( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/settings.reloadServer")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-reloadServer", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsReloadTraefik.ts b/src/funcs/settingsReloadTraefik.ts new file mode 100644 index 0000000..5682c86 --- /dev/null +++ b/src/funcs/settingsReloadTraefik.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsReloadTraefik( + client: DokployCore, + request?: operations.SettingsReloadTraefikRequest | undefined, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request?: operations.SettingsReloadTraefikRequest | undefined, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.SettingsReloadTraefikRequest$outboundSchema.optional().parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = payload === undefined + ? null + : encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/settings.reloadTraefik")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-reloadTraefik", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsSaveSshPrivateKey.ts b/src/funcs/settingsSaveSshPrivateKey.ts new file mode 100644 index 0000000..ffdce00 --- /dev/null +++ b/src/funcs/settingsSaveSshPrivateKey.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsSaveSshPrivateKey( + client: DokployCore, + request: operations.SettingsSaveSSHPrivateKeyRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.SettingsSaveSSHPrivateKeyRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.SettingsSaveSSHPrivateKeyRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/settings.saveSSHPrivateKey")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-saveSSHPrivateKey", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsToggleDashboard.ts b/src/funcs/settingsToggleDashboard.ts new file mode 100644 index 0000000..bbaf193 --- /dev/null +++ b/src/funcs/settingsToggleDashboard.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsToggleDashboard( + client: DokployCore, + request: operations.SettingsToggleDashboardRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.SettingsToggleDashboardRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.SettingsToggleDashboardRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/settings.toggleDashboard")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-toggleDashboard", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsToggleLogRotate.ts b/src/funcs/settingsToggleLogRotate.ts new file mode 100644 index 0000000..88bfb35 --- /dev/null +++ b/src/funcs/settingsToggleLogRotate.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsToggleLogRotate( + client: DokployCore, + request: operations.SettingsToggleLogRotateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.SettingsToggleLogRotateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.SettingsToggleLogRotateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/settings.toggleLogRotate")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-toggleLogRotate", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsToggleRequests.ts b/src/funcs/settingsToggleRequests.ts new file mode 100644 index 0000000..027766e --- /dev/null +++ b/src/funcs/settingsToggleRequests.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsToggleRequests( + client: DokployCore, + request: operations.SettingsToggleRequestsRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.SettingsToggleRequestsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.SettingsToggleRequestsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/settings.toggleRequests")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-toggleRequests", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsUpdateDockerCleanup.ts b/src/funcs/settingsUpdateDockerCleanup.ts new file mode 100644 index 0000000..5ebe720 --- /dev/null +++ b/src/funcs/settingsUpdateDockerCleanup.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsUpdateDockerCleanup( + client: DokployCore, + request: operations.SettingsUpdateDockerCleanupRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.SettingsUpdateDockerCleanupRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.SettingsUpdateDockerCleanupRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/settings.updateDockerCleanup")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-updateDockerCleanup", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsUpdateMiddlewareTraefikConfig.ts b/src/funcs/settingsUpdateMiddlewareTraefikConfig.ts new file mode 100644 index 0000000..e34ea27 --- /dev/null +++ b/src/funcs/settingsUpdateMiddlewareTraefikConfig.ts @@ -0,0 +1,158 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsUpdateMiddlewareTraefikConfig( + client: DokployCore, + request: operations.SettingsUpdateMiddlewareTraefikConfigRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.SettingsUpdateMiddlewareTraefikConfigRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.SettingsUpdateMiddlewareTraefikConfigRequest$outboundSchema + .parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/settings.updateMiddlewareTraefikConfig")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-updateMiddlewareTraefikConfig", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsUpdateServer.ts b/src/funcs/settingsUpdateServer.ts new file mode 100644 index 0000000..06cc7d0 --- /dev/null +++ b/src/funcs/settingsUpdateServer.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsUpdateServer( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/settings.updateServer")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-updateServer", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsUpdateTraefikConfig.ts b/src/funcs/settingsUpdateTraefikConfig.ts new file mode 100644 index 0000000..b58c8db --- /dev/null +++ b/src/funcs/settingsUpdateTraefikConfig.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsUpdateTraefikConfig( + client: DokployCore, + request: operations.SettingsUpdateTraefikConfigRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.SettingsUpdateTraefikConfigRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.SettingsUpdateTraefikConfigRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/settings.updateTraefikConfig")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-updateTraefikConfig", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsUpdateTraefikFile.ts b/src/funcs/settingsUpdateTraefikFile.ts new file mode 100644 index 0000000..7eb07b1 --- /dev/null +++ b/src/funcs/settingsUpdateTraefikFile.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsUpdateTraefikFile( + client: DokployCore, + request: operations.SettingsUpdateTraefikFileRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.SettingsUpdateTraefikFileRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.SettingsUpdateTraefikFileRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/settings.updateTraefikFile")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-updateTraefikFile", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsUpdateWebServerTraefikConfig.ts b/src/funcs/settingsUpdateWebServerTraefikConfig.ts new file mode 100644 index 0000000..1538fca --- /dev/null +++ b/src/funcs/settingsUpdateWebServerTraefikConfig.ts @@ -0,0 +1,158 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsUpdateWebServerTraefikConfig( + client: DokployCore, + request: operations.SettingsUpdateWebServerTraefikConfigRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.SettingsUpdateWebServerTraefikConfigRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.SettingsUpdateWebServerTraefikConfigRequest$outboundSchema + .parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/settings.updateWebServerTraefikConfig")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-updateWebServerTraefikConfig", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/settingsWriteTraefikEnv.ts b/src/funcs/settingsWriteTraefikEnv.ts new file mode 100644 index 0000000..42a8699 --- /dev/null +++ b/src/funcs/settingsWriteTraefikEnv.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function settingsWriteTraefikEnv( + client: DokployCore, + request: operations.SettingsWriteTraefikEnvRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.SettingsWriteTraefikEnvRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.SettingsWriteTraefikEnvRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/settings.writeTraefikEnv")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "settings-writeTraefikEnv", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/sshKeyGenerate.ts b/src/funcs/sshKeyGenerate.ts new file mode 100644 index 0000000..83b8e5b --- /dev/null +++ b/src/funcs/sshKeyGenerate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function sshKeyGenerate( + client: DokployCore, + request: operations.SshKeyGenerateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.SshKeyGenerateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.SshKeyGenerateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/sshKey.generate")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "sshKey-generate", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/sshKeyGet.ts b/src/funcs/sshKeyGet.ts new file mode 100644 index 0000000..7dfd1c9 --- /dev/null +++ b/src/funcs/sshKeyGet.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function sshKeyGet( + client: DokployCore, + request: operations.SshKeyOneRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.SshKeyOneRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.SshKeyOneRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/sshKey.one")(); + + const query = encodeFormQuery({ + "sshKeyId": payload.sshKeyId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "sshKey-one", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/sshKeyRemove.ts b/src/funcs/sshKeyRemove.ts new file mode 100644 index 0000000..36c85ed --- /dev/null +++ b/src/funcs/sshKeyRemove.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function sshKeyRemove( + client: DokployCore, + request: operations.SshKeyRemoveRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.SshKeyRemoveRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.SshKeyRemoveRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/sshKey.remove")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "sshKey-remove", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/sshKeyUpdate.ts b/src/funcs/sshKeyUpdate.ts new file mode 100644 index 0000000..af43ab7 --- /dev/null +++ b/src/funcs/sshKeyUpdate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function sshKeyUpdate( + client: DokployCore, + request: operations.SshKeyUpdateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.SshKeyUpdateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.SshKeyUpdateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/sshKey.update")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "sshKey-update", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/sshKeysAll.ts b/src/funcs/sshKeysAll.ts new file mode 100644 index 0000000..e2dcd4f --- /dev/null +++ b/src/funcs/sshKeysAll.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function sshKeysAll( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/sshKey.all")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "sshKey-all", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/sshKeysCreate.ts b/src/funcs/sshKeysCreate.ts new file mode 100644 index 0000000..094e007 --- /dev/null +++ b/src/funcs/sshKeysCreate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function sshKeysCreate( + client: DokployCore, + request: operations.SshKeyCreateRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.SshKeyCreateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.SshKeyCreateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/sshKey.create")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "sshKey-create", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/stripeCanCreateMoreServers.ts b/src/funcs/stripeCanCreateMoreServers.ts new file mode 100644 index 0000000..b4ef6dd --- /dev/null +++ b/src/funcs/stripeCanCreateMoreServers.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function stripeCanCreateMoreServers( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/stripe.canCreateMoreServers")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "stripe-canCreateMoreServers", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/stripeCreateCheckoutSession.ts b/src/funcs/stripeCreateCheckoutSession.ts new file mode 100644 index 0000000..90a9a14 --- /dev/null +++ b/src/funcs/stripeCreateCheckoutSession.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function stripeCreateCheckoutSession( + client: DokployCore, + request: operations.StripeCreateCheckoutSessionRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.StripeCreateCheckoutSessionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.StripeCreateCheckoutSessionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/stripe.createCheckoutSession")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "stripe-createCheckoutSession", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/stripeCreateCustomerPortalSession.ts b/src/funcs/stripeCreateCustomerPortalSession.ts new file mode 100644 index 0000000..9afff8c --- /dev/null +++ b/src/funcs/stripeCreateCustomerPortalSession.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function stripeCreateCustomerPortalSession( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/stripe.createCustomerPortalSession")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "stripe-createCustomerPortalSession", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/stripeGetProducts.ts b/src/funcs/stripeGetProducts.ts new file mode 100644 index 0000000..8338752 --- /dev/null +++ b/src/funcs/stripeGetProducts.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function stripeGetProducts( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/stripe.getProducts")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "stripe-getProducts", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/userByAuthId.ts b/src/funcs/userByAuthId.ts new file mode 100644 index 0000000..4598c0a --- /dev/null +++ b/src/funcs/userByAuthId.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function userByAuthId( + client: DokployCore, + request: operations.UserByAuthIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.UserByAuthIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.UserByAuthIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/user.byAuthId")(); + + const query = encodeFormQuery({ + "authId": payload.authId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "user-byAuthId", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/userByUserId.ts b/src/funcs/userByUserId.ts new file mode 100644 index 0000000..4d97f92 --- /dev/null +++ b/src/funcs/userByUserId.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function userByUserId( + client: DokployCore, + request: operations.UserByUserIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: DokployCore, + request: operations.UserByUserIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.UserByUserIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/user.byUserId")(); + + const query = encodeFormQuery({ + "userId": payload.userId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "user-byUserId", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/userGetAll.ts b/src/funcs/userGetAll.ts new file mode 100644 index 0000000..984dd68 --- /dev/null +++ b/src/funcs/userGetAll.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { DokployError } from "../models/errors/dokployerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function userGetAll( + client: DokployCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: DokployCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/user.all")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authorization); + const securityInput = secConfig == null ? {} : { authorization: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "user-all", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authorization, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ErrorT | undefined, + | DokployError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, models.ErrorT$inboundSchema.optional()), + M.fail("4XX"), + M.fail("5XX"), + M.json("default", models.ErrorT$inboundSchema.optional()), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/hooks/hooks.ts b/src/hooks/hooks.ts new file mode 100644 index 0000000..7ed9e04 --- /dev/null +++ b/src/hooks/hooks.ts @@ -0,0 +1,132 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { SDKOptions } from "../lib/config.js"; +import { RequestInput } from "../lib/http.js"; +import { + AfterErrorContext, + AfterErrorHook, + AfterSuccessContext, + AfterSuccessHook, + BeforeCreateRequestContext, + BeforeCreateRequestHook, + BeforeRequestContext, + BeforeRequestHook, + Hook, + Hooks, + SDKInitHook, +} from "./types.js"; + +import { initHooks } from "./registration.js"; + +export class SDKHooks implements Hooks { + sdkInitHooks: SDKInitHook[] = []; + beforeCreateRequestHooks: BeforeCreateRequestHook[] = []; + beforeRequestHooks: BeforeRequestHook[] = []; + afterSuccessHooks: AfterSuccessHook[] = []; + afterErrorHooks: AfterErrorHook[] = []; + + constructor() { + const presetHooks: Array = []; + + for (const hook of presetHooks) { + if ("sdkInit" in hook) { + this.registerSDKInitHook(hook); + } + if ("beforeCreateRequest" in hook) { + this.registerBeforeCreateRequestHook(hook); + } + if ("beforeRequest" in hook) { + this.registerBeforeRequestHook(hook); + } + if ("afterSuccess" in hook) { + this.registerAfterSuccessHook(hook); + } + if ("afterError" in hook) { + this.registerAfterErrorHook(hook); + } + } + initHooks(this); + } + + registerSDKInitHook(hook: SDKInitHook) { + this.sdkInitHooks.push(hook); + } + + registerBeforeCreateRequestHook(hook: BeforeCreateRequestHook) { + this.beforeCreateRequestHooks.push(hook); + } + + registerBeforeRequestHook(hook: BeforeRequestHook) { + this.beforeRequestHooks.push(hook); + } + + registerAfterSuccessHook(hook: AfterSuccessHook) { + this.afterSuccessHooks.push(hook); + } + + registerAfterErrorHook(hook: AfterErrorHook) { + this.afterErrorHooks.push(hook); + } + + sdkInit(opts: SDKOptions): SDKOptions { + return this.sdkInitHooks.reduce((opts, hook) => hook.sdkInit(opts), opts); + } + + beforeCreateRequest( + hookCtx: BeforeCreateRequestContext, + input: RequestInput, + ): RequestInput { + let inp = input; + + for (const hook of this.beforeCreateRequestHooks) { + inp = hook.beforeCreateRequest(hookCtx, inp); + } + + return inp; + } + + async beforeRequest( + hookCtx: BeforeRequestContext, + request: Request, + ): Promise { + let req = request; + + for (const hook of this.beforeRequestHooks) { + req = await hook.beforeRequest(hookCtx, req); + } + + return req; + } + + async afterSuccess( + hookCtx: AfterSuccessContext, + response: Response, + ): Promise { + let res = response; + + for (const hook of this.afterSuccessHooks) { + res = await hook.afterSuccess(hookCtx, res); + } + + return res; + } + + async afterError( + hookCtx: AfterErrorContext, + response: Response | null, + error: unknown, + ): Promise<{ response: Response | null; error: unknown }> { + let res = response; + let err = error; + + for (const hook of this.afterErrorHooks) { + const result = await hook.afterError(hookCtx, res, err); + res = result.response; + err = result.error; + } + + return { response: res, error: err }; + } +} diff --git a/src/hooks/index.ts b/src/hooks/index.ts new file mode 100644 index 0000000..f60ec7a --- /dev/null +++ b/src/hooks/index.ts @@ -0,0 +1,6 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export * from "./hooks.js"; +export * from "./types.js"; diff --git a/src/hooks/registration.ts b/src/hooks/registration.ts new file mode 100644 index 0000000..7064973 --- /dev/null +++ b/src/hooks/registration.ts @@ -0,0 +1,14 @@ +import { Hooks } from "./types.js"; + +/* + * This file is only ever generated once on the first generation and then is free to be modified. + * Any hooks you wish to add should be registered in the initHooks function. Feel free to define them + * in this file or in separate files in the hooks folder. + */ + +// @ts-expect-error remove this line when you add your first hook and hooks is used +export function initHooks(hooks: Hooks) { + // Add hooks by calling hooks.register{ClientInit/BeforeCreateRequest/BeforeRequest/AfterSuccess/AfterError}Hook + // with an instance of a hook that implements that specific Hook interface + // Hooks are registered per SDK instance, and are valid for the lifetime of the SDK instance +} diff --git a/src/hooks/types.ts b/src/hooks/types.ts new file mode 100644 index 0000000..9c36bf0 --- /dev/null +++ b/src/hooks/types.ts @@ -0,0 +1,107 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { SDKOptions } from "../lib/config.js"; +import { RequestInput } from "../lib/http.js"; +import { RetryConfig } from "../lib/retries.js"; +import { SecurityState } from "../lib/security.js"; + +export type HookContext = { + baseURL: string | URL; + operationID: string; + oAuth2Scopes: string[] | null; + securitySource?: any | (() => Promise); + retryConfig: RetryConfig; + resolvedSecurity: SecurityState | null; + options: SDKOptions; +}; + +export type Awaitable = T | Promise; + +export type BeforeCreateRequestContext = HookContext & {}; +export type BeforeRequestContext = HookContext & {}; +export type AfterSuccessContext = HookContext & {}; +export type AfterErrorContext = HookContext & {}; + +/** + * SDKInitHook is called when the SDK is initializing. The + * hook can return a new baseURL and HTTP client to be used by the SDK. + */ +export interface SDKInitHook { + sdkInit: (opts: SDKOptions) => SDKOptions; +} + +export interface BeforeCreateRequestHook { + /** + * A hook that is called before the SDK creates a `Request` object. The hook + * can modify how a request is constructed since certain modifications, like + * changing the request URL, cannot be done on a request object directly. + */ + beforeCreateRequest: ( + hookCtx: BeforeCreateRequestContext, + input: RequestInput, + ) => RequestInput; +} + +export interface BeforeRequestHook { + /** + * A hook that is called before the SDK sends a request. The hook can + * introduce instrumentation code such as logging, tracing and metrics or + * replace the request before it is sent or throw an error to stop the + * request from being sent. + */ + beforeRequest: ( + hookCtx: BeforeRequestContext, + request: Request, + ) => Awaitable; +} + +export interface AfterSuccessHook { + /** + * A hook that is called after the SDK receives a response. The hook can + * introduce instrumentation code such as logging, tracing and metrics or + * modify the response before it is handled or throw an error to stop the + * response from being handled. + */ + afterSuccess: ( + hookCtx: AfterSuccessContext, + response: Response, + ) => Awaitable; +} + +export interface AfterErrorHook { + /** + * A hook that is called after the SDK encounters an error, or a + * non-successful response. The hook can introduce instrumentation code such + * as logging, tracing and metrics or modify the response or error values. + */ + afterError: ( + hookCtx: AfterErrorContext, + response: Response | null, + error: unknown, + ) => Awaitable<{ + response: Response | null; + error: unknown; + }>; +} + +export interface Hooks { + /** Registers a hook to be used by the SDK for initialization event. */ + registerSDKInitHook(hook: SDKInitHook): void; + /** Registers a hook to be used by the SDK for to modify `Request` construction. */ + registerBeforeCreateRequestHook(hook: BeforeCreateRequestHook): void; + /** Registers a hook to be used by the SDK for the before request event. */ + registerBeforeRequestHook(hook: BeforeRequestHook): void; + /** Registers a hook to be used by the SDK for the after success event. */ + registerAfterSuccessHook(hook: AfterSuccessHook): void; + /** Registers a hook to be used by the SDK for the after error event. */ + registerAfterErrorHook(hook: AfterErrorHook): void; +} + +export type Hook = + | SDKInitHook + | BeforeCreateRequestHook + | BeforeRequestHook + | AfterSuccessHook + | AfterErrorHook; diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..dbcba16 --- /dev/null +++ b/src/index.ts @@ -0,0 +1,9 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export * from "./lib/config.js"; +export * as files from "./lib/files.js"; +export { HTTPClient } from "./lib/http.js"; +export type { Fetcher, HTTPClientOptions } from "./lib/http.js"; +export * from "./sdk/sdk.js"; diff --git a/src/lib/base64.ts b/src/lib/base64.ts new file mode 100644 index 0000000..c2d5b38 --- /dev/null +++ b/src/lib/base64.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export function bytesToBase64(u8arr: Uint8Array): string { + return btoa(String.fromCodePoint(...u8arr)); +} + +export function bytesFromBase64(encoded: string): Uint8Array { + return Uint8Array.from(atob(encoded), (c) => c.charCodeAt(0)); +} + +export function stringToBytes(str: string): Uint8Array { + return new TextEncoder().encode(str); +} + +export function stringFromBytes(u8arr: Uint8Array): string { + return new TextDecoder().decode(u8arr); +} + +export function stringToBase64(str: string): string { + return bytesToBase64(stringToBytes(str)); +} + +export function stringFromBase64(b64str: string): string { + return stringFromBytes(bytesFromBase64(b64str)); +} + +export const zodOutbound = z + .instanceof(Uint8Array) + .or(z.string().transform(stringToBytes)); + +export const zodInbound = z + .instanceof(Uint8Array) + .or(z.string().transform(bytesFromBase64)); diff --git a/src/lib/config.ts b/src/lib/config.ts new file mode 100644 index 0000000..c8bd82a --- /dev/null +++ b/src/lib/config.ts @@ -0,0 +1,64 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { HTTPClient } from "./http.js"; +import { Logger } from "./logger.js"; +import { RetryConfig } from "./retries.js"; +import { Params, pathToFunc } from "./url.js"; + +/** + * Contains the list of servers available to the SDK + */ +export const ServerList = [ + "http://your-dokploy-instance.com/api", +] as const; + +export type SDKOptions = { + authorization?: string | (() => Promise) | undefined; + + httpClient?: HTTPClient; + /** + * Allows overriding the default server used by the SDK + */ + serverIdx?: number | undefined; + /** + * Allows overriding the default server URL used by the SDK + */ + serverURL?: string | undefined; + /** + * Allows overriding the default user agent used by the SDK + */ + userAgent?: string | undefined; + /** + * Allows overriding the default retry config used by the SDK + */ + retryConfig?: RetryConfig; + timeoutMs?: number; + debugLogger?: Logger; +}; + +export function serverURLFromOptions(options: SDKOptions): URL | null { + let serverURL = options.serverURL; + + const params: Params = {}; + + if (!serverURL) { + const serverIdx = options.serverIdx ?? 0; + if (serverIdx < 0 || serverIdx >= ServerList.length) { + throw new Error(`Invalid server index ${serverIdx}`); + } + serverURL = ServerList[serverIdx] || ""; + } + + const u = pathToFunc(serverURL)(params); + return new URL(u); +} + +export const SDK_METADATA = { + language: "typescript", + openapiDocVersion: "1.0.0", + sdkVersion: "0.1.2", + genVersion: "2.716.10", + userAgent: "speakeasy-sdk/typescript 0.1.2 2.716.10 1.0.0 dokploy", +} as const; diff --git a/src/lib/dlv.ts b/src/lib/dlv.ts new file mode 100644 index 0000000..e81091f --- /dev/null +++ b/src/lib/dlv.ts @@ -0,0 +1,53 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +/* +MIT License + +Copyright (c) 2024 Jason Miller (http://jasonformat.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +/** + * @param obj The object to walk + * @param key The key path to walk the object with + * @param def A default value to return if the result is undefined + * + * @example + * dlv(obj, "a.b.c.d") + * @example + * dlv(object, ["a", "b", "c", "d"]) + * @example + * dlv(object, "foo.bar.baz", "Hello, default value!") + */ +export function dlv( + obj: any, + key: string | string[], + def?: T, + p?: number, + undef?: never, +): T | undefined { + key = Array.isArray(key) ? key : key.split("."); + for (p = 0; p < key.length; p++) { + const k = key[p]; + obj = k != null && obj ? obj[k] : undef; + } + return obj === undef ? def : obj; +} diff --git a/src/lib/encodings.ts b/src/lib/encodings.ts new file mode 100644 index 0000000..25c9dcb --- /dev/null +++ b/src/lib/encodings.ts @@ -0,0 +1,483 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { bytesToBase64 } from "./base64.js"; +import { isPlainObject } from "./is-plain-object.js"; + +export class EncodingError extends Error { + constructor(message: string) { + super(message); + this.name = "EncodingError"; + } +} + +export function encodeMatrix( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, +): string | undefined { + let out = ""; + const pairs: [string, unknown][] = options?.explode + ? explode(key, value) + : [[key, value]]; + + if (pairs.every(([_, v]) => v == null)) { + return; + } + + const encodeString = (v: string) => { + return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; + }; + const encodeValue = (v: unknown) => encodeString(serializeValue(v)); + + pairs.forEach(([pk, pv]) => { + let tmp = ""; + let encValue: string | null | undefined = null; + + if (pv == null) { + return; + } else if (Array.isArray(pv)) { + encValue = mapDefined(pv, (v) => `${encodeValue(v)}`)?.join(","); + } else if (isPlainObject(pv)) { + const mapped = mapDefinedEntries(Object.entries(pv), ([k, v]) => { + return `,${encodeString(k)},${encodeValue(v)}`; + }); + encValue = mapped?.join("").slice(1); + } else { + encValue = `${encodeValue(pv)}`; + } + + if (encValue == null) { + return; + } + + const keyPrefix = encodeString(pk); + tmp = `${keyPrefix}=${encValue}`; + // trim trailing '=' if value was empty + if (tmp === `${keyPrefix}=`) { + tmp = tmp.slice(0, -1); + } + + // If we end up with the nothing then skip forward + if (!tmp) { + return; + } + + out += `;${tmp}`; + }); + + return out; +} + +export function encodeLabel( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, +): string | undefined { + let out = ""; + const pairs: [string, unknown][] = options?.explode + ? explode(key, value) + : [[key, value]]; + + if (pairs.every(([_, v]) => v == null)) { + return; + } + + const encodeString = (v: string) => { + return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; + }; + const encodeValue = (v: unknown) => encodeString(serializeValue(v)); + + pairs.forEach(([pk, pv]) => { + let encValue: string | null | undefined = ""; + + if (pv == null) { + return; + } else if (Array.isArray(pv)) { + encValue = mapDefined(pv, (v) => `${encodeValue(v)}`)?.join("."); + } else if (isPlainObject(pv)) { + const mapped = mapDefinedEntries(Object.entries(pv), ([k, v]) => { + return `.${encodeString(k)}.${encodeValue(v)}`; + }); + encValue = mapped?.join("").slice(1); + } else { + const k = + options?.explode && isPlainObject(value) ? `${encodeString(pk)}=` : ""; + encValue = `${k}${encodeValue(pv)}`; + } + + out += encValue == null ? "" : `.${encValue}`; + }); + + return out; +} + +type FormEncoder = ( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, +) => string | undefined; + +function formEncoder(sep: string): FormEncoder { + return ( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, + ) => { + let out = ""; + const pairs: [string, unknown][] = options?.explode + ? explode(key, value) + : [[key, value]]; + + if (pairs.every(([_, v]) => v == null)) { + return; + } + + const encodeString = (v: string) => { + return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; + }; + + const encodeValue = (v: unknown) => encodeString(serializeValue(v)); + + const encodedSep = encodeString(sep); + + pairs.forEach(([pk, pv]) => { + let tmp = ""; + let encValue: string | null | undefined = null; + + if (pv == null) { + return; + } else if (Array.isArray(pv)) { + encValue = mapDefined(pv, (v) => `${encodeValue(v)}`)?.join(encodedSep); + } else if (isPlainObject(pv)) { + encValue = mapDefinedEntries(Object.entries(pv), ([k, v]) => { + return `${encodeString(k)}${encodedSep}${encodeValue(v)}`; + })?.join(encodedSep); + } else { + encValue = `${encodeValue(pv)}`; + } + + if (encValue == null) { + return; + } + + tmp = `${encodeString(pk)}=${encValue}`; + + // If we end up with the nothing then skip forward + if (!tmp || tmp === "=") { + return; + } + + out += `&${tmp}`; + }); + + return out.slice(1); + }; +} + +export const encodeForm = formEncoder(","); +export const encodeSpaceDelimited = formEncoder(" "); +export const encodePipeDelimited = formEncoder("|"); + +export function encodeBodyForm( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, +): string { + let out = ""; + const pairs: [string, unknown][] = options?.explode + ? explode(key, value) + : [[key, value]]; + + const encodeString = (v: string) => { + return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; + }; + + const encodeValue = (v: unknown) => encodeString(serializeValue(v)); + + pairs.forEach(([pk, pv]) => { + let tmp = ""; + let encValue = ""; + + if (pv == null) { + return; + } else if (Array.isArray(pv)) { + encValue = JSON.stringify(pv, jsonReplacer); + } else if (isPlainObject(pv)) { + encValue = JSON.stringify(pv, jsonReplacer); + } else { + encValue = `${encodeValue(pv)}`; + } + + tmp = `${encodeString(pk)}=${encValue}`; + + // If we end up with the nothing then skip forward + if (!tmp || tmp === "=") { + return; + } + + out += `&${tmp}`; + }); + + return out.slice(1); +} + +export function encodeDeepObject( + key: string, + value: unknown, + options?: { charEncoding?: "percent" | "none" }, +): string | undefined { + if (value == null) { + return; + } + + if (!isPlainObject(value)) { + throw new EncodingError( + `Value of parameter '${key}' which uses deepObject encoding must be an object or null`, + ); + } + + return encodeDeepObjectObject(key, value, options); +} + +export function encodeDeepObjectObject( + key: string, + value: unknown, + options?: { charEncoding?: "percent" | "none" }, +): string | undefined { + if (value == null) { + return; + } + + let out = ""; + + const encodeString = (v: string) => { + return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; + }; + + if (!isPlainObject(value)) { + throw new EncodingError(`Expected parameter '${key}' to be an object.`); + } + + Object.entries(value).forEach(([ck, cv]) => { + if (cv == null) { + return; + } + + const pk = `${key}[${ck}]`; + + if (isPlainObject(cv)) { + const objOut = encodeDeepObjectObject(pk, cv, options); + + out += objOut == null ? "" : `&${objOut}`; + + return; + } + + const pairs: unknown[] = Array.isArray(cv) ? cv : [cv]; + const encoded = mapDefined(pairs, (v) => { + return `${encodeString(pk)}=${encodeString(serializeValue(v))}`; + })?.join("&"); + + out += encoded == null ? "" : `&${encoded}`; + }); + + return out.slice(1); +} + +export function encodeJSON( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, +): string | undefined { + if (typeof value === "undefined") { + return; + } + + const encodeString = (v: string) => { + return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; + }; + + const encVal = encodeString(JSON.stringify(value, jsonReplacer)); + + return options?.explode ? encVal : `${encodeString(key)}=${encVal}`; +} + +export const encodeSimple = ( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, +): string | undefined => { + let out = ""; + const pairs: [string, unknown][] = options?.explode + ? explode(key, value) + : [[key, value]]; + + if (pairs.every(([_, v]) => v == null)) { + return; + } + + const encodeString = (v: string) => { + return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; + }; + const encodeValue = (v: unknown) => encodeString(serializeValue(v)); + + pairs.forEach(([pk, pv]) => { + let tmp: string | null | undefined = ""; + + if (pv == null) { + return; + } else if (Array.isArray(pv)) { + tmp = mapDefined(pv, (v) => `${encodeValue(v)}`)?.join(","); + } else if (isPlainObject(pv)) { + const mapped = mapDefinedEntries(Object.entries(pv), ([k, v]) => { + return `,${encodeString(k)},${encodeValue(v)}`; + }); + tmp = mapped?.join("").slice(1); + } else { + const k = options?.explode && isPlainObject(value) ? `${pk}=` : ""; + tmp = `${k}${encodeValue(pv)}`; + } + + out += tmp ? `,${tmp}` : ""; + }); + + return out.slice(1); +}; + +function explode(key: string, value: unknown): [string, unknown][] { + if (Array.isArray(value)) { + return value.map((v) => [key, v]); + } else if (isPlainObject(value)) { + const o = value ?? {}; + return Object.entries(o).map(([k, v]) => [k, v]); + } else { + return [[key, value]]; + } +} + +function serializeValue(value: unknown): string { + if (value == null) { + return ""; + } else if (value instanceof Date) { + return value.toISOString(); + } else if (value instanceof Uint8Array) { + return bytesToBase64(value); + } else if (typeof value === "object") { + return JSON.stringify(value, jsonReplacer); + } + + return `${value}`; +} + +function jsonReplacer(_: string, value: unknown): unknown { + if (value instanceof Uint8Array) { + return bytesToBase64(value); + } else { + return value; + } +} + +function mapDefined(inp: T[], mapper: (v: T) => R): R[] | null { + const res = inp.reduce((acc, v) => { + if (v == null) { + return acc; + } + + const m = mapper(v); + if (m == null) { + return acc; + } + + acc.push(m); + + return acc; + }, []); + + return res.length ? res : null; +} + +function mapDefinedEntries( + inp: Iterable<[K, V]>, + mapper: (v: [K, V]) => R, +): R[] | null { + const acc: R[] = []; + for (const [k, v] of inp) { + if (v == null) { + continue; + } + + const m = mapper([k, v]); + if (m == null) { + continue; + } + + acc.push(m); + } + + return acc.length ? acc : null; +} + +export function queryJoin(...args: (string | undefined)[]): string { + return args.filter(Boolean).join("&"); +} + +type QueryEncoderOptions = { + explode?: boolean; + charEncoding?: "percent" | "none"; +}; + +type QueryEncoder = ( + key: string, + value: unknown, + options?: QueryEncoderOptions, +) => string | undefined; + +type BulkQueryEncoder = ( + values: Record, + options?: QueryEncoderOptions, +) => string; + +export function queryEncoder(f: QueryEncoder): BulkQueryEncoder { + const bulkEncode = function ( + values: Record, + options?: QueryEncoderOptions, + ): string { + const opts: QueryEncoderOptions = { + ...options, + explode: options?.explode ?? true, + charEncoding: options?.charEncoding ?? "percent", + }; + + const encoded = Object.entries(values).map(([key, value]) => { + return f(key, value, opts); + }); + return queryJoin(...encoded); + }; + + return bulkEncode; +} + +export const encodeJSONQuery = queryEncoder(encodeJSON); +export const encodeFormQuery = queryEncoder(encodeForm); +export const encodeSpaceDelimitedQuery = queryEncoder(encodeSpaceDelimited); +export const encodePipeDelimitedQuery = queryEncoder(encodePipeDelimited); +export const encodeDeepObjectQuery = queryEncoder(encodeDeepObject); + +export function appendForm( + fd: FormData, + key: string, + value: unknown, + fileName?: string, +): void { + if (value == null) { + return; + } else if (value instanceof Blob && fileName) { + fd.append(key, value, fileName); + } else if (value instanceof Blob) { + fd.append(key, value); + } else { + fd.append(key, String(value)); + } +} diff --git a/src/lib/env.ts b/src/lib/env.ts new file mode 100644 index 0000000..be4d5ec --- /dev/null +++ b/src/lib/env.ts @@ -0,0 +1,41 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { dlv } from "./dlv.js"; + +import * as z from "zod"; + +export interface Env { + DOKPLOY_AUTHORIZATION?: string | undefined; + + DOKPLOY_DEBUG?: boolean | undefined; +} + +export const envSchema: z.ZodType = z.object({ + DOKPLOY_AUTHORIZATION: z.string().optional(), + + DOKPLOY_DEBUG: z.coerce.boolean().optional(), +}); + +let envMemo: Env | undefined = undefined; +/** + * Reads and validates environment variables. + */ +export function env(): Env { + if (envMemo) { + return envMemo; + } + + envMemo = envSchema.parse( + dlv(globalThis, "process.env") ?? dlv(globalThis, "Deno.env") ?? {}, + ); + return envMemo; +} + +/** + * Clears the cached env object. Useful for testing with a fresh environment. + */ +export function resetEnv() { + envMemo = undefined; +} diff --git a/src/lib/files.ts b/src/lib/files.ts new file mode 100644 index 0000000..0344cd0 --- /dev/null +++ b/src/lib/files.ts @@ -0,0 +1,82 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +/** + * Consumes a stream and returns a concatenated array buffer. Useful in + * situations where we need to read the whole file because it forms part of a + * larger payload containing other fields, and we can't modify the underlying + * request structure. + */ +export async function readableStreamToArrayBuffer( + readable: ReadableStream, +): Promise { + const reader = readable.getReader(); + const chunks: Uint8Array[] = []; + + let totalLength = 0; + let done = false; + + while (!done) { + const { value, done: doneReading } = await reader.read(); + + if (doneReading) { + done = true; + } else { + chunks.push(value); + totalLength += value.length; + } + } + + const concatenatedChunks = new Uint8Array(totalLength); + let offset = 0; + + for (const chunk of chunks) { + concatenatedChunks.set(chunk, offset); + offset += chunk.length; + } + + return concatenatedChunks.buffer as ArrayBuffer; +} + +/** + * Determines the MIME content type based on a file's extension. + * Returns null if the extension is not recognized. + */ +export function getContentTypeFromFileName(fileName: string): string | null { + if (!fileName) return null; + + const ext = fileName.toLowerCase().split(".").pop(); + if (!ext) return null; + + const mimeTypes: Record = { + json: "application/json", + xml: "application/xml", + html: "text/html", + htm: "text/html", + txt: "text/plain", + csv: "text/csv", + pdf: "application/pdf", + png: "image/png", + jpg: "image/jpeg", + jpeg: "image/jpeg", + gif: "image/gif", + svg: "image/svg+xml", + js: "application/javascript", + css: "text/css", + zip: "application/zip", + tar: "application/x-tar", + gz: "application/gzip", + mp4: "video/mp4", + mp3: "audio/mpeg", + wav: "audio/wav", + webp: "image/webp", + ico: "image/x-icon", + woff: "font/woff", + woff2: "font/woff2", + ttf: "font/ttf", + otf: "font/otf", + }; + + return mimeTypes[ext] || null; +} diff --git a/src/lib/http.ts b/src/lib/http.ts new file mode 100644 index 0000000..13cf1fd --- /dev/null +++ b/src/lib/http.ts @@ -0,0 +1,323 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export type Fetcher = ( + input: RequestInfo | URL, + init?: RequestInit, +) => Promise; + +export type Awaitable = T | Promise; + +const DEFAULT_FETCHER: Fetcher = (input, init) => { + // If input is a Request and init is undefined, Bun will discard the method, + // headers, body and other options that were set on the request object. + // Node.js and browers would ignore an undefined init value. This check is + // therefore needed for interop with Bun. + if (init == null) { + return fetch(input); + } else { + return fetch(input, init); + } +}; + +export type RequestInput = { + /** + * The URL the request will use. + */ + url: URL; + /** + * Options used to create a [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request). + */ + options?: RequestInit | undefined; +}; + +export interface HTTPClientOptions { + fetcher?: Fetcher; +} + +export type BeforeRequestHook = (req: Request) => Awaitable; +export type RequestErrorHook = (err: unknown, req: Request) => Awaitable; +export type ResponseHook = (res: Response, req: Request) => Awaitable; + +export class HTTPClient { + private fetcher: Fetcher; + private requestHooks: BeforeRequestHook[] = []; + private requestErrorHooks: RequestErrorHook[] = []; + private responseHooks: ResponseHook[] = []; + + constructor(private options: HTTPClientOptions = {}) { + this.fetcher = options.fetcher || DEFAULT_FETCHER; + } + + async request(request: Request): Promise { + let req = request; + for (const hook of this.requestHooks) { + const nextRequest = await hook(req); + if (nextRequest) { + req = nextRequest; + } + } + + try { + const res = await this.fetcher(req); + + for (const hook of this.responseHooks) { + await hook(res, req); + } + + return res; + } catch (err) { + for (const hook of this.requestErrorHooks) { + await hook(err, req); + } + + throw err; + } + } + + /** + * Registers a hook that is called before a request is made. The hook function + * can mutate the request or return a new request. This may be useful to add + * additional information to request such as request IDs and tracing headers. + */ + addHook(hook: "beforeRequest", fn: BeforeRequestHook): this; + /** + * Registers a hook that is called when a request cannot be made due to a + * network error. + */ + addHook(hook: "requestError", fn: RequestErrorHook): this; + /** + * Registers a hook that is called when a response has been received from the + * server. + */ + addHook(hook: "response", fn: ResponseHook): this; + addHook( + ...args: + | [hook: "beforeRequest", fn: BeforeRequestHook] + | [hook: "requestError", fn: RequestErrorHook] + | [hook: "response", fn: ResponseHook] + ) { + if (args[0] === "beforeRequest") { + this.requestHooks.push(args[1]); + } else if (args[0] === "requestError") { + this.requestErrorHooks.push(args[1]); + } else if (args[0] === "response") { + this.responseHooks.push(args[1]); + } else { + throw new Error(`Invalid hook type: ${args[0]}`); + } + return this; + } + + /** Removes a hook that was previously registered with `addHook`. */ + removeHook(hook: "beforeRequest", fn: BeforeRequestHook): this; + /** Removes a hook that was previously registered with `addHook`. */ + removeHook(hook: "requestError", fn: RequestErrorHook): this; + /** Removes a hook that was previously registered with `addHook`. */ + removeHook(hook: "response", fn: ResponseHook): this; + removeHook( + ...args: + | [hook: "beforeRequest", fn: BeforeRequestHook] + | [hook: "requestError", fn: RequestErrorHook] + | [hook: "response", fn: ResponseHook] + ): this { + let target: unknown[]; + if (args[0] === "beforeRequest") { + target = this.requestHooks; + } else if (args[0] === "requestError") { + target = this.requestErrorHooks; + } else if (args[0] === "response") { + target = this.responseHooks; + } else { + throw new Error(`Invalid hook type: ${args[0]}`); + } + + const index = target.findIndex((v) => v === args[1]); + if (index >= 0) { + target.splice(index, 1); + } + + return this; + } + + clone(): HTTPClient { + const child = new HTTPClient(this.options); + child.requestHooks = this.requestHooks.slice(); + child.requestErrorHooks = this.requestErrorHooks.slice(); + child.responseHooks = this.responseHooks.slice(); + + return child; + } +} + +export type StatusCodePredicate = number | string | (number | string)[]; + +// A semicolon surrounded by optional whitespace characters is used to separate +// segments in a media type string. +const mediaParamSeparator = /\s*;\s*/g; + +export function matchContentType(response: Response, pattern: string): boolean { + // `*` is a special case which means anything is acceptable. + if (pattern === "*") { + return true; + } + + let contentType = + response.headers.get("content-type")?.trim() || "application/octet-stream"; + contentType = contentType.toLowerCase(); + + const wantParts = pattern.toLowerCase().trim().split(mediaParamSeparator); + const [wantType = "", ...wantParams] = wantParts; + + if (wantType.split("/").length !== 2) { + return false; + } + + const gotParts = contentType.split(mediaParamSeparator); + const [gotType = "", ...gotParams] = gotParts; + + const [type = "", subtype = ""] = gotType.split("/"); + if (!type || !subtype) { + return false; + } + + if ( + wantType !== "*/*" && + gotType !== wantType && + `${type}/*` !== wantType && + `*/${subtype}` !== wantType + ) { + return false; + } + + if (gotParams.length < wantParams.length) { + return false; + } + + const params = new Set(gotParams); + for (const wantParam of wantParams) { + if (!params.has(wantParam)) { + return false; + } + } + + return true; +} + +const codeRangeRE = new RegExp("^[0-9]xx$", "i"); + +export function matchStatusCode( + response: Response, + codes: StatusCodePredicate, +): boolean { + const actual = `${response.status}`; + const expectedCodes = Array.isArray(codes) ? codes : [codes]; + if (!expectedCodes.length) { + return false; + } + + return expectedCodes.some((ec) => { + const code = `${ec}`; + + if (code === "default") { + return true; + } + + if (!codeRangeRE.test(`${code}`)) { + return code === actual; + } + + const expectFamily = code.charAt(0); + if (!expectFamily) { + throw new Error("Invalid status code range"); + } + + const actualFamily = actual.charAt(0); + if (!actualFamily) { + throw new Error(`Invalid response status code: ${actual}`); + } + + return actualFamily === expectFamily; + }); +} + +export function matchResponse( + response: Response, + code: StatusCodePredicate, + contentTypePattern: string, +): boolean { + return ( + matchStatusCode(response, code) && + matchContentType(response, contentTypePattern) + ); +} + +/** + * Uses various heurisitics to determine if an error is a connection error. + */ +export function isConnectionError(err: unknown): boolean { + if (typeof err !== "object" || err == null) { + return false; + } + + // Covers fetch in Deno as well + const isBrowserErr = + err instanceof TypeError && + err.message.toLowerCase().startsWith("failed to fetch"); + + const isNodeErr = + err instanceof TypeError && + err.message.toLowerCase().startsWith("fetch failed"); + + const isBunErr = "name" in err && err.name === "ConnectionError"; + + const isGenericErr = + "code" in err && + typeof err.code === "string" && + err.code.toLowerCase() === "econnreset"; + + return isBrowserErr || isNodeErr || isGenericErr || isBunErr; +} + +/** + * Uses various heurisitics to determine if an error is a timeout error. + */ +export function isTimeoutError(err: unknown): boolean { + if (typeof err !== "object" || err == null) { + return false; + } + + // Fetch in browser, Node.js, Bun, Deno + const isNative = "name" in err && err.name === "TimeoutError"; + const isLegacyNative = "code" in err && err.code === 23; + + // Node.js HTTP client and Axios + const isGenericErr = + "code" in err && + typeof err.code === "string" && + err.code.toLowerCase() === "econnaborted"; + + return isNative || isLegacyNative || isGenericErr; +} + +/** + * Uses various heurisitics to determine if an error is a abort error. + */ +export function isAbortError(err: unknown): boolean { + if (typeof err !== "object" || err == null) { + return false; + } + + // Fetch in browser, Node.js, Bun, Deno + const isNative = "name" in err && err.name === "AbortError"; + const isLegacyNative = "code" in err && err.code === 20; + + // Node.js HTTP client and Axios + const isGenericErr = + "code" in err && + typeof err.code === "string" && + err.code.toLowerCase() === "econnaborted"; + + return isNative || isLegacyNative || isGenericErr; +} diff --git a/src/lib/is-plain-object.ts b/src/lib/is-plain-object.ts new file mode 100644 index 0000000..61070d3 --- /dev/null +++ b/src/lib/is-plain-object.ts @@ -0,0 +1,43 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +/* +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +// Taken from https://github.com/sindresorhus/is-plain-obj/blob/97f38e8836f86a642cce98fc6ab3058bc36df181/index.js + +export function isPlainObject(value: unknown): value is object { + if (typeof value !== "object" || value === null) { + return false; + } + + const prototype = Object.getPrototypeOf(value); + return ( + (prototype === null || + prototype === Object.prototype || + Object.getPrototypeOf(prototype) === null) && + !(Symbol.toStringTag in value) && + !(Symbol.iterator in value) + ); +} diff --git a/src/lib/logger.ts b/src/lib/logger.ts new file mode 100644 index 0000000..d181f29 --- /dev/null +++ b/src/lib/logger.ts @@ -0,0 +1,9 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export interface Logger { + group(label?: string): void; + groupEnd(): void; + log(message: any, ...args: any[]): void; +} diff --git a/src/lib/matchers.ts b/src/lib/matchers.ts new file mode 100644 index 0000000..02891bc --- /dev/null +++ b/src/lib/matchers.ts @@ -0,0 +1,352 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployDefaultError } from "../models/errors/dokploydefaulterror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { ERR, OK, Result } from "../types/fp.js"; +import { matchResponse, matchStatusCode, StatusCodePredicate } from "./http.js"; +import { isPlainObject } from "./is-plain-object.js"; + +export type Encoding = + | "jsonl" + | "json" + | "text" + | "bytes" + | "stream" + | "sse" + | "nil" + | "fail"; + +const DEFAULT_CONTENT_TYPES: Record = { + jsonl: "application/jsonl", + json: "application/json", + text: "text/plain", + bytes: "application/octet-stream", + stream: "application/octet-stream", + sse: "text/event-stream", + nil: "*", + fail: "*", +}; + +type Schema = { parse(raw: unknown): T }; + +type MatchOptions = { + ctype?: string; + hdrs?: boolean; + key?: string; + sseSentinel?: string; +}; + +export type ValueMatcher = MatchOptions & { + enc: Encoding; + codes: StatusCodePredicate; + schema: Schema; +}; + +export type ErrorMatcher = MatchOptions & { + enc: Encoding; + codes: StatusCodePredicate; + schema: Schema; + err: true; +}; + +export type FailMatcher = { + enc: "fail"; + codes: StatusCodePredicate; +}; + +export type Matcher = ValueMatcher | ErrorMatcher | FailMatcher; + +export function jsonErr( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ErrorMatcher { + return { ...options, err: true, enc: "json", codes, schema }; +} +export function json( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ValueMatcher { + return { ...options, enc: "json", codes, schema }; +} + +export function jsonl( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ValueMatcher { + return { ...options, enc: "jsonl", codes, schema }; +} + +export function jsonlErr( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ErrorMatcher { + return { ...options, err: true, enc: "jsonl", codes, schema }; +} +export function textErr( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ErrorMatcher { + return { ...options, err: true, enc: "text", codes, schema }; +} +export function text( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ValueMatcher { + return { ...options, enc: "text", codes, schema }; +} + +export function bytesErr( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ErrorMatcher { + return { ...options, err: true, enc: "bytes", codes, schema }; +} +export function bytes( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ValueMatcher { + return { ...options, enc: "bytes", codes, schema }; +} + +export function streamErr( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ErrorMatcher { + return { ...options, err: true, enc: "stream", codes, schema }; +} +export function stream( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ValueMatcher { + return { ...options, enc: "stream", codes, schema }; +} + +export function sseErr( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ErrorMatcher { + return { ...options, err: true, enc: "sse", codes, schema }; +} +export function sse( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ValueMatcher { + return { ...options, enc: "sse", codes, schema }; +} + +export function nilErr( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ErrorMatcher { + return { ...options, err: true, enc: "nil", codes, schema }; +} +export function nil( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ValueMatcher { + return { ...options, enc: "nil", codes, schema }; +} + +export function fail(codes: StatusCodePredicate): FailMatcher { + return { enc: "fail", codes }; +} + +export type MatchedValue = Matchers extends Matcher[] + ? T + : never; +export type MatchedError = Matchers extends Matcher[] + ? E + : never; +export type MatchFunc = ( + response: Response, + request: Request, + options?: { resultKey?: string; extraFields?: Record }, +) => Promise<[result: Result, raw: unknown]>; + +export function match( + ...matchers: Array> +): MatchFunc { + return async function matchFunc( + response: Response, + request: Request, + options?: { resultKey?: string; extraFields?: Record }, + ): Promise< + [ + result: Result, + raw: unknown, + ] + > { + let raw: unknown; + let matcher: Matcher | undefined; + for (const match of matchers) { + const { codes } = match; + const ctpattern = "ctype" in match + ? match.ctype + : DEFAULT_CONTENT_TYPES[match.enc]; + if (ctpattern && matchResponse(response, codes, ctpattern)) { + matcher = match; + break; + } else if (!ctpattern && matchStatusCode(response, codes)) { + matcher = match; + break; + } + } + + if (!matcher) { + return [{ + ok: false, + error: new DokployDefaultError("Unexpected Status or Content-Type", { + response, + request, + body: await response.text().catch(() => ""), + }), + }, raw]; + } + + const encoding = matcher.enc; + let body = ""; + switch (encoding) { + case "json": + body = await response.text(); + raw = JSON.parse(body); + break; + case "jsonl": + raw = response.body; + break; + case "bytes": + raw = new Uint8Array(await response.arrayBuffer()); + break; + case "stream": + raw = response.body; + break; + case "text": + body = await response.text(); + raw = body; + break; + case "sse": + raw = response.body; + break; + case "nil": + body = await response.text(); + raw = undefined; + break; + case "fail": + body = await response.text(); + raw = body; + break; + default: + encoding satisfies never; + throw new Error(`Unsupported response type: ${encoding}`); + } + + if (matcher.enc === "fail") { + return [{ + ok: false, + error: new DokployDefaultError("API error occurred", { + request, + response, + body, + }), + }, raw]; + } + + const resultKey = matcher.key || options?.resultKey; + let data: unknown; + + if ("err" in matcher) { + data = { + ...options?.extraFields, + ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), + ...(isPlainObject(raw) ? raw : null), + request$: request, + response$: response, + body$: body, + }; + } else if (resultKey) { + data = { + ...options?.extraFields, + ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), + [resultKey]: raw, + }; + } else if (matcher.hdrs) { + data = { + ...options?.extraFields, + ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), + ...(isPlainObject(raw) ? raw : null), + }; + } else { + data = raw; + } + + if ("err" in matcher) { + const result = safeParseResponse( + data, + (v: unknown) => matcher.schema.parse(v), + "Response validation failed", + { request, response, body }, + ); + return [result.ok ? { ok: false, error: result.value } : result, raw]; + } else { + return [ + safeParseResponse( + data, + (v: unknown) => matcher.schema.parse(v), + "Response validation failed", + { request, response, body }, + ), + raw, + ]; + } + }; +} + +const headerValRE = /, */; +/** + * Iterates over a Headers object and returns an object with all the header + * entries. Values are represented as an array to account for repeated headers. + */ +export function unpackHeaders(headers: Headers): Record { + const out: Record = {}; + + for (const [k, v] of headers.entries()) { + out[k] = v.split(headerValRE); + } + + return out; +} + +function safeParseResponse( + rawValue: Inp, + fn: (value: Inp) => Out, + errorMessage: string, + httpMeta: { response: Response; request: Request; body: string }, +): Result { + try { + return OK(fn(rawValue)); + } catch (err) { + return ERR( + new ResponseValidationError(errorMessage, { + cause: err, + rawValue, + rawMessage: errorMessage, + ...httpMeta, + }), + ); + } +} diff --git a/src/lib/primitives.ts b/src/lib/primitives.ts new file mode 100644 index 0000000..d21f1dc --- /dev/null +++ b/src/lib/primitives.ts @@ -0,0 +1,150 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +class InvariantError extends Error { + constructor(message: string) { + super(message); + this.name = "InvariantError"; + } +} + +export function invariant( + condition: unknown, + message: string, +): asserts condition { + if (!condition) { + throw new InvariantError(message); + } +} + +export type ExactPartial = { + [P in keyof T]?: T[P] | undefined; +}; + +export type Remap = { + [k in keyof Inp as Mapping[k] extends string /* if we have a string mapping for this key then use it */ + ? Mapping[k] + : Mapping[k] extends null /* if the mapping is to `null` then drop the key */ + ? never + : k /* otherwise keep the key as-is */]: Inp[k]; +}; + +/** + * Converts or omits an object's keys according to a mapping. + * + * @param inp An object whose keys will be remapped + * @param mappings A mapping of original keys to new keys. If a key is not present in the mapping, it will be left as is. If a key is mapped to `null`, it will be removed in the resulting object. + * @returns A new object with keys remapped or omitted according to the mappings + */ +export function remap< + Inp extends Record, + const Mapping extends { [k in keyof Inp]?: string | null }, +>(inp: Inp, mappings: Mapping): Remap { + let out: any = {}; + + if (!Object.keys(mappings).length) { + out = inp; + return out; + } + + for (const [k, v] of Object.entries(inp)) { + const j = mappings[k]; + if (j === null) { + continue; + } + out[j ?? k] = v; + } + + return out; +} + +export function combineSignals( + ...signals: Array +): AbortSignal | null { + const filtered: AbortSignal[] = []; + for (const signal of signals) { + if (signal) { + filtered.push(signal); + } + } + + switch (filtered.length) { + case 0: + case 1: + return filtered[0] || null; + default: + if ("any" in AbortSignal && typeof AbortSignal.any === "function") { + return AbortSignal.any(filtered); + } + return abortSignalAny(filtered); + } +} + +export function abortSignalAny(signals: AbortSignal[]): AbortSignal { + const controller = new AbortController(); + const result = controller.signal; + if (!signals.length) { + return controller.signal; + } + + if (signals.length === 1) { + return signals[0] || controller.signal; + } + + for (const signal of signals) { + if (signal.aborted) { + return signal; + } + } + + function abort(this: AbortSignal) { + controller.abort(this.reason); + clean(); + } + + const signalRefs: WeakRef[] = []; + function clean() { + for (const signalRef of signalRefs) { + const signal = signalRef.deref(); + if (signal) { + signal.removeEventListener("abort", abort); + } + } + } + + for (const signal of signals) { + signalRefs.push(new WeakRef(signal)); + signal.addEventListener("abort", abort); + } + + return result; +} + +export function compactMap( + values: Record, +): Record { + const out: Record = {}; + + for (const [k, v] of Object.entries(values)) { + if (typeof v !== "undefined") { + out[k] = v; + } + } + + return out; +} + +export function allRequired>( + v: V, +): + | { + [K in keyof V]: NonNullable; + } + | undefined { + if (Object.values(v).every((x) => x == null)) { + return void 0; + } + + return v as ReturnType>; +} diff --git a/src/lib/retries.ts b/src/lib/retries.ts new file mode 100644 index 0000000..e3ce9ab --- /dev/null +++ b/src/lib/retries.ts @@ -0,0 +1,218 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { isConnectionError, isTimeoutError } from "./http.js"; + +export type BackoffStrategy = { + initialInterval: number; + maxInterval: number; + exponent: number; + maxElapsedTime: number; +}; + +const defaultBackoff: BackoffStrategy = { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, +}; + +export type RetryConfig = + | { strategy: "none" } + | { + strategy: "backoff"; + backoff?: BackoffStrategy; + retryConnectionErrors?: boolean; + }; + +/** + * PermanentError is an error that is not recoverable. Throwing this error will + * cause a retry loop to terminate. + */ +export class PermanentError extends Error { + /** The underlying cause of the error. */ + override readonly cause: unknown; + + constructor(message: string, options?: { cause?: unknown }) { + let msg = message; + if (options?.cause) { + msg += `: ${options.cause}`; + } + + super(msg, options); + this.name = "PermanentError"; + // In older runtimes, the cause field would not have been assigned through + // the super() call. + if (typeof this.cause === "undefined") { + this.cause = options?.cause; + } + + Object.setPrototypeOf(this, PermanentError.prototype); + } +} + +/** + * TemporaryError is an error is used to signal that an HTTP request can be + * retried as part of a retry loop. If retry attempts are exhausted and this + * error is thrown, the response will be returned to the caller. + */ +export class TemporaryError extends Error { + response: Response; + + constructor(message: string, response: Response) { + super(message); + this.response = response; + this.name = "TemporaryError"; + + Object.setPrototypeOf(this, TemporaryError.prototype); + } +} + +export async function retry( + fetchFn: () => Promise, + options: { + config: RetryConfig; + statusCodes: string[]; + }, +): Promise { + switch (options.config.strategy) { + case "backoff": + return retryBackoff( + wrapFetcher(fetchFn, { + statusCodes: options.statusCodes, + retryConnectionErrors: !!options.config.retryConnectionErrors, + }), + options.config.backoff ?? defaultBackoff, + ); + default: + return await fetchFn(); + } +} + +function wrapFetcher( + fn: () => Promise, + options: { + statusCodes: string[]; + retryConnectionErrors: boolean; + }, +): () => Promise { + return async () => { + try { + const res = await fn(); + if (isRetryableResponse(res, options.statusCodes)) { + throw new TemporaryError( + "Response failed with retryable status code", + res, + ); + } + + return res; + } catch (err: unknown) { + if (err instanceof TemporaryError) { + throw err; + } + + if ( + options.retryConnectionErrors && + (isTimeoutError(err) || isConnectionError(err)) + ) { + throw err; + } + + throw new PermanentError("Permanent error", { cause: err }); + } + }; +} + +const codeRangeRE = new RegExp("^[0-9]xx$", "i"); + +function isRetryableResponse(res: Response, statusCodes: string[]): boolean { + const actual = `${res.status}`; + + return statusCodes.some((code) => { + if (!codeRangeRE.test(code)) { + return code === actual; + } + + const expectFamily = code.charAt(0); + if (!expectFamily) { + throw new Error("Invalid status code range"); + } + + const actualFamily = actual.charAt(0); + if (!actualFamily) { + throw new Error(`Invalid response status code: ${actual}`); + } + + return actualFamily === expectFamily; + }); +} + +async function retryBackoff( + fn: () => Promise, + strategy: BackoffStrategy, +): Promise { + const { maxElapsedTime, initialInterval, exponent, maxInterval } = strategy; + + const start = Date.now(); + let x = 0; + + while (true) { + try { + const res = await fn(); + return res; + } catch (err: unknown) { + if (err instanceof PermanentError) { + throw err.cause; + } + const elapsed = Date.now() - start; + if (elapsed > maxElapsedTime) { + if (err instanceof TemporaryError) { + return err.response; + } + + throw err; + } + + let retryInterval = 0; + if (err instanceof TemporaryError) { + retryInterval = retryIntervalFromResponse(err.response); + } + + if (retryInterval <= 0) { + retryInterval = + initialInterval * Math.pow(x, exponent) + Math.random() * 1000; + } + + const d = Math.min(retryInterval, maxInterval); + + await delay(d); + x++; + } + } +} + +function retryIntervalFromResponse(res: Response): number { + const retryVal = res.headers.get("retry-after") || ""; + if (!retryVal) { + return 0; + } + + const parsedNumber = Number(retryVal); + if (Number.isInteger(parsedNumber)) { + return parsedNumber * 1000; + } + + const parsedDate = Date.parse(retryVal); + if (Number.isInteger(parsedDate)) { + const deltaMS = parsedDate - Date.now(); + return deltaMS > 0 ? Math.ceil(deltaMS) : 0; + } + + return 0; +} + +async function delay(delay: number): Promise { + return new Promise((resolve) => setTimeout(resolve, delay)); +} diff --git a/src/lib/schemas.ts b/src/lib/schemas.ts new file mode 100644 index 0000000..0e340b7 --- /dev/null +++ b/src/lib/schemas.ts @@ -0,0 +1,91 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { + output, + ZodEffects, + ZodError, + ZodObject, + ZodRawShape, + ZodTypeAny, +} from "zod"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { ERR, OK, Result } from "../types/fp.js"; + +/** + * Utility function that executes some code which may throw a ZodError. It + * intercepts this error and converts it to an SDKValidationError so as to not + * leak Zod implementation details to user code. + */ +export function parse( + rawValue: Inp, + fn: (value: Inp) => Out, + errorMessage: string, +): Out { + try { + return fn(rawValue); + } catch (err) { + if (err instanceof ZodError) { + throw new SDKValidationError(errorMessage, err, rawValue); + } + throw err; + } +} + +/** + * Utility function that executes some code which may result in a ZodError. It + * intercepts this error and converts it to an SDKValidationError so as to not + * leak Zod implementation details to user code. + */ +export function safeParse( + rawValue: Inp, + fn: (value: Inp) => Out, + errorMessage: string, +): Result { + try { + return OK(fn(rawValue)); + } catch (err) { + return ERR(new SDKValidationError(errorMessage, err, rawValue)); + } +} + +export function collectExtraKeys< + Shape extends ZodRawShape, + Catchall extends ZodTypeAny, + K extends string, +>( + obj: ZodObject, + extrasKey: K, + optional: boolean, +): ZodEffects< + typeof obj, + & output> + & { + [k in K]: Record>; + } +> { + return obj.transform((val) => { + const extras: Record> = {}; + const { shape } = obj; + for (const [key] of Object.entries(val)) { + if (key in shape) { + continue; + } + + const v = val[key]; + if (typeof v === "undefined") { + continue; + } + + extras[key] = v; + delete val[key]; + } + + if (optional && Object.keys(extras).length === 0) { + return val; + } + + return { ...val, [extrasKey]: extras }; + }); +} diff --git a/src/lib/sdks.ts b/src/lib/sdks.ts new file mode 100644 index 0000000..805b871 --- /dev/null +++ b/src/lib/sdks.ts @@ -0,0 +1,406 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { SDKHooks } from "../hooks/hooks.js"; +import { HookContext } from "../hooks/types.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ERR, OK, Result } from "../types/fp.js"; +import { stringToBase64 } from "./base64.js"; +import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "./config.js"; +import { encodeForm } from "./encodings.js"; +import { env } from "./env.js"; +import { + HTTPClient, + isAbortError, + isConnectionError, + isTimeoutError, + matchContentType, + matchStatusCode, +} from "./http.js"; +import { Logger } from "./logger.js"; +import { retry, RetryConfig } from "./retries.js"; +import { SecurityState } from "./security.js"; + +export type RequestOptions = { + /** + * Sets a timeout, in milliseconds, on HTTP requests made by an SDK method. If + * `fetchOptions.signal` is set then it will take precedence over this option. + */ + timeoutMs?: number; + /** + * Set or override a retry policy on HTTP calls. + */ + retries?: RetryConfig; + /** + * Specifies the status codes which should be retried using the given retry policy. + */ + retryCodes?: string[]; + /** + * Overrides the base server URL that will be used by an operation. + */ + serverURL?: string | URL; + /** + * @deprecated `fetchOptions` has been flattened into `RequestOptions`. + * + * Sets various request options on the `fetch` call made by an SDK method. + * + * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options|Request} + */ + fetchOptions?: Omit; +} & Omit; + +type RequestConfig = { + method: string; + path: string; + baseURL?: string | URL | undefined; + query?: string; + body?: RequestInit["body"]; + headers?: HeadersInit; + security?: SecurityState | null; + uaHeader?: string; + userAgent?: string | undefined; + timeoutMs?: number; +}; + +const gt: unknown = typeof globalThis === "undefined" ? null : globalThis; +const webWorkerLike = typeof gt === "object" + && gt != null + && "importScripts" in gt + && typeof gt["importScripts"] === "function"; +const isBrowserLike = webWorkerLike + || (typeof navigator !== "undefined" && "serviceWorker" in navigator) + || (typeof window === "object" && typeof window.document !== "undefined"); + +export class ClientSDK { + readonly #httpClient: HTTPClient; + readonly #hooks: SDKHooks; + readonly #logger?: Logger | undefined; + public readonly _baseURL: URL | null; + public readonly _options: SDKOptions & { hooks?: SDKHooks }; + + constructor(options: SDKOptions = {}) { + const opt = options as unknown; + if ( + typeof opt === "object" + && opt != null + && "hooks" in opt + && opt.hooks instanceof SDKHooks + ) { + this.#hooks = opt.hooks; + } else { + this.#hooks = new SDKHooks(); + } + const defaultHttpClient = new HTTPClient(); + options.httpClient = options.httpClient || defaultHttpClient; + options = this.#hooks.sdkInit(options); + + const url = serverURLFromOptions(options); + if (url) { + url.pathname = url.pathname.replace(/\/+$/, "") + "/"; + } + this._baseURL = url; + this.#httpClient = options.httpClient || defaultHttpClient; + + this._options = { ...options, hooks: this.#hooks }; + + this.#logger = this._options.debugLogger; + if (!this.#logger && env().DOKPLOY_DEBUG) { + this.#logger = console; + } + } + + public _createRequest( + context: HookContext, + conf: RequestConfig, + options?: RequestOptions, + ): Result { + const { method, path, query, headers: opHeaders, security } = conf; + + const base = conf.baseURL ?? this._baseURL; + if (!base) { + return ERR(new InvalidRequestError("No base URL provided for operation")); + } + const reqURL = new URL(base); + const inputURL = new URL(path, reqURL); + + if (path) { + reqURL.pathname += reqURL.pathname.endsWith("/") ? "" : "/"; + reqURL.pathname += inputURL.pathname.replace(/^\/+/, ""); + } + + let finalQuery = query || ""; + + const secQuery: string[] = []; + for (const [k, v] of Object.entries(security?.queryParams || {})) { + const q = encodeForm(k, v, { charEncoding: "percent" }); + if (typeof q !== "undefined") { + secQuery.push(q); + } + } + if (secQuery.length) { + finalQuery += `&${secQuery.join("&")}`; + } + + if (finalQuery) { + const q = finalQuery.startsWith("&") ? finalQuery.slice(1) : finalQuery; + reqURL.search = `?${q}`; + } + + const headers = new Headers(opHeaders); + + const username = security?.basic.username; + const password = security?.basic.password; + if (username != null || password != null) { + const encoded = stringToBase64( + [username || "", password || ""].join(":"), + ); + headers.set("Authorization", `Basic ${encoded}`); + } + + const securityHeaders = new Headers(security?.headers || {}); + for (const [k, v] of securityHeaders) { + headers.set(k, v); + } + + let cookie = headers.get("cookie") || ""; + for (const [k, v] of Object.entries(security?.cookies || {})) { + cookie += `; ${k}=${v}`; + } + cookie = cookie.startsWith("; ") ? cookie.slice(2) : cookie; + headers.set("cookie", cookie); + + const userHeaders = new Headers( + options?.headers ?? options?.fetchOptions?.headers, + ); + for (const [k, v] of userHeaders) { + headers.set(k, v); + } + + // Only set user agent header in non-browser-like environments since CORS + // policy disallows setting it in browsers e.g. Chrome throws an error. + if (!isBrowserLike) { + headers.set( + conf.uaHeader ?? "user-agent", + conf.userAgent ?? SDK_METADATA.userAgent, + ); + } + + const fetchOptions: Omit = { + ...options?.fetchOptions, + ...options, + }; + if (!fetchOptions?.signal && conf.timeoutMs && conf.timeoutMs > 0) { + const timeoutSignal = AbortSignal.timeout(conf.timeoutMs); + fetchOptions.signal = timeoutSignal; + } + + if (conf.body instanceof ReadableStream) { + Object.assign(fetchOptions, { duplex: "half" }); + } + + let input; + try { + input = this.#hooks.beforeCreateRequest(context, { + url: reqURL, + options: { + ...fetchOptions, + body: conf.body ?? null, + headers, + method, + }, + }); + } catch (err: unknown) { + return ERR( + new UnexpectedClientError("Create request hook failed to execute", { + cause: err, + }), + ); + } + + return OK(new Request(input.url, input.options)); + } + + public async _do( + request: Request, + options: { + context: HookContext; + errorCodes: number | string | (number | string)[]; + retryConfig: RetryConfig; + retryCodes: string[]; + }, + ): Promise< + Result< + Response, + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + | UnexpectedClientError + > + > { + const { context, errorCodes } = options; + + return retry( + async () => { + const req = await this.#hooks.beforeRequest(context, request.clone()); + await logRequest(this.#logger, req).catch((e) => + this.#logger?.log("Failed to log request:", e) + ); + + let response = await this.#httpClient.request(req); + + try { + if (matchStatusCode(response, errorCodes)) { + const result = await this.#hooks.afterError( + context, + response, + null, + ); + if (result.error) { + throw result.error; + } + response = result.response || response; + } else { + response = await this.#hooks.afterSuccess(context, response); + } + } finally { + await logResponse(this.#logger, response, req) + .catch(e => this.#logger?.log("Failed to log response:", e)); + } + + return response; + }, + { config: options.retryConfig, statusCodes: options.retryCodes }, + ).then( + (r) => OK(r), + (err) => { + switch (true) { + case isAbortError(err): + return ERR( + new RequestAbortedError("Request aborted by client", { + cause: err, + }), + ); + case isTimeoutError(err): + return ERR( + new RequestTimeoutError("Request timed out", { cause: err }), + ); + case isConnectionError(err): + return ERR( + new ConnectionError("Unable to make request", { cause: err }), + ); + default: + return ERR( + new UnexpectedClientError("Unexpected HTTP client error", { + cause: err, + }), + ); + } + }, + ); + } +} + +const jsonLikeContentTypeRE = /(application|text)\/.*?\+*json.*/; +const jsonlLikeContentTypeRE = + /(application|text)\/(.*?\+*\bjsonl\b.*|.*?\+*\bx-ndjson\b.*)/; +async function logRequest(logger: Logger | undefined, req: Request) { + if (!logger) { + return; + } + + const contentType = req.headers.get("content-type"); + const ct = contentType?.split(";")[0] || ""; + + logger.group(`> Request: ${req.method} ${req.url}`); + + logger.group("Headers:"); + for (const [k, v] of req.headers.entries()) { + logger.log(`${k}: ${v}`); + } + logger.groupEnd(); + + logger.group("Body:"); + switch (true) { + case jsonLikeContentTypeRE.test(ct): + logger.log(await req.clone().json()); + break; + case ct.startsWith("text/"): + logger.log(await req.clone().text()); + break; + case ct === "multipart/form-data": { + const body = await req.clone().formData(); + for (const [k, v] of body) { + const vlabel = v instanceof Blob ? "" : v; + logger.log(`${k}: ${vlabel}`); + } + break; + } + default: + logger.log(`<${contentType}>`); + break; + } + logger.groupEnd(); + + logger.groupEnd(); +} + +async function logResponse( + logger: Logger | undefined, + res: Response, + req: Request, +) { + if (!logger) { + return; + } + + const contentType = res.headers.get("content-type"); + const ct = contentType?.split(";")[0] || ""; + + logger.group(`< Response: ${req.method} ${req.url}`); + logger.log("Status Code:", res.status, res.statusText); + + logger.group("Headers:"); + for (const [k, v] of res.headers.entries()) { + logger.log(`${k}: ${v}`); + } + logger.groupEnd(); + + logger.group("Body:"); + switch (true) { + case matchContentType(res, "application/json") + || jsonLikeContentTypeRE.test(ct) && !jsonlLikeContentTypeRE.test(ct): + logger.log(await res.clone().json()); + break; + case matchContentType(res, "application/jsonl") + || jsonlLikeContentTypeRE.test(ct): + logger.log(await res.clone().text()); + break; + case matchContentType(res, "text/event-stream"): + logger.log(`<${contentType}>`); + break; + case matchContentType(res, "text/*"): + logger.log(await res.clone().text()); + break; + case matchContentType(res, "multipart/form-data"): { + const body = await res.clone().formData(); + for (const [k, v] of body) { + const vlabel = v instanceof Blob ? "" : v; + logger.log(`${k}: ${vlabel}`); + } + break; + } + default: + logger.log(`<${contentType}>`); + break; + } + logger.groupEnd(); + + logger.groupEnd(); +} diff --git a/src/lib/security.ts b/src/lib/security.ts new file mode 100644 index 0000000..410b0db --- /dev/null +++ b/src/lib/security.ts @@ -0,0 +1,264 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as models from "../models/index.js"; +import { env } from "./env.js"; + +type OAuth2PasswordFlow = { + username: string; + password: string; + clientID?: string | undefined; + clientSecret?: string | undefined; + tokenURL: string; +}; + +export enum SecurityErrorCode { + Incomplete = "incomplete", + UnrecognisedSecurityType = "unrecognized_security_type", +} + +export class SecurityError extends Error { + constructor( + public code: SecurityErrorCode, + message: string, + ) { + super(message); + this.name = "SecurityError"; + } + + static incomplete(): SecurityError { + return new SecurityError( + SecurityErrorCode.Incomplete, + "Security requirements not met in order to perform the operation", + ); + } + static unrecognizedType(type: string): SecurityError { + return new SecurityError( + SecurityErrorCode.UnrecognisedSecurityType, + `Unrecognised security type: ${type}`, + ); + } +} + +export type SecurityState = { + basic: { username?: string | undefined; password?: string | undefined }; + headers: Record; + queryParams: Record; + cookies: Record; + oauth2: ({ type: "password" } & OAuth2PasswordFlow) | { type: "none" }; +}; + +type SecurityInputBasic = { + type: "http:basic"; + value: + | { username?: string | undefined; password?: string | undefined } + | null + | undefined; +}; + +type SecurityInputBearer = { + type: "http:bearer"; + value: string | null | undefined; + fieldName: string; +}; + +type SecurityInputAPIKey = { + type: "apiKey:header" | "apiKey:query" | "apiKey:cookie"; + value: string | null | undefined; + fieldName: string; +}; + +type SecurityInputOIDC = { + type: "openIdConnect"; + value: string | null | undefined; + fieldName: string; +}; + +type SecurityInputOAuth2 = { + type: "oauth2"; + value: string | null | undefined; + fieldName: string; +}; + +type SecurityInputOAuth2ClientCredentials = { + type: "oauth2:client_credentials"; + value: + | { + clientID?: string | undefined; + clientSecret?: string | undefined; + } + | null + | string + | undefined; + fieldName?: string; +}; + +type SecurityInputOAuth2PasswordCredentials = { + type: "oauth2:password"; + value: + | string + | null + | undefined; + fieldName?: string; +}; + +type SecurityInputCustom = { + type: "http:custom"; + value: any | null | undefined; + fieldName?: string; +}; + +export type SecurityInput = + | SecurityInputBasic + | SecurityInputBearer + | SecurityInputAPIKey + | SecurityInputOAuth2 + | SecurityInputOAuth2ClientCredentials + | SecurityInputOAuth2PasswordCredentials + | SecurityInputOIDC + | SecurityInputCustom; + +export function resolveSecurity( + ...options: SecurityInput[][] +): SecurityState | null { + const state: SecurityState = { + basic: {}, + headers: {}, + queryParams: {}, + cookies: {}, + oauth2: { type: "none" }, + }; + + const option = options.find((opts) => { + return opts.every((o) => { + if (o.value == null) { + return false; + } else if (o.type === "http:basic") { + return o.value.username != null || o.value.password != null; + } else if (o.type === "http:custom") { + return null; + } else if (o.type === "oauth2:password") { + return ( + typeof o.value === "string" && !!o.value + ); + } else if (o.type === "oauth2:client_credentials") { + if (typeof o.value == "string") { + return !!o.value; + } + return o.value.clientID != null || o.value.clientSecret != null; + } else if (typeof o.value === "string") { + return !!o.value; + } else { + throw new Error( + `Unrecognized security type: ${o.type} (value type: ${typeof o + .value})`, + ); + } + }); + }); + if (option == null) { + return null; + } + + option.forEach((spec) => { + if (spec.value == null) { + return; + } + + const { type } = spec; + + switch (type) { + case "apiKey:header": + state.headers[spec.fieldName] = spec.value; + break; + case "apiKey:query": + state.queryParams[spec.fieldName] = spec.value; + break; + case "apiKey:cookie": + state.cookies[spec.fieldName] = spec.value; + break; + case "http:basic": + applyBasic(state, spec); + break; + case "http:custom": + break; + case "http:bearer": + applyBearer(state, spec); + break; + case "oauth2": + applyBearer(state, spec); + break; + case "oauth2:password": + applyBearer(state, spec); + break; + case "oauth2:client_credentials": + break; + case "openIdConnect": + applyBearer(state, spec); + break; + default: + spec satisfies never; + throw SecurityError.unrecognizedType(type); + } + }); + + return state; +} + +function applyBasic( + state: SecurityState, + spec: SecurityInputBasic, +) { + if (spec.value == null) { + return; + } + + state.basic = spec.value; +} + +function applyBearer( + state: SecurityState, + spec: + | SecurityInputBearer + | SecurityInputOAuth2 + | SecurityInputOIDC + | SecurityInputOAuth2PasswordCredentials, +) { + if (typeof spec.value !== "string" || !spec.value) { + return; + } + + let value = spec.value; + if (value.slice(0, 7).toLowerCase() !== "bearer ") { + value = `Bearer ${value}`; + } + + if (spec.fieldName !== undefined) { + state.headers[spec.fieldName] = value; + } +} + +export function resolveGlobalSecurity( + security: Partial | null | undefined, +): SecurityState | null { + return resolveSecurity( + [ + { + fieldName: "Authorization", + type: "http:bearer", + value: security?.authorization ?? env().DOKPLOY_AUTHORIZATION, + }, + ], + ); +} + +export async function extractSecurity< + T extends string | Record, +>(sec: T | (() => Promise) | undefined): Promise { + if (sec == null) { + return; + } + + return typeof sec === "function" ? sec() : sec; +} diff --git a/src/lib/url.ts b/src/lib/url.ts new file mode 100644 index 0000000..f3a8de6 --- /dev/null +++ b/src/lib/url.ts @@ -0,0 +1,33 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +const hasOwn = Object.prototype.hasOwnProperty; + +export type Params = Partial>; + +export function pathToFunc( + pathPattern: string, + options?: { charEncoding?: "percent" | "none" }, +): (params?: Params) => string { + const paramRE = /\{([a-zA-Z0-9_][a-zA-Z0-9_-]*?)\}/g; + + return function buildURLPath(params: Record = {}): string { + return pathPattern.replace(paramRE, function (_, placeholder) { + if (!hasOwn.call(params, placeholder)) { + throw new Error(`Parameter '${placeholder}' is required`); + } + + const value = params[placeholder]; + if (typeof value !== "string" && typeof value !== "number") { + throw new Error( + `Parameter '${placeholder}' must be a string or number`, + ); + } + + return options?.charEncoding === "percent" + ? encodeURIComponent(`${value}`) + : `${value}`; + }); + }; +} diff --git a/src/models/error.ts b/src/models/error.ts new file mode 100644 index 0000000..c113c88 --- /dev/null +++ b/src/models/error.ts @@ -0,0 +1,121 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type Issue = { + message: string; +}; + +/** + * Error response + */ +export type ErrorT = { + message: string; + code: string; + issues?: Array | undefined; +}; + +/** @internal */ +export const Issue$inboundSchema: z.ZodType = z + .object({ + message: z.string(), + }); + +/** @internal */ +export type Issue$Outbound = { + message: string; +}; + +/** @internal */ +export const Issue$outboundSchema: z.ZodType< + Issue$Outbound, + z.ZodTypeDef, + Issue +> = z.object({ + message: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Issue$ { + /** @deprecated use `Issue$inboundSchema` instead. */ + export const inboundSchema = Issue$inboundSchema; + /** @deprecated use `Issue$outboundSchema` instead. */ + export const outboundSchema = Issue$outboundSchema; + /** @deprecated use `Issue$Outbound` instead. */ + export type Outbound = Issue$Outbound; +} + +export function issueToJSON(issue: Issue): string { + return JSON.stringify(Issue$outboundSchema.parse(issue)); +} + +export function issueFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Issue$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Issue' from JSON`, + ); +} + +/** @internal */ +export const ErrorT$inboundSchema: z.ZodType = z + .object({ + message: z.string(), + code: z.string(), + issues: z.array(z.lazy(() => Issue$inboundSchema)).optional(), + }); + +/** @internal */ +export type ErrorT$Outbound = { + message: string; + code: string; + issues?: Array | undefined; +}; + +/** @internal */ +export const ErrorT$outboundSchema: z.ZodType< + ErrorT$Outbound, + z.ZodTypeDef, + ErrorT +> = z.object({ + message: z.string(), + code: z.string(), + issues: z.array(z.lazy(() => Issue$outboundSchema)).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ErrorT$ { + /** @deprecated use `ErrorT$inboundSchema` instead. */ + export const inboundSchema = ErrorT$inboundSchema; + /** @deprecated use `ErrorT$outboundSchema` instead. */ + export const outboundSchema = ErrorT$outboundSchema; + /** @deprecated use `ErrorT$Outbound` instead. */ + export type Outbound = ErrorT$Outbound; +} + +export function errorToJSON(errorT: ErrorT): string { + return JSON.stringify(ErrorT$outboundSchema.parse(errorT)); +} + +export function errorFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ErrorT$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ErrorT' from JSON`, + ); +} diff --git a/src/models/errors/dokploydefaulterror.ts b/src/models/errors/dokploydefaulterror.ts new file mode 100644 index 0000000..f89ab31 --- /dev/null +++ b/src/models/errors/dokploydefaulterror.ts @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { DokployError } from "./dokployerror.js"; + +/** The fallback error class if no more specific error class is matched */ +export class DokployDefaultError extends DokployError { + constructor( + message: string, + httpMeta: { + response: Response; + request: Request; + body: string; + }, + ) { + if (message) { + message += `: `; + } + message += `Status ${httpMeta.response.status}`; + const contentType = httpMeta.response.headers.get("content-type") || `""`; + if (contentType !== "application/json") { + message += ` Content-Type ${ + contentType.includes(" ") ? `"${contentType}"` : contentType + }`; + } + const body = httpMeta.body || `""`; + message += body.length > 100 ? "\n" : ". "; + let bodyDisplay = body; + if (body.length > 10000) { + const truncated = body.substring(0, 10000); + const remaining = body.length - 10000; + bodyDisplay = `${truncated}...and ${remaining} more chars`; + } + message += `Body: ${bodyDisplay}`; + message = message.trim(); + super(message, httpMeta); + this.name = "DokployDefaultError"; + } +} diff --git a/src/models/errors/dokployerror.ts b/src/models/errors/dokployerror.ts new file mode 100644 index 0000000..d683b76 --- /dev/null +++ b/src/models/errors/dokployerror.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +/** The base class for all HTTP error responses */ +export class DokployError extends Error { + /** HTTP status code */ + public readonly statusCode: number; + /** HTTP body */ + public readonly body: string; + /** HTTP headers */ + public readonly headers: Headers; + /** HTTP content type */ + public readonly contentType: string; + /** Raw response */ + public readonly rawResponse: Response; + + constructor( + message: string, + httpMeta: { + response: Response; + request: Request; + body: string; + }, + ) { + super(message); + this.statusCode = httpMeta.response.status; + this.body = httpMeta.body; + this.headers = httpMeta.response.headers; + this.contentType = httpMeta.response.headers.get("content-type") || ""; + this.rawResponse = httpMeta.response; + + this.name = "DokployError"; + } +} diff --git a/src/models/errors/httpclienterrors.ts b/src/models/errors/httpclienterrors.ts new file mode 100644 index 0000000..b34f612 --- /dev/null +++ b/src/models/errors/httpclienterrors.ts @@ -0,0 +1,62 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +/** + * Base class for all HTTP errors. + */ +export class HTTPClientError extends Error { + /** The underlying cause of the error. */ + override readonly cause: unknown; + override name = "HTTPClientError"; + constructor(message: string, opts?: { cause?: unknown }) { + let msg = message; + if (opts?.cause) { + msg += `: ${opts.cause}`; + } + + super(msg, opts); + // In older runtimes, the cause field would not have been assigned through + // the super() call. + if (typeof this.cause === "undefined") { + this.cause = opts?.cause; + } + } +} + +/** + * An error to capture unrecognised or unexpected errors when making HTTP calls. + */ +export class UnexpectedClientError extends HTTPClientError { + override name = "UnexpectedClientError"; +} + +/** + * An error that is raised when any inputs used to create a request are invalid. + */ +export class InvalidRequestError extends HTTPClientError { + override name = "InvalidRequestError"; +} + +/** + * An error that is raised when a HTTP request was aborted by the client error. + */ +export class RequestAbortedError extends HTTPClientError { + override readonly name = "RequestAbortedError"; +} + +/** + * An error that is raised when a HTTP request timed out due to an AbortSignal + * signal timeout. + */ +export class RequestTimeoutError extends HTTPClientError { + override readonly name = "RequestTimeoutError"; +} + +/** + * An error that is raised when a HTTP client is unable to make a request to + * a server. + */ +export class ConnectionError extends HTTPClientError { + override readonly name = "ConnectionError"; +} diff --git a/src/models/errors/index.ts b/src/models/errors/index.ts new file mode 100644 index 0000000..450dc09 --- /dev/null +++ b/src/models/errors/index.ts @@ -0,0 +1,9 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export * from "./dokploydefaulterror.js"; +export * from "./dokployerror.js"; +export * from "./httpclienterrors.js"; +export * from "./responsevalidationerror.js"; +export * from "./sdkvalidationerror.js"; diff --git a/src/models/errors/responsevalidationerror.ts b/src/models/errors/responsevalidationerror.ts new file mode 100644 index 0000000..db59762 --- /dev/null +++ b/src/models/errors/responsevalidationerror.ts @@ -0,0 +1,50 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { DokployError } from "./dokployerror.js"; +import { formatZodError } from "./sdkvalidationerror.js"; + +export class ResponseValidationError extends DokployError { + /** + * The raw value that failed validation. + */ + public readonly rawValue: unknown; + + /** + * The raw message that failed validation. + */ + public readonly rawMessage: unknown; + + constructor( + message: string, + extra: { + response: Response; + request: Request; + body: string; + cause: unknown; + rawValue: unknown; + rawMessage: unknown; + }, + ) { + super(message, extra); + this.name = "ResponseValidationError"; + this.cause = extra.cause; + this.rawValue = extra.rawValue; + this.rawMessage = extra.rawMessage; + } + + /** + * Return a pretty-formatted error message if the underlying validation error + * is a ZodError or some other recognized error type, otherwise return the + * default error message. + */ + public pretty(): string { + if (this.cause instanceof z.ZodError) { + return `${this.rawMessage}\n${formatZodError(this.cause)}`; + } else { + return this.toString(); + } + } +} diff --git a/src/models/errors/sdkvalidationerror.ts b/src/models/errors/sdkvalidationerror.ts new file mode 100644 index 0000000..37face8 --- /dev/null +++ b/src/models/errors/sdkvalidationerror.ts @@ -0,0 +1,109 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export class SDKValidationError extends Error { + /** + * The raw value that failed validation. + */ + public readonly rawValue: unknown; + + /** + * The raw message that failed validation. + */ + public readonly rawMessage: unknown; + + // Allows for backwards compatibility for `instanceof` checks of `ResponseValidationError` + static override [Symbol.hasInstance]( + instance: unknown, + ): instance is SDKValidationError { + if (!(instance instanceof Error)) return false; + if (!("rawValue" in instance)) return false; + if (!("rawMessage" in instance)) return false; + if (!("pretty" in instance)) return false; + if (typeof instance.pretty !== "function") return false; + return true; + } + + constructor(message: string, cause: unknown, rawValue: unknown) { + super(`${message}: ${cause}`); + this.name = "SDKValidationError"; + this.cause = cause; + this.rawValue = rawValue; + this.rawMessage = message; + } + + /** + * Return a pretty-formatted error message if the underlying validation error + * is a ZodError or some other recognized error type, otherwise return the + * default error message. + */ + public pretty(): string { + if (this.cause instanceof z.ZodError) { + return `${this.rawMessage}\n${formatZodError(this.cause)}`; + } else { + return this.toString(); + } + } +} + +export function formatZodError(err: z.ZodError, level = 0): string { + let pre = " ".repeat(level); + pre = level > 0 ? `│${pre}` : pre; + pre += " ".repeat(level); + + let message = ""; + const append = (str: string) => (message += `\n${pre}${str}`); + + const len = err.issues.length; + const headline = len === 1 ? `${len} issue found` : `${len} issues found`; + + if (len) { + append(`┌ ${headline}:`); + } + + for (const issue of err.issues) { + let path = issue.path.join("."); + path = path ? `.${path}` : ""; + append(`│ • [${path}]: ${issue.message} (${issue.code})`); + switch (issue.code) { + case "invalid_literal": + case "invalid_type": { + append(`│ Want: ${issue.expected}`); + append(`│ Got: ${issue.received}`); + break; + } + case "unrecognized_keys": { + append(`│ Keys: ${issue.keys.join(", ")}`); + break; + } + case "invalid_enum_value": { + append(`│ Allowed: ${issue.options.join(", ")}`); + append(`│ Got: ${issue.received}`); + break; + } + case "invalid_union_discriminator": { + append(`│ Allowed: ${issue.options.join(", ")}`); + break; + } + case "invalid_union": { + const len = issue.unionErrors.length; + append( + `│ ✖︎ Attemped to deserialize into one of ${len} union members:`, + ); + issue.unionErrors.forEach((err, i) => { + append(`│ ✖︎ Member ${i + 1} of ${len}`); + append(`${formatZodError(err, level + 1)}`); + }); + } + } + } + + if (err.issues.length) { + append(`└─*`); + } + + return message.slice(1); +} diff --git a/src/models/index.ts b/src/models/index.ts new file mode 100644 index 0000000..1a6eaa3 --- /dev/null +++ b/src/models/index.ts @@ -0,0 +1,6 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export * from "./error.js"; +export * from "./security.js"; diff --git a/src/models/operations/adminassignpermissions.ts b/src/models/operations/adminassignpermissions.ts new file mode 100644 index 0000000..48e17a0 --- /dev/null +++ b/src/models/operations/adminassignpermissions.ts @@ -0,0 +1,112 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type AdminAssignPermissionsRequest = { + userId: string; + canCreateProjects: boolean; + canCreateServices: boolean; + canDeleteProjects: boolean; + canDeleteServices: boolean; + accesedProjects: Array; + accesedServices: Array; + canAccessToTraefikFiles: boolean; + canAccessToDocker: boolean; + canAccessToAPI: boolean; + canAccessToSSHKeys: boolean; + canAccessToGitProviders: boolean; +}; + +/** @internal */ +export const AdminAssignPermissionsRequest$inboundSchema: z.ZodType< + AdminAssignPermissionsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + userId: z.string(), + canCreateProjects: z.boolean(), + canCreateServices: z.boolean(), + canDeleteProjects: z.boolean(), + canDeleteServices: z.boolean(), + accesedProjects: z.array(z.string()), + accesedServices: z.array(z.string()), + canAccessToTraefikFiles: z.boolean(), + canAccessToDocker: z.boolean(), + canAccessToAPI: z.boolean(), + canAccessToSSHKeys: z.boolean(), + canAccessToGitProviders: z.boolean(), +}); + +/** @internal */ +export type AdminAssignPermissionsRequest$Outbound = { + userId: string; + canCreateProjects: boolean; + canCreateServices: boolean; + canDeleteProjects: boolean; + canDeleteServices: boolean; + accesedProjects: Array; + accesedServices: Array; + canAccessToTraefikFiles: boolean; + canAccessToDocker: boolean; + canAccessToAPI: boolean; + canAccessToSSHKeys: boolean; + canAccessToGitProviders: boolean; +}; + +/** @internal */ +export const AdminAssignPermissionsRequest$outboundSchema: z.ZodType< + AdminAssignPermissionsRequest$Outbound, + z.ZodTypeDef, + AdminAssignPermissionsRequest +> = z.object({ + userId: z.string(), + canCreateProjects: z.boolean(), + canCreateServices: z.boolean(), + canDeleteProjects: z.boolean(), + canDeleteServices: z.boolean(), + accesedProjects: z.array(z.string()), + accesedServices: z.array(z.string()), + canAccessToTraefikFiles: z.boolean(), + canAccessToDocker: z.boolean(), + canAccessToAPI: z.boolean(), + canAccessToSSHKeys: z.boolean(), + canAccessToGitProviders: z.boolean(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AdminAssignPermissionsRequest$ { + /** @deprecated use `AdminAssignPermissionsRequest$inboundSchema` instead. */ + export const inboundSchema = AdminAssignPermissionsRequest$inboundSchema; + /** @deprecated use `AdminAssignPermissionsRequest$outboundSchema` instead. */ + export const outboundSchema = AdminAssignPermissionsRequest$outboundSchema; + /** @deprecated use `AdminAssignPermissionsRequest$Outbound` instead. */ + export type Outbound = AdminAssignPermissionsRequest$Outbound; +} + +export function adminAssignPermissionsRequestToJSON( + adminAssignPermissionsRequest: AdminAssignPermissionsRequest, +): string { + return JSON.stringify( + AdminAssignPermissionsRequest$outboundSchema.parse( + adminAssignPermissionsRequest, + ), + ); +} + +export function adminAssignPermissionsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AdminAssignPermissionsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AdminAssignPermissionsRequest' from JSON`, + ); +} diff --git a/src/models/operations/admincreateuserinvitation.ts b/src/models/operations/admincreateuserinvitation.ts new file mode 100644 index 0000000..371c802 --- /dev/null +++ b/src/models/operations/admincreateuserinvitation.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type AdminCreateUserInvitationRequest = { + email: string; +}; + +/** @internal */ +export const AdminCreateUserInvitationRequest$inboundSchema: z.ZodType< + AdminCreateUserInvitationRequest, + z.ZodTypeDef, + unknown +> = z.object({ + email: z.string(), +}); + +/** @internal */ +export type AdminCreateUserInvitationRequest$Outbound = { + email: string; +}; + +/** @internal */ +export const AdminCreateUserInvitationRequest$outboundSchema: z.ZodType< + AdminCreateUserInvitationRequest$Outbound, + z.ZodTypeDef, + AdminCreateUserInvitationRequest +> = z.object({ + email: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AdminCreateUserInvitationRequest$ { + /** @deprecated use `AdminCreateUserInvitationRequest$inboundSchema` instead. */ + export const inboundSchema = AdminCreateUserInvitationRequest$inboundSchema; + /** @deprecated use `AdminCreateUserInvitationRequest$outboundSchema` instead. */ + export const outboundSchema = AdminCreateUserInvitationRequest$outboundSchema; + /** @deprecated use `AdminCreateUserInvitationRequest$Outbound` instead. */ + export type Outbound = AdminCreateUserInvitationRequest$Outbound; +} + +export function adminCreateUserInvitationRequestToJSON( + adminCreateUserInvitationRequest: AdminCreateUserInvitationRequest, +): string { + return JSON.stringify( + AdminCreateUserInvitationRequest$outboundSchema.parse( + adminCreateUserInvitationRequest, + ), + ); +} + +export function adminCreateUserInvitationRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AdminCreateUserInvitationRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AdminCreateUserInvitationRequest' from JSON`, + ); +} diff --git a/src/models/operations/admingetuserbytoken.ts b/src/models/operations/admingetuserbytoken.ts new file mode 100644 index 0000000..8ee9dee --- /dev/null +++ b/src/models/operations/admingetuserbytoken.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type AdminGetUserByTokenRequest = { + token: string; +}; + +/** @internal */ +export const AdminGetUserByTokenRequest$inboundSchema: z.ZodType< + AdminGetUserByTokenRequest, + z.ZodTypeDef, + unknown +> = z.object({ + token: z.string(), +}); + +/** @internal */ +export type AdminGetUserByTokenRequest$Outbound = { + token: string; +}; + +/** @internal */ +export const AdminGetUserByTokenRequest$outboundSchema: z.ZodType< + AdminGetUserByTokenRequest$Outbound, + z.ZodTypeDef, + AdminGetUserByTokenRequest +> = z.object({ + token: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AdminGetUserByTokenRequest$ { + /** @deprecated use `AdminGetUserByTokenRequest$inboundSchema` instead. */ + export const inboundSchema = AdminGetUserByTokenRequest$inboundSchema; + /** @deprecated use `AdminGetUserByTokenRequest$outboundSchema` instead. */ + export const outboundSchema = AdminGetUserByTokenRequest$outboundSchema; + /** @deprecated use `AdminGetUserByTokenRequest$Outbound` instead. */ + export type Outbound = AdminGetUserByTokenRequest$Outbound; +} + +export function adminGetUserByTokenRequestToJSON( + adminGetUserByTokenRequest: AdminGetUserByTokenRequest, +): string { + return JSON.stringify( + AdminGetUserByTokenRequest$outboundSchema.parse(adminGetUserByTokenRequest), + ); +} + +export function adminGetUserByTokenRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AdminGetUserByTokenRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AdminGetUserByTokenRequest' from JSON`, + ); +} diff --git a/src/models/operations/adminremoveuser.ts b/src/models/operations/adminremoveuser.ts new file mode 100644 index 0000000..bbb1b53 --- /dev/null +++ b/src/models/operations/adminremoveuser.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type AdminRemoveUserRequest = { + authId: string; +}; + +/** @internal */ +export const AdminRemoveUserRequest$inboundSchema: z.ZodType< + AdminRemoveUserRequest, + z.ZodTypeDef, + unknown +> = z.object({ + authId: z.string(), +}); + +/** @internal */ +export type AdminRemoveUserRequest$Outbound = { + authId: string; +}; + +/** @internal */ +export const AdminRemoveUserRequest$outboundSchema: z.ZodType< + AdminRemoveUserRequest$Outbound, + z.ZodTypeDef, + AdminRemoveUserRequest +> = z.object({ + authId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AdminRemoveUserRequest$ { + /** @deprecated use `AdminRemoveUserRequest$inboundSchema` instead. */ + export const inboundSchema = AdminRemoveUserRequest$inboundSchema; + /** @deprecated use `AdminRemoveUserRequest$outboundSchema` instead. */ + export const outboundSchema = AdminRemoveUserRequest$outboundSchema; + /** @deprecated use `AdminRemoveUserRequest$Outbound` instead. */ + export type Outbound = AdminRemoveUserRequest$Outbound; +} + +export function adminRemoveUserRequestToJSON( + adminRemoveUserRequest: AdminRemoveUserRequest, +): string { + return JSON.stringify( + AdminRemoveUserRequest$outboundSchema.parse(adminRemoveUserRequest), + ); +} + +export function adminRemoveUserRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AdminRemoveUserRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AdminRemoveUserRequest' from JSON`, + ); +} diff --git a/src/models/operations/applicationcleanqueues.ts b/src/models/operations/applicationcleanqueues.ts new file mode 100644 index 0000000..edc1d95 --- /dev/null +++ b/src/models/operations/applicationcleanqueues.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ApplicationCleanQueuesRequest = { + applicationId: string; +}; + +/** @internal */ +export const ApplicationCleanQueuesRequest$inboundSchema: z.ZodType< + ApplicationCleanQueuesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + applicationId: z.string(), +}); + +/** @internal */ +export type ApplicationCleanQueuesRequest$Outbound = { + applicationId: string; +}; + +/** @internal */ +export const ApplicationCleanQueuesRequest$outboundSchema: z.ZodType< + ApplicationCleanQueuesRequest$Outbound, + z.ZodTypeDef, + ApplicationCleanQueuesRequest +> = z.object({ + applicationId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ApplicationCleanQueuesRequest$ { + /** @deprecated use `ApplicationCleanQueuesRequest$inboundSchema` instead. */ + export const inboundSchema = ApplicationCleanQueuesRequest$inboundSchema; + /** @deprecated use `ApplicationCleanQueuesRequest$outboundSchema` instead. */ + export const outboundSchema = ApplicationCleanQueuesRequest$outboundSchema; + /** @deprecated use `ApplicationCleanQueuesRequest$Outbound` instead. */ + export type Outbound = ApplicationCleanQueuesRequest$Outbound; +} + +export function applicationCleanQueuesRequestToJSON( + applicationCleanQueuesRequest: ApplicationCleanQueuesRequest, +): string { + return JSON.stringify( + ApplicationCleanQueuesRequest$outboundSchema.parse( + applicationCleanQueuesRequest, + ), + ); +} + +export function applicationCleanQueuesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ApplicationCleanQueuesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ApplicationCleanQueuesRequest' from JSON`, + ); +} diff --git a/src/models/operations/applicationcreate.ts b/src/models/operations/applicationcreate.ts new file mode 100644 index 0000000..f77b2d1 --- /dev/null +++ b/src/models/operations/applicationcreate.ts @@ -0,0 +1,82 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ApplicationCreateRequest = { + name: string; + appName?: string | undefined; + description?: string | null | undefined; + projectId: string; + serverId?: string | null | undefined; +}; + +/** @internal */ +export const ApplicationCreateRequest$inboundSchema: z.ZodType< + ApplicationCreateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + appName: z.string().optional(), + description: z.nullable(z.string()).optional(), + projectId: z.string(), + serverId: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type ApplicationCreateRequest$Outbound = { + name: string; + appName?: string | undefined; + description?: string | null | undefined; + projectId: string; + serverId?: string | null | undefined; +}; + +/** @internal */ +export const ApplicationCreateRequest$outboundSchema: z.ZodType< + ApplicationCreateRequest$Outbound, + z.ZodTypeDef, + ApplicationCreateRequest +> = z.object({ + name: z.string(), + appName: z.string().optional(), + description: z.nullable(z.string()).optional(), + projectId: z.string(), + serverId: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ApplicationCreateRequest$ { + /** @deprecated use `ApplicationCreateRequest$inboundSchema` instead. */ + export const inboundSchema = ApplicationCreateRequest$inboundSchema; + /** @deprecated use `ApplicationCreateRequest$outboundSchema` instead. */ + export const outboundSchema = ApplicationCreateRequest$outboundSchema; + /** @deprecated use `ApplicationCreateRequest$Outbound` instead. */ + export type Outbound = ApplicationCreateRequest$Outbound; +} + +export function applicationCreateRequestToJSON( + applicationCreateRequest: ApplicationCreateRequest, +): string { + return JSON.stringify( + ApplicationCreateRequest$outboundSchema.parse(applicationCreateRequest), + ); +} + +export function applicationCreateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ApplicationCreateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ApplicationCreateRequest' from JSON`, + ); +} diff --git a/src/models/operations/applicationdelete.ts b/src/models/operations/applicationdelete.ts new file mode 100644 index 0000000..fd188f0 --- /dev/null +++ b/src/models/operations/applicationdelete.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ApplicationDeleteRequest = { + applicationId: string; +}; + +/** @internal */ +export const ApplicationDeleteRequest$inboundSchema: z.ZodType< + ApplicationDeleteRequest, + z.ZodTypeDef, + unknown +> = z.object({ + applicationId: z.string(), +}); + +/** @internal */ +export type ApplicationDeleteRequest$Outbound = { + applicationId: string; +}; + +/** @internal */ +export const ApplicationDeleteRequest$outboundSchema: z.ZodType< + ApplicationDeleteRequest$Outbound, + z.ZodTypeDef, + ApplicationDeleteRequest +> = z.object({ + applicationId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ApplicationDeleteRequest$ { + /** @deprecated use `ApplicationDeleteRequest$inboundSchema` instead. */ + export const inboundSchema = ApplicationDeleteRequest$inboundSchema; + /** @deprecated use `ApplicationDeleteRequest$outboundSchema` instead. */ + export const outboundSchema = ApplicationDeleteRequest$outboundSchema; + /** @deprecated use `ApplicationDeleteRequest$Outbound` instead. */ + export type Outbound = ApplicationDeleteRequest$Outbound; +} + +export function applicationDeleteRequestToJSON( + applicationDeleteRequest: ApplicationDeleteRequest, +): string { + return JSON.stringify( + ApplicationDeleteRequest$outboundSchema.parse(applicationDeleteRequest), + ); +} + +export function applicationDeleteRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ApplicationDeleteRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ApplicationDeleteRequest' from JSON`, + ); +} diff --git a/src/models/operations/applicationdeploy.ts b/src/models/operations/applicationdeploy.ts new file mode 100644 index 0000000..dc13238 --- /dev/null +++ b/src/models/operations/applicationdeploy.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ApplicationDeployRequest = { + applicationId: string; +}; + +/** @internal */ +export const ApplicationDeployRequest$inboundSchema: z.ZodType< + ApplicationDeployRequest, + z.ZodTypeDef, + unknown +> = z.object({ + applicationId: z.string(), +}); + +/** @internal */ +export type ApplicationDeployRequest$Outbound = { + applicationId: string; +}; + +/** @internal */ +export const ApplicationDeployRequest$outboundSchema: z.ZodType< + ApplicationDeployRequest$Outbound, + z.ZodTypeDef, + ApplicationDeployRequest +> = z.object({ + applicationId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ApplicationDeployRequest$ { + /** @deprecated use `ApplicationDeployRequest$inboundSchema` instead. */ + export const inboundSchema = ApplicationDeployRequest$inboundSchema; + /** @deprecated use `ApplicationDeployRequest$outboundSchema` instead. */ + export const outboundSchema = ApplicationDeployRequest$outboundSchema; + /** @deprecated use `ApplicationDeployRequest$Outbound` instead. */ + export type Outbound = ApplicationDeployRequest$Outbound; +} + +export function applicationDeployRequestToJSON( + applicationDeployRequest: ApplicationDeployRequest, +): string { + return JSON.stringify( + ApplicationDeployRequest$outboundSchema.parse(applicationDeployRequest), + ); +} + +export function applicationDeployRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ApplicationDeployRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ApplicationDeployRequest' from JSON`, + ); +} diff --git a/src/models/operations/applicationmarkrunning.ts b/src/models/operations/applicationmarkrunning.ts new file mode 100644 index 0000000..f0e35fa --- /dev/null +++ b/src/models/operations/applicationmarkrunning.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ApplicationMarkRunningRequest = { + applicationId: string; +}; + +/** @internal */ +export const ApplicationMarkRunningRequest$inboundSchema: z.ZodType< + ApplicationMarkRunningRequest, + z.ZodTypeDef, + unknown +> = z.object({ + applicationId: z.string(), +}); + +/** @internal */ +export type ApplicationMarkRunningRequest$Outbound = { + applicationId: string; +}; + +/** @internal */ +export const ApplicationMarkRunningRequest$outboundSchema: z.ZodType< + ApplicationMarkRunningRequest$Outbound, + z.ZodTypeDef, + ApplicationMarkRunningRequest +> = z.object({ + applicationId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ApplicationMarkRunningRequest$ { + /** @deprecated use `ApplicationMarkRunningRequest$inboundSchema` instead. */ + export const inboundSchema = ApplicationMarkRunningRequest$inboundSchema; + /** @deprecated use `ApplicationMarkRunningRequest$outboundSchema` instead. */ + export const outboundSchema = ApplicationMarkRunningRequest$outboundSchema; + /** @deprecated use `ApplicationMarkRunningRequest$Outbound` instead. */ + export type Outbound = ApplicationMarkRunningRequest$Outbound; +} + +export function applicationMarkRunningRequestToJSON( + applicationMarkRunningRequest: ApplicationMarkRunningRequest, +): string { + return JSON.stringify( + ApplicationMarkRunningRequest$outboundSchema.parse( + applicationMarkRunningRequest, + ), + ); +} + +export function applicationMarkRunningRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ApplicationMarkRunningRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ApplicationMarkRunningRequest' from JSON`, + ); +} diff --git a/src/models/operations/applicationone.ts b/src/models/operations/applicationone.ts new file mode 100644 index 0000000..9c2c06c --- /dev/null +++ b/src/models/operations/applicationone.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ApplicationOneRequest = { + applicationId: string; +}; + +/** @internal */ +export const ApplicationOneRequest$inboundSchema: z.ZodType< + ApplicationOneRequest, + z.ZodTypeDef, + unknown +> = z.object({ + applicationId: z.string(), +}); + +/** @internal */ +export type ApplicationOneRequest$Outbound = { + applicationId: string; +}; + +/** @internal */ +export const ApplicationOneRequest$outboundSchema: z.ZodType< + ApplicationOneRequest$Outbound, + z.ZodTypeDef, + ApplicationOneRequest +> = z.object({ + applicationId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ApplicationOneRequest$ { + /** @deprecated use `ApplicationOneRequest$inboundSchema` instead. */ + export const inboundSchema = ApplicationOneRequest$inboundSchema; + /** @deprecated use `ApplicationOneRequest$outboundSchema` instead. */ + export const outboundSchema = ApplicationOneRequest$outboundSchema; + /** @deprecated use `ApplicationOneRequest$Outbound` instead. */ + export type Outbound = ApplicationOneRequest$Outbound; +} + +export function applicationOneRequestToJSON( + applicationOneRequest: ApplicationOneRequest, +): string { + return JSON.stringify( + ApplicationOneRequest$outboundSchema.parse(applicationOneRequest), + ); +} + +export function applicationOneRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ApplicationOneRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ApplicationOneRequest' from JSON`, + ); +} diff --git a/src/models/operations/applicationreadappmonitoring.ts b/src/models/operations/applicationreadappmonitoring.ts new file mode 100644 index 0000000..1614640 --- /dev/null +++ b/src/models/operations/applicationreadappmonitoring.ts @@ -0,0 +1,71 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ApplicationReadAppMonitoringRequest = { + appName: string; +}; + +/** @internal */ +export const ApplicationReadAppMonitoringRequest$inboundSchema: z.ZodType< + ApplicationReadAppMonitoringRequest, + z.ZodTypeDef, + unknown +> = z.object({ + appName: z.string(), +}); + +/** @internal */ +export type ApplicationReadAppMonitoringRequest$Outbound = { + appName: string; +}; + +/** @internal */ +export const ApplicationReadAppMonitoringRequest$outboundSchema: z.ZodType< + ApplicationReadAppMonitoringRequest$Outbound, + z.ZodTypeDef, + ApplicationReadAppMonitoringRequest +> = z.object({ + appName: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ApplicationReadAppMonitoringRequest$ { + /** @deprecated use `ApplicationReadAppMonitoringRequest$inboundSchema` instead. */ + export const inboundSchema = + ApplicationReadAppMonitoringRequest$inboundSchema; + /** @deprecated use `ApplicationReadAppMonitoringRequest$outboundSchema` instead. */ + export const outboundSchema = + ApplicationReadAppMonitoringRequest$outboundSchema; + /** @deprecated use `ApplicationReadAppMonitoringRequest$Outbound` instead. */ + export type Outbound = ApplicationReadAppMonitoringRequest$Outbound; +} + +export function applicationReadAppMonitoringRequestToJSON( + applicationReadAppMonitoringRequest: ApplicationReadAppMonitoringRequest, +): string { + return JSON.stringify( + ApplicationReadAppMonitoringRequest$outboundSchema.parse( + applicationReadAppMonitoringRequest, + ), + ); +} + +export function applicationReadAppMonitoringRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + ApplicationReadAppMonitoringRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ApplicationReadAppMonitoringRequest' from JSON`, + ); +} diff --git a/src/models/operations/applicationreadtraefikconfig.ts b/src/models/operations/applicationreadtraefikconfig.ts new file mode 100644 index 0000000..0887f54 --- /dev/null +++ b/src/models/operations/applicationreadtraefikconfig.ts @@ -0,0 +1,71 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ApplicationReadTraefikConfigRequest = { + applicationId: string; +}; + +/** @internal */ +export const ApplicationReadTraefikConfigRequest$inboundSchema: z.ZodType< + ApplicationReadTraefikConfigRequest, + z.ZodTypeDef, + unknown +> = z.object({ + applicationId: z.string(), +}); + +/** @internal */ +export type ApplicationReadTraefikConfigRequest$Outbound = { + applicationId: string; +}; + +/** @internal */ +export const ApplicationReadTraefikConfigRequest$outboundSchema: z.ZodType< + ApplicationReadTraefikConfigRequest$Outbound, + z.ZodTypeDef, + ApplicationReadTraefikConfigRequest +> = z.object({ + applicationId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ApplicationReadTraefikConfigRequest$ { + /** @deprecated use `ApplicationReadTraefikConfigRequest$inboundSchema` instead. */ + export const inboundSchema = + ApplicationReadTraefikConfigRequest$inboundSchema; + /** @deprecated use `ApplicationReadTraefikConfigRequest$outboundSchema` instead. */ + export const outboundSchema = + ApplicationReadTraefikConfigRequest$outboundSchema; + /** @deprecated use `ApplicationReadTraefikConfigRequest$Outbound` instead. */ + export type Outbound = ApplicationReadTraefikConfigRequest$Outbound; +} + +export function applicationReadTraefikConfigRequestToJSON( + applicationReadTraefikConfigRequest: ApplicationReadTraefikConfigRequest, +): string { + return JSON.stringify( + ApplicationReadTraefikConfigRequest$outboundSchema.parse( + applicationReadTraefikConfigRequest, + ), + ); +} + +export function applicationReadTraefikConfigRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + ApplicationReadTraefikConfigRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ApplicationReadTraefikConfigRequest' from JSON`, + ); +} diff --git a/src/models/operations/applicationredeploy.ts b/src/models/operations/applicationredeploy.ts new file mode 100644 index 0000000..f0dae47 --- /dev/null +++ b/src/models/operations/applicationredeploy.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ApplicationRedeployRequest = { + applicationId: string; +}; + +/** @internal */ +export const ApplicationRedeployRequest$inboundSchema: z.ZodType< + ApplicationRedeployRequest, + z.ZodTypeDef, + unknown +> = z.object({ + applicationId: z.string(), +}); + +/** @internal */ +export type ApplicationRedeployRequest$Outbound = { + applicationId: string; +}; + +/** @internal */ +export const ApplicationRedeployRequest$outboundSchema: z.ZodType< + ApplicationRedeployRequest$Outbound, + z.ZodTypeDef, + ApplicationRedeployRequest +> = z.object({ + applicationId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ApplicationRedeployRequest$ { + /** @deprecated use `ApplicationRedeployRequest$inboundSchema` instead. */ + export const inboundSchema = ApplicationRedeployRequest$inboundSchema; + /** @deprecated use `ApplicationRedeployRequest$outboundSchema` instead. */ + export const outboundSchema = ApplicationRedeployRequest$outboundSchema; + /** @deprecated use `ApplicationRedeployRequest$Outbound` instead. */ + export type Outbound = ApplicationRedeployRequest$Outbound; +} + +export function applicationRedeployRequestToJSON( + applicationRedeployRequest: ApplicationRedeployRequest, +): string { + return JSON.stringify( + ApplicationRedeployRequest$outboundSchema.parse(applicationRedeployRequest), + ); +} + +export function applicationRedeployRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ApplicationRedeployRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ApplicationRedeployRequest' from JSON`, + ); +} diff --git a/src/models/operations/applicationrefreshtoken.ts b/src/models/operations/applicationrefreshtoken.ts new file mode 100644 index 0000000..3a95ca4 --- /dev/null +++ b/src/models/operations/applicationrefreshtoken.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ApplicationRefreshTokenRequest = { + applicationId: string; +}; + +/** @internal */ +export const ApplicationRefreshTokenRequest$inboundSchema: z.ZodType< + ApplicationRefreshTokenRequest, + z.ZodTypeDef, + unknown +> = z.object({ + applicationId: z.string(), +}); + +/** @internal */ +export type ApplicationRefreshTokenRequest$Outbound = { + applicationId: string; +}; + +/** @internal */ +export const ApplicationRefreshTokenRequest$outboundSchema: z.ZodType< + ApplicationRefreshTokenRequest$Outbound, + z.ZodTypeDef, + ApplicationRefreshTokenRequest +> = z.object({ + applicationId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ApplicationRefreshTokenRequest$ { + /** @deprecated use `ApplicationRefreshTokenRequest$inboundSchema` instead. */ + export const inboundSchema = ApplicationRefreshTokenRequest$inboundSchema; + /** @deprecated use `ApplicationRefreshTokenRequest$outboundSchema` instead. */ + export const outboundSchema = ApplicationRefreshTokenRequest$outboundSchema; + /** @deprecated use `ApplicationRefreshTokenRequest$Outbound` instead. */ + export type Outbound = ApplicationRefreshTokenRequest$Outbound; +} + +export function applicationRefreshTokenRequestToJSON( + applicationRefreshTokenRequest: ApplicationRefreshTokenRequest, +): string { + return JSON.stringify( + ApplicationRefreshTokenRequest$outboundSchema.parse( + applicationRefreshTokenRequest, + ), + ); +} + +export function applicationRefreshTokenRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ApplicationRefreshTokenRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ApplicationRefreshTokenRequest' from JSON`, + ); +} diff --git a/src/models/operations/applicationreload.ts b/src/models/operations/applicationreload.ts new file mode 100644 index 0000000..9c0f146 --- /dev/null +++ b/src/models/operations/applicationreload.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ApplicationReloadRequest = { + appName: string; + applicationId: string; +}; + +/** @internal */ +export const ApplicationReloadRequest$inboundSchema: z.ZodType< + ApplicationReloadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + appName: z.string(), + applicationId: z.string(), +}); + +/** @internal */ +export type ApplicationReloadRequest$Outbound = { + appName: string; + applicationId: string; +}; + +/** @internal */ +export const ApplicationReloadRequest$outboundSchema: z.ZodType< + ApplicationReloadRequest$Outbound, + z.ZodTypeDef, + ApplicationReloadRequest +> = z.object({ + appName: z.string(), + applicationId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ApplicationReloadRequest$ { + /** @deprecated use `ApplicationReloadRequest$inboundSchema` instead. */ + export const inboundSchema = ApplicationReloadRequest$inboundSchema; + /** @deprecated use `ApplicationReloadRequest$outboundSchema` instead. */ + export const outboundSchema = ApplicationReloadRequest$outboundSchema; + /** @deprecated use `ApplicationReloadRequest$Outbound` instead. */ + export type Outbound = ApplicationReloadRequest$Outbound; +} + +export function applicationReloadRequestToJSON( + applicationReloadRequest: ApplicationReloadRequest, +): string { + return JSON.stringify( + ApplicationReloadRequest$outboundSchema.parse(applicationReloadRequest), + ); +} + +export function applicationReloadRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ApplicationReloadRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ApplicationReloadRequest' from JSON`, + ); +} diff --git a/src/models/operations/applicationsavebitbucketprovider.ts b/src/models/operations/applicationsavebitbucketprovider.ts new file mode 100644 index 0000000..c520710 --- /dev/null +++ b/src/models/operations/applicationsavebitbucketprovider.ts @@ -0,0 +1,97 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ApplicationSaveBitbucketProviderRequest = { + bitbucketBranch: string | null; + bitbucketBuildPath: string | null; + bitbucketOwner: string | null; + bitbucketRepository: string | null; + bitbucketId: string | null; + applicationId: string; +}; + +/** @internal */ +export const ApplicationSaveBitbucketProviderRequest$inboundSchema: z.ZodType< + ApplicationSaveBitbucketProviderRequest, + z.ZodTypeDef, + unknown +> = z.object({ + bitbucketBranch: z.nullable(z.string()), + bitbucketBuildPath: z.nullable(z.string()), + bitbucketOwner: z.nullable(z.string()), + bitbucketRepository: z.nullable(z.string()), + bitbucketId: z.nullable(z.string()), + applicationId: z.string(), +}); + +/** @internal */ +export type ApplicationSaveBitbucketProviderRequest$Outbound = { + bitbucketBranch: string | null; + bitbucketBuildPath: string | null; + bitbucketOwner: string | null; + bitbucketRepository: string | null; + bitbucketId: string | null; + applicationId: string; +}; + +/** @internal */ +export const ApplicationSaveBitbucketProviderRequest$outboundSchema: z.ZodType< + ApplicationSaveBitbucketProviderRequest$Outbound, + z.ZodTypeDef, + ApplicationSaveBitbucketProviderRequest +> = z.object({ + bitbucketBranch: z.nullable(z.string()), + bitbucketBuildPath: z.nullable(z.string()), + bitbucketOwner: z.nullable(z.string()), + bitbucketRepository: z.nullable(z.string()), + bitbucketId: z.nullable(z.string()), + applicationId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ApplicationSaveBitbucketProviderRequest$ { + /** @deprecated use `ApplicationSaveBitbucketProviderRequest$inboundSchema` instead. */ + export const inboundSchema = + ApplicationSaveBitbucketProviderRequest$inboundSchema; + /** @deprecated use `ApplicationSaveBitbucketProviderRequest$outboundSchema` instead. */ + export const outboundSchema = + ApplicationSaveBitbucketProviderRequest$outboundSchema; + /** @deprecated use `ApplicationSaveBitbucketProviderRequest$Outbound` instead. */ + export type Outbound = ApplicationSaveBitbucketProviderRequest$Outbound; +} + +export function applicationSaveBitbucketProviderRequestToJSON( + applicationSaveBitbucketProviderRequest: + ApplicationSaveBitbucketProviderRequest, +): string { + return JSON.stringify( + ApplicationSaveBitbucketProviderRequest$outboundSchema.parse( + applicationSaveBitbucketProviderRequest, + ), + ); +} + +export function applicationSaveBitbucketProviderRequestFromJSON( + jsonString: string, +): SafeParseResult< + ApplicationSaveBitbucketProviderRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + ApplicationSaveBitbucketProviderRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'ApplicationSaveBitbucketProviderRequest' from JSON`, + ); +} diff --git a/src/models/operations/applicationsavebuildtype.ts b/src/models/operations/applicationsavebuildtype.ts new file mode 100644 index 0000000..384e810 --- /dev/null +++ b/src/models/operations/applicationsavebuildtype.ts @@ -0,0 +1,122 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const ApplicationSaveBuildTypeBuildType = { + Dockerfile: "dockerfile", + HerokuBuildpacks: "heroku_buildpacks", + PaketoBuildpacks: "paketo_buildpacks", + Nixpacks: "nixpacks", + Static: "static", +} as const; +export type ApplicationSaveBuildTypeBuildType = ClosedEnum< + typeof ApplicationSaveBuildTypeBuildType +>; + +export type ApplicationSaveBuildTypeRequest = { + applicationId: string; + buildType: ApplicationSaveBuildTypeBuildType; + dockerfile?: string | null | undefined; + dockerContextPath: string | null; + dockerBuildStage: string | null; + publishDirectory?: string | null | undefined; +}; + +/** @internal */ +export const ApplicationSaveBuildTypeBuildType$inboundSchema: z.ZodNativeEnum< + typeof ApplicationSaveBuildTypeBuildType +> = z.nativeEnum(ApplicationSaveBuildTypeBuildType); + +/** @internal */ +export const ApplicationSaveBuildTypeBuildType$outboundSchema: z.ZodNativeEnum< + typeof ApplicationSaveBuildTypeBuildType +> = ApplicationSaveBuildTypeBuildType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ApplicationSaveBuildTypeBuildType$ { + /** @deprecated use `ApplicationSaveBuildTypeBuildType$inboundSchema` instead. */ + export const inboundSchema = ApplicationSaveBuildTypeBuildType$inboundSchema; + /** @deprecated use `ApplicationSaveBuildTypeBuildType$outboundSchema` instead. */ + export const outboundSchema = + ApplicationSaveBuildTypeBuildType$outboundSchema; +} + +/** @internal */ +export const ApplicationSaveBuildTypeRequest$inboundSchema: z.ZodType< + ApplicationSaveBuildTypeRequest, + z.ZodTypeDef, + unknown +> = z.object({ + applicationId: z.string(), + buildType: ApplicationSaveBuildTypeBuildType$inboundSchema, + dockerfile: z.nullable(z.string()).optional(), + dockerContextPath: z.nullable(z.string()), + dockerBuildStage: z.nullable(z.string()), + publishDirectory: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type ApplicationSaveBuildTypeRequest$Outbound = { + applicationId: string; + buildType: string; + dockerfile?: string | null | undefined; + dockerContextPath: string | null; + dockerBuildStage: string | null; + publishDirectory?: string | null | undefined; +}; + +/** @internal */ +export const ApplicationSaveBuildTypeRequest$outboundSchema: z.ZodType< + ApplicationSaveBuildTypeRequest$Outbound, + z.ZodTypeDef, + ApplicationSaveBuildTypeRequest +> = z.object({ + applicationId: z.string(), + buildType: ApplicationSaveBuildTypeBuildType$outboundSchema, + dockerfile: z.nullable(z.string()).optional(), + dockerContextPath: z.nullable(z.string()), + dockerBuildStage: z.nullable(z.string()), + publishDirectory: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ApplicationSaveBuildTypeRequest$ { + /** @deprecated use `ApplicationSaveBuildTypeRequest$inboundSchema` instead. */ + export const inboundSchema = ApplicationSaveBuildTypeRequest$inboundSchema; + /** @deprecated use `ApplicationSaveBuildTypeRequest$outboundSchema` instead. */ + export const outboundSchema = ApplicationSaveBuildTypeRequest$outboundSchema; + /** @deprecated use `ApplicationSaveBuildTypeRequest$Outbound` instead. */ + export type Outbound = ApplicationSaveBuildTypeRequest$Outbound; +} + +export function applicationSaveBuildTypeRequestToJSON( + applicationSaveBuildTypeRequest: ApplicationSaveBuildTypeRequest, +): string { + return JSON.stringify( + ApplicationSaveBuildTypeRequest$outboundSchema.parse( + applicationSaveBuildTypeRequest, + ), + ); +} + +export function applicationSaveBuildTypeRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ApplicationSaveBuildTypeRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ApplicationSaveBuildTypeRequest' from JSON`, + ); +} diff --git a/src/models/operations/applicationsavedockerprovider.ts b/src/models/operations/applicationsavedockerprovider.ts new file mode 100644 index 0000000..a503f4c --- /dev/null +++ b/src/models/operations/applicationsavedockerprovider.ts @@ -0,0 +1,83 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ApplicationSaveDockerProviderRequest = { + dockerImage?: string | null | undefined; + applicationId: string; + username?: string | null | undefined; + password?: string | null | undefined; +}; + +/** @internal */ +export const ApplicationSaveDockerProviderRequest$inboundSchema: z.ZodType< + ApplicationSaveDockerProviderRequest, + z.ZodTypeDef, + unknown +> = z.object({ + dockerImage: z.nullable(z.string()).optional(), + applicationId: z.string(), + username: z.nullable(z.string()).optional(), + password: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type ApplicationSaveDockerProviderRequest$Outbound = { + dockerImage?: string | null | undefined; + applicationId: string; + username?: string | null | undefined; + password?: string | null | undefined; +}; + +/** @internal */ +export const ApplicationSaveDockerProviderRequest$outboundSchema: z.ZodType< + ApplicationSaveDockerProviderRequest$Outbound, + z.ZodTypeDef, + ApplicationSaveDockerProviderRequest +> = z.object({ + dockerImage: z.nullable(z.string()).optional(), + applicationId: z.string(), + username: z.nullable(z.string()).optional(), + password: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ApplicationSaveDockerProviderRequest$ { + /** @deprecated use `ApplicationSaveDockerProviderRequest$inboundSchema` instead. */ + export const inboundSchema = + ApplicationSaveDockerProviderRequest$inboundSchema; + /** @deprecated use `ApplicationSaveDockerProviderRequest$outboundSchema` instead. */ + export const outboundSchema = + ApplicationSaveDockerProviderRequest$outboundSchema; + /** @deprecated use `ApplicationSaveDockerProviderRequest$Outbound` instead. */ + export type Outbound = ApplicationSaveDockerProviderRequest$Outbound; +} + +export function applicationSaveDockerProviderRequestToJSON( + applicationSaveDockerProviderRequest: ApplicationSaveDockerProviderRequest, +): string { + return JSON.stringify( + ApplicationSaveDockerProviderRequest$outboundSchema.parse( + applicationSaveDockerProviderRequest, + ), + ); +} + +export function applicationSaveDockerProviderRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + ApplicationSaveDockerProviderRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ApplicationSaveDockerProviderRequest' from JSON`, + ); +} diff --git a/src/models/operations/applicationsaveenvironment.ts b/src/models/operations/applicationsaveenvironment.ts new file mode 100644 index 0000000..34ae9ab --- /dev/null +++ b/src/models/operations/applicationsaveenvironment.ts @@ -0,0 +1,77 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ApplicationSaveEnvironmentRequest = { + applicationId: string; + env?: string | null | undefined; + buildArgs?: string | null | undefined; +}; + +/** @internal */ +export const ApplicationSaveEnvironmentRequest$inboundSchema: z.ZodType< + ApplicationSaveEnvironmentRequest, + z.ZodTypeDef, + unknown +> = z.object({ + applicationId: z.string(), + env: z.nullable(z.string()).optional(), + buildArgs: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type ApplicationSaveEnvironmentRequest$Outbound = { + applicationId: string; + env?: string | null | undefined; + buildArgs?: string | null | undefined; +}; + +/** @internal */ +export const ApplicationSaveEnvironmentRequest$outboundSchema: z.ZodType< + ApplicationSaveEnvironmentRequest$Outbound, + z.ZodTypeDef, + ApplicationSaveEnvironmentRequest +> = z.object({ + applicationId: z.string(), + env: z.nullable(z.string()).optional(), + buildArgs: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ApplicationSaveEnvironmentRequest$ { + /** @deprecated use `ApplicationSaveEnvironmentRequest$inboundSchema` instead. */ + export const inboundSchema = ApplicationSaveEnvironmentRequest$inboundSchema; + /** @deprecated use `ApplicationSaveEnvironmentRequest$outboundSchema` instead. */ + export const outboundSchema = + ApplicationSaveEnvironmentRequest$outboundSchema; + /** @deprecated use `ApplicationSaveEnvironmentRequest$Outbound` instead. */ + export type Outbound = ApplicationSaveEnvironmentRequest$Outbound; +} + +export function applicationSaveEnvironmentRequestToJSON( + applicationSaveEnvironmentRequest: ApplicationSaveEnvironmentRequest, +): string { + return JSON.stringify( + ApplicationSaveEnvironmentRequest$outboundSchema.parse( + applicationSaveEnvironmentRequest, + ), + ); +} + +export function applicationSaveEnvironmentRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ApplicationSaveEnvironmentRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ApplicationSaveEnvironmentRequest' from JSON`, + ); +} diff --git a/src/models/operations/applicationsavegithubprovider.ts b/src/models/operations/applicationsavegithubprovider.ts new file mode 100644 index 0000000..8eb0152 --- /dev/null +++ b/src/models/operations/applicationsavegithubprovider.ts @@ -0,0 +1,91 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ApplicationSaveGithubProviderRequest = { + applicationId: string; + repository?: string | null | undefined; + branch?: string | null | undefined; + owner: string | null; + buildPath?: string | null | undefined; + githubId: string | null; +}; + +/** @internal */ +export const ApplicationSaveGithubProviderRequest$inboundSchema: z.ZodType< + ApplicationSaveGithubProviderRequest, + z.ZodTypeDef, + unknown +> = z.object({ + applicationId: z.string(), + repository: z.nullable(z.string()).optional(), + branch: z.nullable(z.string()).optional(), + owner: z.nullable(z.string()), + buildPath: z.nullable(z.string()).optional(), + githubId: z.nullable(z.string()), +}); + +/** @internal */ +export type ApplicationSaveGithubProviderRequest$Outbound = { + applicationId: string; + repository?: string | null | undefined; + branch?: string | null | undefined; + owner: string | null; + buildPath?: string | null | undefined; + githubId: string | null; +}; + +/** @internal */ +export const ApplicationSaveGithubProviderRequest$outboundSchema: z.ZodType< + ApplicationSaveGithubProviderRequest$Outbound, + z.ZodTypeDef, + ApplicationSaveGithubProviderRequest +> = z.object({ + applicationId: z.string(), + repository: z.nullable(z.string()).optional(), + branch: z.nullable(z.string()).optional(), + owner: z.nullable(z.string()), + buildPath: z.nullable(z.string()).optional(), + githubId: z.nullable(z.string()), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ApplicationSaveGithubProviderRequest$ { + /** @deprecated use `ApplicationSaveGithubProviderRequest$inboundSchema` instead. */ + export const inboundSchema = + ApplicationSaveGithubProviderRequest$inboundSchema; + /** @deprecated use `ApplicationSaveGithubProviderRequest$outboundSchema` instead. */ + export const outboundSchema = + ApplicationSaveGithubProviderRequest$outboundSchema; + /** @deprecated use `ApplicationSaveGithubProviderRequest$Outbound` instead. */ + export type Outbound = ApplicationSaveGithubProviderRequest$Outbound; +} + +export function applicationSaveGithubProviderRequestToJSON( + applicationSaveGithubProviderRequest: ApplicationSaveGithubProviderRequest, +): string { + return JSON.stringify( + ApplicationSaveGithubProviderRequest$outboundSchema.parse( + applicationSaveGithubProviderRequest, + ), + ); +} + +export function applicationSaveGithubProviderRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + ApplicationSaveGithubProviderRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ApplicationSaveGithubProviderRequest' from JSON`, + ); +} diff --git a/src/models/operations/applicationsavegitlabprovider.ts b/src/models/operations/applicationsavegitlabprovider.ts new file mode 100644 index 0000000..075c83d --- /dev/null +++ b/src/models/operations/applicationsavegitlabprovider.ts @@ -0,0 +1,99 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ApplicationSaveGitlabProviderRequest = { + applicationId: string; + gitlabBranch: string | null; + gitlabBuildPath: string | null; + gitlabOwner: string | null; + gitlabRepository: string | null; + gitlabId: string | null; + gitlabProjectId: number | null; + gitlabPathNamespace: string | null; +}; + +/** @internal */ +export const ApplicationSaveGitlabProviderRequest$inboundSchema: z.ZodType< + ApplicationSaveGitlabProviderRequest, + z.ZodTypeDef, + unknown +> = z.object({ + applicationId: z.string(), + gitlabBranch: z.nullable(z.string()), + gitlabBuildPath: z.nullable(z.string()), + gitlabOwner: z.nullable(z.string()), + gitlabRepository: z.nullable(z.string()), + gitlabId: z.nullable(z.string()), + gitlabProjectId: z.nullable(z.number()), + gitlabPathNamespace: z.nullable(z.string()), +}); + +/** @internal */ +export type ApplicationSaveGitlabProviderRequest$Outbound = { + applicationId: string; + gitlabBranch: string | null; + gitlabBuildPath: string | null; + gitlabOwner: string | null; + gitlabRepository: string | null; + gitlabId: string | null; + gitlabProjectId: number | null; + gitlabPathNamespace: string | null; +}; + +/** @internal */ +export const ApplicationSaveGitlabProviderRequest$outboundSchema: z.ZodType< + ApplicationSaveGitlabProviderRequest$Outbound, + z.ZodTypeDef, + ApplicationSaveGitlabProviderRequest +> = z.object({ + applicationId: z.string(), + gitlabBranch: z.nullable(z.string()), + gitlabBuildPath: z.nullable(z.string()), + gitlabOwner: z.nullable(z.string()), + gitlabRepository: z.nullable(z.string()), + gitlabId: z.nullable(z.string()), + gitlabProjectId: z.nullable(z.number()), + gitlabPathNamespace: z.nullable(z.string()), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ApplicationSaveGitlabProviderRequest$ { + /** @deprecated use `ApplicationSaveGitlabProviderRequest$inboundSchema` instead. */ + export const inboundSchema = + ApplicationSaveGitlabProviderRequest$inboundSchema; + /** @deprecated use `ApplicationSaveGitlabProviderRequest$outboundSchema` instead. */ + export const outboundSchema = + ApplicationSaveGitlabProviderRequest$outboundSchema; + /** @deprecated use `ApplicationSaveGitlabProviderRequest$Outbound` instead. */ + export type Outbound = ApplicationSaveGitlabProviderRequest$Outbound; +} + +export function applicationSaveGitlabProviderRequestToJSON( + applicationSaveGitlabProviderRequest: ApplicationSaveGitlabProviderRequest, +): string { + return JSON.stringify( + ApplicationSaveGitlabProviderRequest$outboundSchema.parse( + applicationSaveGitlabProviderRequest, + ), + ); +} + +export function applicationSaveGitlabProviderRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + ApplicationSaveGitlabProviderRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ApplicationSaveGitlabProviderRequest' from JSON`, + ); +} diff --git a/src/models/operations/applicationsavegitprodiver.ts b/src/models/operations/applicationsavegitprodiver.ts new file mode 100644 index 0000000..17e4134 --- /dev/null +++ b/src/models/operations/applicationsavegitprodiver.ts @@ -0,0 +1,85 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ApplicationSaveGitProdiverRequest = { + customGitBranch?: string | null | undefined; + applicationId: string; + customGitBuildPath?: string | null | undefined; + customGitUrl?: string | null | undefined; + customGitSSHKeyId?: string | null | undefined; +}; + +/** @internal */ +export const ApplicationSaveGitProdiverRequest$inboundSchema: z.ZodType< + ApplicationSaveGitProdiverRequest, + z.ZodTypeDef, + unknown +> = z.object({ + customGitBranch: z.nullable(z.string()).optional(), + applicationId: z.string(), + customGitBuildPath: z.nullable(z.string()).optional(), + customGitUrl: z.nullable(z.string()).optional(), + customGitSSHKeyId: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type ApplicationSaveGitProdiverRequest$Outbound = { + customGitBranch?: string | null | undefined; + applicationId: string; + customGitBuildPath?: string | null | undefined; + customGitUrl?: string | null | undefined; + customGitSSHKeyId?: string | null | undefined; +}; + +/** @internal */ +export const ApplicationSaveGitProdiverRequest$outboundSchema: z.ZodType< + ApplicationSaveGitProdiverRequest$Outbound, + z.ZodTypeDef, + ApplicationSaveGitProdiverRequest +> = z.object({ + customGitBranch: z.nullable(z.string()).optional(), + applicationId: z.string(), + customGitBuildPath: z.nullable(z.string()).optional(), + customGitUrl: z.nullable(z.string()).optional(), + customGitSSHKeyId: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ApplicationSaveGitProdiverRequest$ { + /** @deprecated use `ApplicationSaveGitProdiverRequest$inboundSchema` instead. */ + export const inboundSchema = ApplicationSaveGitProdiverRequest$inboundSchema; + /** @deprecated use `ApplicationSaveGitProdiverRequest$outboundSchema` instead. */ + export const outboundSchema = + ApplicationSaveGitProdiverRequest$outboundSchema; + /** @deprecated use `ApplicationSaveGitProdiverRequest$Outbound` instead. */ + export type Outbound = ApplicationSaveGitProdiverRequest$Outbound; +} + +export function applicationSaveGitProdiverRequestToJSON( + applicationSaveGitProdiverRequest: ApplicationSaveGitProdiverRequest, +): string { + return JSON.stringify( + ApplicationSaveGitProdiverRequest$outboundSchema.parse( + applicationSaveGitProdiverRequest, + ), + ); +} + +export function applicationSaveGitProdiverRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ApplicationSaveGitProdiverRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ApplicationSaveGitProdiverRequest' from JSON`, + ); +} diff --git a/src/models/operations/applicationstart.ts b/src/models/operations/applicationstart.ts new file mode 100644 index 0000000..c7ceacc --- /dev/null +++ b/src/models/operations/applicationstart.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ApplicationStartRequest = { + applicationId: string; +}; + +/** @internal */ +export const ApplicationStartRequest$inboundSchema: z.ZodType< + ApplicationStartRequest, + z.ZodTypeDef, + unknown +> = z.object({ + applicationId: z.string(), +}); + +/** @internal */ +export type ApplicationStartRequest$Outbound = { + applicationId: string; +}; + +/** @internal */ +export const ApplicationStartRequest$outboundSchema: z.ZodType< + ApplicationStartRequest$Outbound, + z.ZodTypeDef, + ApplicationStartRequest +> = z.object({ + applicationId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ApplicationStartRequest$ { + /** @deprecated use `ApplicationStartRequest$inboundSchema` instead. */ + export const inboundSchema = ApplicationStartRequest$inboundSchema; + /** @deprecated use `ApplicationStartRequest$outboundSchema` instead. */ + export const outboundSchema = ApplicationStartRequest$outboundSchema; + /** @deprecated use `ApplicationStartRequest$Outbound` instead. */ + export type Outbound = ApplicationStartRequest$Outbound; +} + +export function applicationStartRequestToJSON( + applicationStartRequest: ApplicationStartRequest, +): string { + return JSON.stringify( + ApplicationStartRequest$outboundSchema.parse(applicationStartRequest), + ); +} + +export function applicationStartRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ApplicationStartRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ApplicationStartRequest' from JSON`, + ); +} diff --git a/src/models/operations/applicationstop.ts b/src/models/operations/applicationstop.ts new file mode 100644 index 0000000..f3c9166 --- /dev/null +++ b/src/models/operations/applicationstop.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ApplicationStopRequest = { + applicationId: string; +}; + +/** @internal */ +export const ApplicationStopRequest$inboundSchema: z.ZodType< + ApplicationStopRequest, + z.ZodTypeDef, + unknown +> = z.object({ + applicationId: z.string(), +}); + +/** @internal */ +export type ApplicationStopRequest$Outbound = { + applicationId: string; +}; + +/** @internal */ +export const ApplicationStopRequest$outboundSchema: z.ZodType< + ApplicationStopRequest$Outbound, + z.ZodTypeDef, + ApplicationStopRequest +> = z.object({ + applicationId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ApplicationStopRequest$ { + /** @deprecated use `ApplicationStopRequest$inboundSchema` instead. */ + export const inboundSchema = ApplicationStopRequest$inboundSchema; + /** @deprecated use `ApplicationStopRequest$outboundSchema` instead. */ + export const outboundSchema = ApplicationStopRequest$outboundSchema; + /** @deprecated use `ApplicationStopRequest$Outbound` instead. */ + export type Outbound = ApplicationStopRequest$Outbound; +} + +export function applicationStopRequestToJSON( + applicationStopRequest: ApplicationStopRequest, +): string { + return JSON.stringify( + ApplicationStopRequest$outboundSchema.parse(applicationStopRequest), + ); +} + +export function applicationStopRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ApplicationStopRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ApplicationStopRequest' from JSON`, + ); +} diff --git a/src/models/operations/applicationupdate.ts b/src/models/operations/applicationupdate.ts new file mode 100644 index 0000000..06661a3 --- /dev/null +++ b/src/models/operations/applicationupdate.ts @@ -0,0 +1,1469 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const ApplicationUpdateSourceType = { + Github: "github", + Docker: "docker", + Git: "git", +} as const; +export type ApplicationUpdateSourceType = ClosedEnum< + typeof ApplicationUpdateSourceType +>; + +export type HealthCheckSwarm = { + test?: Array | undefined; + interval?: number | undefined; + timeout?: number | undefined; + startPeriod?: number | undefined; + retries?: number | undefined; +}; + +export type RestartPolicySwarm = { + condition?: string | undefined; + delay?: number | undefined; + maxAttempts?: number | undefined; + window?: number | undefined; +}; + +export type Spread = { + spreadDescriptor: string; +}; + +export type Preference = { + spread: Spread; +}; + +export type Platform = { + architecture: string; + os: string; +}; + +export type PlacementSwarm = { + constraints?: Array | undefined; + preferences?: Array | undefined; + maxReplicas?: number | undefined; + platforms?: Array | undefined; +}; + +export type UpdateConfigSwarm = { + parallelism: number; + delay?: number | undefined; + failureAction?: string | undefined; + monitor?: number | undefined; + maxFailureRatio?: number | undefined; + order: string; +}; + +export type RollbackConfigSwarm = { + parallelism: number; + delay?: number | undefined; + failureAction?: string | undefined; + monitor?: number | undefined; + maxFailureRatio?: number | undefined; + order: string; +}; + +export type Replicated = { + replicas?: number | undefined; +}; + +export type Global = {}; + +export type ReplicatedJob = { + maxConcurrent?: number | undefined; + totalCompletions?: number | undefined; +}; + +export type GlobalJob = {}; + +export type ModeSwarm = { + replicated?: Replicated | undefined; + global?: Global | undefined; + replicatedJob?: ReplicatedJob | undefined; + globalJob?: GlobalJob | undefined; +}; + +export type DriverOpts = {}; + +export type NetworkSwarm = { + target?: string | undefined; + aliases?: Array | undefined; + driverOpts?: DriverOpts | undefined; +}; + +export const ApplicationUpdateApplicationStatus = { + Idle: "idle", + Running: "running", + Done: "done", + Error: "error", +} as const; +export type ApplicationUpdateApplicationStatus = ClosedEnum< + typeof ApplicationUpdateApplicationStatus +>; + +export const ApplicationUpdateBuildType = { + Dockerfile: "dockerfile", + HerokuBuildpacks: "heroku_buildpacks", + PaketoBuildpacks: "paketo_buildpacks", + Nixpacks: "nixpacks", + Static: "static", +} as const; +export type ApplicationUpdateBuildType = ClosedEnum< + typeof ApplicationUpdateBuildType +>; + +export type ApplicationUpdateRequest = { + applicationId: string; + name?: string | undefined; + appName?: string | undefined; + description?: string | null | undefined; + env?: string | null | undefined; + buildArgs?: string | null | undefined; + memoryReservation?: number | null | undefined; + memoryLimit?: number | null | undefined; + cpuReservation?: number | null | undefined; + cpuLimit?: number | null | undefined; + title?: string | null | undefined; + enabled?: boolean | null | undefined; + subtitle?: string | null | undefined; + command?: string | null | undefined; + refreshToken?: string | null | undefined; + sourceType?: ApplicationUpdateSourceType | undefined; + repository?: string | null | undefined; + owner?: string | null | undefined; + branch?: string | null | undefined; + buildPath?: string | null | undefined; + autoDeploy?: boolean | null | undefined; + gitlabProjectId?: number | null | undefined; + gitlabRepository?: string | null | undefined; + gitlabOwner?: string | null | undefined; + gitlabBranch?: string | null | undefined; + gitlabBuildPath?: string | null | undefined; + gitlabPathNamespace?: string | null | undefined; + bitbucketRepository?: string | null | undefined; + bitbucketOwner?: string | null | undefined; + bitbucketBranch?: string | null | undefined; + bitbucketBuildPath?: string | null | undefined; + username?: string | null | undefined; + password?: string | null | undefined; + dockerImage?: string | null | undefined; + customGitUrl?: string | null | undefined; + customGitBranch?: string | null | undefined; + customGitBuildPath?: string | null | undefined; + customGitSSHKeyId?: string | null | undefined; + dockerfile?: string | null | undefined; + dockerContextPath?: string | null | undefined; + dockerBuildStage?: string | null | undefined; + dropBuildPath?: string | null | undefined; + healthCheckSwarm?: HealthCheckSwarm | null | undefined; + restartPolicySwarm?: RestartPolicySwarm | null | undefined; + placementSwarm?: PlacementSwarm | null | undefined; + updateConfigSwarm?: UpdateConfigSwarm | null | undefined; + rollbackConfigSwarm?: RollbackConfigSwarm | null | undefined; + modeSwarm?: ModeSwarm | null | undefined; + labelsSwarm?: { [k: string]: string } | null | undefined; + networkSwarm?: Array | null | undefined; + replicas?: number | undefined; + applicationStatus?: ApplicationUpdateApplicationStatus | undefined; + buildType?: ApplicationUpdateBuildType | undefined; + publishDirectory?: string | null | undefined; + createdAt?: string | undefined; + registryId?: string | null | undefined; + projectId?: string | undefined; + githubId?: string | null | undefined; + gitlabId?: string | null | undefined; + bitbucketId?: string | null | undefined; +}; + +/** @internal */ +export const ApplicationUpdateSourceType$inboundSchema: z.ZodNativeEnum< + typeof ApplicationUpdateSourceType +> = z.nativeEnum(ApplicationUpdateSourceType); + +/** @internal */ +export const ApplicationUpdateSourceType$outboundSchema: z.ZodNativeEnum< + typeof ApplicationUpdateSourceType +> = ApplicationUpdateSourceType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ApplicationUpdateSourceType$ { + /** @deprecated use `ApplicationUpdateSourceType$inboundSchema` instead. */ + export const inboundSchema = ApplicationUpdateSourceType$inboundSchema; + /** @deprecated use `ApplicationUpdateSourceType$outboundSchema` instead. */ + export const outboundSchema = ApplicationUpdateSourceType$outboundSchema; +} + +/** @internal */ +export const HealthCheckSwarm$inboundSchema: z.ZodType< + HealthCheckSwarm, + z.ZodTypeDef, + unknown +> = z.object({ + Test: z.array(z.string()).optional(), + Interval: z.number().optional(), + Timeout: z.number().optional(), + StartPeriod: z.number().optional(), + Retries: z.number().optional(), +}).transform((v) => { + return remap$(v, { + "Test": "test", + "Interval": "interval", + "Timeout": "timeout", + "StartPeriod": "startPeriod", + "Retries": "retries", + }); +}); + +/** @internal */ +export type HealthCheckSwarm$Outbound = { + Test?: Array | undefined; + Interval?: number | undefined; + Timeout?: number | undefined; + StartPeriod?: number | undefined; + Retries?: number | undefined; +}; + +/** @internal */ +export const HealthCheckSwarm$outboundSchema: z.ZodType< + HealthCheckSwarm$Outbound, + z.ZodTypeDef, + HealthCheckSwarm +> = z.object({ + test: z.array(z.string()).optional(), + interval: z.number().optional(), + timeout: z.number().optional(), + startPeriod: z.number().optional(), + retries: z.number().optional(), +}).transform((v) => { + return remap$(v, { + test: "Test", + interval: "Interval", + timeout: "Timeout", + startPeriod: "StartPeriod", + retries: "Retries", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace HealthCheckSwarm$ { + /** @deprecated use `HealthCheckSwarm$inboundSchema` instead. */ + export const inboundSchema = HealthCheckSwarm$inboundSchema; + /** @deprecated use `HealthCheckSwarm$outboundSchema` instead. */ + export const outboundSchema = HealthCheckSwarm$outboundSchema; + /** @deprecated use `HealthCheckSwarm$Outbound` instead. */ + export type Outbound = HealthCheckSwarm$Outbound; +} + +export function healthCheckSwarmToJSON( + healthCheckSwarm: HealthCheckSwarm, +): string { + return JSON.stringify( + HealthCheckSwarm$outboundSchema.parse(healthCheckSwarm), + ); +} + +export function healthCheckSwarmFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => HealthCheckSwarm$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'HealthCheckSwarm' from JSON`, + ); +} + +/** @internal */ +export const RestartPolicySwarm$inboundSchema: z.ZodType< + RestartPolicySwarm, + z.ZodTypeDef, + unknown +> = z.object({ + Condition: z.string().optional(), + Delay: z.number().optional(), + MaxAttempts: z.number().optional(), + Window: z.number().optional(), +}).transform((v) => { + return remap$(v, { + "Condition": "condition", + "Delay": "delay", + "MaxAttempts": "maxAttempts", + "Window": "window", + }); +}); + +/** @internal */ +export type RestartPolicySwarm$Outbound = { + Condition?: string | undefined; + Delay?: number | undefined; + MaxAttempts?: number | undefined; + Window?: number | undefined; +}; + +/** @internal */ +export const RestartPolicySwarm$outboundSchema: z.ZodType< + RestartPolicySwarm$Outbound, + z.ZodTypeDef, + RestartPolicySwarm +> = z.object({ + condition: z.string().optional(), + delay: z.number().optional(), + maxAttempts: z.number().optional(), + window: z.number().optional(), +}).transform((v) => { + return remap$(v, { + condition: "Condition", + delay: "Delay", + maxAttempts: "MaxAttempts", + window: "Window", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RestartPolicySwarm$ { + /** @deprecated use `RestartPolicySwarm$inboundSchema` instead. */ + export const inboundSchema = RestartPolicySwarm$inboundSchema; + /** @deprecated use `RestartPolicySwarm$outboundSchema` instead. */ + export const outboundSchema = RestartPolicySwarm$outboundSchema; + /** @deprecated use `RestartPolicySwarm$Outbound` instead. */ + export type Outbound = RestartPolicySwarm$Outbound; +} + +export function restartPolicySwarmToJSON( + restartPolicySwarm: RestartPolicySwarm, +): string { + return JSON.stringify( + RestartPolicySwarm$outboundSchema.parse(restartPolicySwarm), + ); +} + +export function restartPolicySwarmFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RestartPolicySwarm$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RestartPolicySwarm' from JSON`, + ); +} + +/** @internal */ +export const Spread$inboundSchema: z.ZodType = z + .object({ + SpreadDescriptor: z.string(), + }).transform((v) => { + return remap$(v, { + "SpreadDescriptor": "spreadDescriptor", + }); + }); + +/** @internal */ +export type Spread$Outbound = { + SpreadDescriptor: string; +}; + +/** @internal */ +export const Spread$outboundSchema: z.ZodType< + Spread$Outbound, + z.ZodTypeDef, + Spread +> = z.object({ + spreadDescriptor: z.string(), +}).transform((v) => { + return remap$(v, { + spreadDescriptor: "SpreadDescriptor", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Spread$ { + /** @deprecated use `Spread$inboundSchema` instead. */ + export const inboundSchema = Spread$inboundSchema; + /** @deprecated use `Spread$outboundSchema` instead. */ + export const outboundSchema = Spread$outboundSchema; + /** @deprecated use `Spread$Outbound` instead. */ + export type Outbound = Spread$Outbound; +} + +export function spreadToJSON(spread: Spread): string { + return JSON.stringify(Spread$outboundSchema.parse(spread)); +} + +export function spreadFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Spread$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Spread' from JSON`, + ); +} + +/** @internal */ +export const Preference$inboundSchema: z.ZodType< + Preference, + z.ZodTypeDef, + unknown +> = z.object({ + Spread: z.lazy(() => Spread$inboundSchema), +}).transform((v) => { + return remap$(v, { + "Spread": "spread", + }); +}); + +/** @internal */ +export type Preference$Outbound = { + Spread: Spread$Outbound; +}; + +/** @internal */ +export const Preference$outboundSchema: z.ZodType< + Preference$Outbound, + z.ZodTypeDef, + Preference +> = z.object({ + spread: z.lazy(() => Spread$outboundSchema), +}).transform((v) => { + return remap$(v, { + spread: "Spread", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Preference$ { + /** @deprecated use `Preference$inboundSchema` instead. */ + export const inboundSchema = Preference$inboundSchema; + /** @deprecated use `Preference$outboundSchema` instead. */ + export const outboundSchema = Preference$outboundSchema; + /** @deprecated use `Preference$Outbound` instead. */ + export type Outbound = Preference$Outbound; +} + +export function preferenceToJSON(preference: Preference): string { + return JSON.stringify(Preference$outboundSchema.parse(preference)); +} + +export function preferenceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Preference$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Preference' from JSON`, + ); +} + +/** @internal */ +export const Platform$inboundSchema: z.ZodType< + Platform, + z.ZodTypeDef, + unknown +> = z.object({ + Architecture: z.string(), + OS: z.string(), +}).transform((v) => { + return remap$(v, { + "Architecture": "architecture", + "OS": "os", + }); +}); + +/** @internal */ +export type Platform$Outbound = { + Architecture: string; + OS: string; +}; + +/** @internal */ +export const Platform$outboundSchema: z.ZodType< + Platform$Outbound, + z.ZodTypeDef, + Platform +> = z.object({ + architecture: z.string(), + os: z.string(), +}).transform((v) => { + return remap$(v, { + architecture: "Architecture", + os: "OS", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Platform$ { + /** @deprecated use `Platform$inboundSchema` instead. */ + export const inboundSchema = Platform$inboundSchema; + /** @deprecated use `Platform$outboundSchema` instead. */ + export const outboundSchema = Platform$outboundSchema; + /** @deprecated use `Platform$Outbound` instead. */ + export type Outbound = Platform$Outbound; +} + +export function platformToJSON(platform: Platform): string { + return JSON.stringify(Platform$outboundSchema.parse(platform)); +} + +export function platformFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Platform$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Platform' from JSON`, + ); +} + +/** @internal */ +export const PlacementSwarm$inboundSchema: z.ZodType< + PlacementSwarm, + z.ZodTypeDef, + unknown +> = z.object({ + Constraints: z.array(z.string()).optional(), + Preferences: z.array(z.lazy(() => Preference$inboundSchema)).optional(), + MaxReplicas: z.number().optional(), + Platforms: z.array(z.lazy(() => Platform$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "Constraints": "constraints", + "Preferences": "preferences", + "MaxReplicas": "maxReplicas", + "Platforms": "platforms", + }); +}); + +/** @internal */ +export type PlacementSwarm$Outbound = { + Constraints?: Array | undefined; + Preferences?: Array | undefined; + MaxReplicas?: number | undefined; + Platforms?: Array | undefined; +}; + +/** @internal */ +export const PlacementSwarm$outboundSchema: z.ZodType< + PlacementSwarm$Outbound, + z.ZodTypeDef, + PlacementSwarm +> = z.object({ + constraints: z.array(z.string()).optional(), + preferences: z.array(z.lazy(() => Preference$outboundSchema)).optional(), + maxReplicas: z.number().optional(), + platforms: z.array(z.lazy(() => Platform$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + constraints: "Constraints", + preferences: "Preferences", + maxReplicas: "MaxReplicas", + platforms: "Platforms", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PlacementSwarm$ { + /** @deprecated use `PlacementSwarm$inboundSchema` instead. */ + export const inboundSchema = PlacementSwarm$inboundSchema; + /** @deprecated use `PlacementSwarm$outboundSchema` instead. */ + export const outboundSchema = PlacementSwarm$outboundSchema; + /** @deprecated use `PlacementSwarm$Outbound` instead. */ + export type Outbound = PlacementSwarm$Outbound; +} + +export function placementSwarmToJSON(placementSwarm: PlacementSwarm): string { + return JSON.stringify(PlacementSwarm$outboundSchema.parse(placementSwarm)); +} + +export function placementSwarmFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlacementSwarm$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlacementSwarm' from JSON`, + ); +} + +/** @internal */ +export const UpdateConfigSwarm$inboundSchema: z.ZodType< + UpdateConfigSwarm, + z.ZodTypeDef, + unknown +> = z.object({ + Parallelism: z.number(), + Delay: z.number().optional(), + FailureAction: z.string().optional(), + Monitor: z.number().optional(), + MaxFailureRatio: z.number().optional(), + Order: z.string(), +}).transform((v) => { + return remap$(v, { + "Parallelism": "parallelism", + "Delay": "delay", + "FailureAction": "failureAction", + "Monitor": "monitor", + "MaxFailureRatio": "maxFailureRatio", + "Order": "order", + }); +}); + +/** @internal */ +export type UpdateConfigSwarm$Outbound = { + Parallelism: number; + Delay?: number | undefined; + FailureAction?: string | undefined; + Monitor?: number | undefined; + MaxFailureRatio?: number | undefined; + Order: string; +}; + +/** @internal */ +export const UpdateConfigSwarm$outboundSchema: z.ZodType< + UpdateConfigSwarm$Outbound, + z.ZodTypeDef, + UpdateConfigSwarm +> = z.object({ + parallelism: z.number(), + delay: z.number().optional(), + failureAction: z.string().optional(), + monitor: z.number().optional(), + maxFailureRatio: z.number().optional(), + order: z.string(), +}).transform((v) => { + return remap$(v, { + parallelism: "Parallelism", + delay: "Delay", + failureAction: "FailureAction", + monitor: "Monitor", + maxFailureRatio: "MaxFailureRatio", + order: "Order", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateConfigSwarm$ { + /** @deprecated use `UpdateConfigSwarm$inboundSchema` instead. */ + export const inboundSchema = UpdateConfigSwarm$inboundSchema; + /** @deprecated use `UpdateConfigSwarm$outboundSchema` instead. */ + export const outboundSchema = UpdateConfigSwarm$outboundSchema; + /** @deprecated use `UpdateConfigSwarm$Outbound` instead. */ + export type Outbound = UpdateConfigSwarm$Outbound; +} + +export function updateConfigSwarmToJSON( + updateConfigSwarm: UpdateConfigSwarm, +): string { + return JSON.stringify( + UpdateConfigSwarm$outboundSchema.parse(updateConfigSwarm), + ); +} + +export function updateConfigSwarmFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateConfigSwarm$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateConfigSwarm' from JSON`, + ); +} + +/** @internal */ +export const RollbackConfigSwarm$inboundSchema: z.ZodType< + RollbackConfigSwarm, + z.ZodTypeDef, + unknown +> = z.object({ + Parallelism: z.number(), + Delay: z.number().optional(), + FailureAction: z.string().optional(), + Monitor: z.number().optional(), + MaxFailureRatio: z.number().optional(), + Order: z.string(), +}).transform((v) => { + return remap$(v, { + "Parallelism": "parallelism", + "Delay": "delay", + "FailureAction": "failureAction", + "Monitor": "monitor", + "MaxFailureRatio": "maxFailureRatio", + "Order": "order", + }); +}); + +/** @internal */ +export type RollbackConfigSwarm$Outbound = { + Parallelism: number; + Delay?: number | undefined; + FailureAction?: string | undefined; + Monitor?: number | undefined; + MaxFailureRatio?: number | undefined; + Order: string; +}; + +/** @internal */ +export const RollbackConfigSwarm$outboundSchema: z.ZodType< + RollbackConfigSwarm$Outbound, + z.ZodTypeDef, + RollbackConfigSwarm +> = z.object({ + parallelism: z.number(), + delay: z.number().optional(), + failureAction: z.string().optional(), + monitor: z.number().optional(), + maxFailureRatio: z.number().optional(), + order: z.string(), +}).transform((v) => { + return remap$(v, { + parallelism: "Parallelism", + delay: "Delay", + failureAction: "FailureAction", + monitor: "Monitor", + maxFailureRatio: "MaxFailureRatio", + order: "Order", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RollbackConfigSwarm$ { + /** @deprecated use `RollbackConfigSwarm$inboundSchema` instead. */ + export const inboundSchema = RollbackConfigSwarm$inboundSchema; + /** @deprecated use `RollbackConfigSwarm$outboundSchema` instead. */ + export const outboundSchema = RollbackConfigSwarm$outboundSchema; + /** @deprecated use `RollbackConfigSwarm$Outbound` instead. */ + export type Outbound = RollbackConfigSwarm$Outbound; +} + +export function rollbackConfigSwarmToJSON( + rollbackConfigSwarm: RollbackConfigSwarm, +): string { + return JSON.stringify( + RollbackConfigSwarm$outboundSchema.parse(rollbackConfigSwarm), + ); +} + +export function rollbackConfigSwarmFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RollbackConfigSwarm$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RollbackConfigSwarm' from JSON`, + ); +} + +/** @internal */ +export const Replicated$inboundSchema: z.ZodType< + Replicated, + z.ZodTypeDef, + unknown +> = z.object({ + Replicas: z.number().optional(), +}).transform((v) => { + return remap$(v, { + "Replicas": "replicas", + }); +}); + +/** @internal */ +export type Replicated$Outbound = { + Replicas?: number | undefined; +}; + +/** @internal */ +export const Replicated$outboundSchema: z.ZodType< + Replicated$Outbound, + z.ZodTypeDef, + Replicated +> = z.object({ + replicas: z.number().optional(), +}).transform((v) => { + return remap$(v, { + replicas: "Replicas", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Replicated$ { + /** @deprecated use `Replicated$inboundSchema` instead. */ + export const inboundSchema = Replicated$inboundSchema; + /** @deprecated use `Replicated$outboundSchema` instead. */ + export const outboundSchema = Replicated$outboundSchema; + /** @deprecated use `Replicated$Outbound` instead. */ + export type Outbound = Replicated$Outbound; +} + +export function replicatedToJSON(replicated: Replicated): string { + return JSON.stringify(Replicated$outboundSchema.parse(replicated)); +} + +export function replicatedFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Replicated$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Replicated' from JSON`, + ); +} + +/** @internal */ +export const Global$inboundSchema: z.ZodType = z + .object({}); + +/** @internal */ +export type Global$Outbound = {}; + +/** @internal */ +export const Global$outboundSchema: z.ZodType< + Global$Outbound, + z.ZodTypeDef, + Global +> = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Global$ { + /** @deprecated use `Global$inboundSchema` instead. */ + export const inboundSchema = Global$inboundSchema; + /** @deprecated use `Global$outboundSchema` instead. */ + export const outboundSchema = Global$outboundSchema; + /** @deprecated use `Global$Outbound` instead. */ + export type Outbound = Global$Outbound; +} + +export function globalToJSON(global: Global): string { + return JSON.stringify(Global$outboundSchema.parse(global)); +} + +export function globalFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Global$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Global' from JSON`, + ); +} + +/** @internal */ +export const ReplicatedJob$inboundSchema: z.ZodType< + ReplicatedJob, + z.ZodTypeDef, + unknown +> = z.object({ + MaxConcurrent: z.number().optional(), + TotalCompletions: z.number().optional(), +}).transform((v) => { + return remap$(v, { + "MaxConcurrent": "maxConcurrent", + "TotalCompletions": "totalCompletions", + }); +}); + +/** @internal */ +export type ReplicatedJob$Outbound = { + MaxConcurrent?: number | undefined; + TotalCompletions?: number | undefined; +}; + +/** @internal */ +export const ReplicatedJob$outboundSchema: z.ZodType< + ReplicatedJob$Outbound, + z.ZodTypeDef, + ReplicatedJob +> = z.object({ + maxConcurrent: z.number().optional(), + totalCompletions: z.number().optional(), +}).transform((v) => { + return remap$(v, { + maxConcurrent: "MaxConcurrent", + totalCompletions: "TotalCompletions", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ReplicatedJob$ { + /** @deprecated use `ReplicatedJob$inboundSchema` instead. */ + export const inboundSchema = ReplicatedJob$inboundSchema; + /** @deprecated use `ReplicatedJob$outboundSchema` instead. */ + export const outboundSchema = ReplicatedJob$outboundSchema; + /** @deprecated use `ReplicatedJob$Outbound` instead. */ + export type Outbound = ReplicatedJob$Outbound; +} + +export function replicatedJobToJSON(replicatedJob: ReplicatedJob): string { + return JSON.stringify(ReplicatedJob$outboundSchema.parse(replicatedJob)); +} + +export function replicatedJobFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ReplicatedJob$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ReplicatedJob' from JSON`, + ); +} + +/** @internal */ +export const GlobalJob$inboundSchema: z.ZodType< + GlobalJob, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type GlobalJob$Outbound = {}; + +/** @internal */ +export const GlobalJob$outboundSchema: z.ZodType< + GlobalJob$Outbound, + z.ZodTypeDef, + GlobalJob +> = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GlobalJob$ { + /** @deprecated use `GlobalJob$inboundSchema` instead. */ + export const inboundSchema = GlobalJob$inboundSchema; + /** @deprecated use `GlobalJob$outboundSchema` instead. */ + export const outboundSchema = GlobalJob$outboundSchema; + /** @deprecated use `GlobalJob$Outbound` instead. */ + export type Outbound = GlobalJob$Outbound; +} + +export function globalJobToJSON(globalJob: GlobalJob): string { + return JSON.stringify(GlobalJob$outboundSchema.parse(globalJob)); +} + +export function globalJobFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GlobalJob$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GlobalJob' from JSON`, + ); +} + +/** @internal */ +export const ModeSwarm$inboundSchema: z.ZodType< + ModeSwarm, + z.ZodTypeDef, + unknown +> = z.object({ + Replicated: z.lazy(() => Replicated$inboundSchema).optional(), + Global: z.lazy(() => Global$inboundSchema).optional(), + ReplicatedJob: z.lazy(() => ReplicatedJob$inboundSchema).optional(), + GlobalJob: z.lazy(() => GlobalJob$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "Replicated": "replicated", + "Global": "global", + "ReplicatedJob": "replicatedJob", + "GlobalJob": "globalJob", + }); +}); + +/** @internal */ +export type ModeSwarm$Outbound = { + Replicated?: Replicated$Outbound | undefined; + Global?: Global$Outbound | undefined; + ReplicatedJob?: ReplicatedJob$Outbound | undefined; + GlobalJob?: GlobalJob$Outbound | undefined; +}; + +/** @internal */ +export const ModeSwarm$outboundSchema: z.ZodType< + ModeSwarm$Outbound, + z.ZodTypeDef, + ModeSwarm +> = z.object({ + replicated: z.lazy(() => Replicated$outboundSchema).optional(), + global: z.lazy(() => Global$outboundSchema).optional(), + replicatedJob: z.lazy(() => ReplicatedJob$outboundSchema).optional(), + globalJob: z.lazy(() => GlobalJob$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + replicated: "Replicated", + global: "Global", + replicatedJob: "ReplicatedJob", + globalJob: "GlobalJob", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ModeSwarm$ { + /** @deprecated use `ModeSwarm$inboundSchema` instead. */ + export const inboundSchema = ModeSwarm$inboundSchema; + /** @deprecated use `ModeSwarm$outboundSchema` instead. */ + export const outboundSchema = ModeSwarm$outboundSchema; + /** @deprecated use `ModeSwarm$Outbound` instead. */ + export type Outbound = ModeSwarm$Outbound; +} + +export function modeSwarmToJSON(modeSwarm: ModeSwarm): string { + return JSON.stringify(ModeSwarm$outboundSchema.parse(modeSwarm)); +} + +export function modeSwarmFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ModeSwarm$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ModeSwarm' from JSON`, + ); +} + +/** @internal */ +export const DriverOpts$inboundSchema: z.ZodType< + DriverOpts, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type DriverOpts$Outbound = {}; + +/** @internal */ +export const DriverOpts$outboundSchema: z.ZodType< + DriverOpts$Outbound, + z.ZodTypeDef, + DriverOpts +> = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DriverOpts$ { + /** @deprecated use `DriverOpts$inboundSchema` instead. */ + export const inboundSchema = DriverOpts$inboundSchema; + /** @deprecated use `DriverOpts$outboundSchema` instead. */ + export const outboundSchema = DriverOpts$outboundSchema; + /** @deprecated use `DriverOpts$Outbound` instead. */ + export type Outbound = DriverOpts$Outbound; +} + +export function driverOptsToJSON(driverOpts: DriverOpts): string { + return JSON.stringify(DriverOpts$outboundSchema.parse(driverOpts)); +} + +export function driverOptsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DriverOpts$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DriverOpts' from JSON`, + ); +} + +/** @internal */ +export const NetworkSwarm$inboundSchema: z.ZodType< + NetworkSwarm, + z.ZodTypeDef, + unknown +> = z.object({ + Target: z.string().optional(), + Aliases: z.array(z.string()).optional(), + DriverOpts: z.lazy(() => DriverOpts$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "Target": "target", + "Aliases": "aliases", + "DriverOpts": "driverOpts", + }); +}); + +/** @internal */ +export type NetworkSwarm$Outbound = { + Target?: string | undefined; + Aliases?: Array | undefined; + DriverOpts?: DriverOpts$Outbound | undefined; +}; + +/** @internal */ +export const NetworkSwarm$outboundSchema: z.ZodType< + NetworkSwarm$Outbound, + z.ZodTypeDef, + NetworkSwarm +> = z.object({ + target: z.string().optional(), + aliases: z.array(z.string()).optional(), + driverOpts: z.lazy(() => DriverOpts$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + target: "Target", + aliases: "Aliases", + driverOpts: "DriverOpts", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NetworkSwarm$ { + /** @deprecated use `NetworkSwarm$inboundSchema` instead. */ + export const inboundSchema = NetworkSwarm$inboundSchema; + /** @deprecated use `NetworkSwarm$outboundSchema` instead. */ + export const outboundSchema = NetworkSwarm$outboundSchema; + /** @deprecated use `NetworkSwarm$Outbound` instead. */ + export type Outbound = NetworkSwarm$Outbound; +} + +export function networkSwarmToJSON(networkSwarm: NetworkSwarm): string { + return JSON.stringify(NetworkSwarm$outboundSchema.parse(networkSwarm)); +} + +export function networkSwarmFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NetworkSwarm$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NetworkSwarm' from JSON`, + ); +} + +/** @internal */ +export const ApplicationUpdateApplicationStatus$inboundSchema: z.ZodNativeEnum< + typeof ApplicationUpdateApplicationStatus +> = z.nativeEnum(ApplicationUpdateApplicationStatus); + +/** @internal */ +export const ApplicationUpdateApplicationStatus$outboundSchema: z.ZodNativeEnum< + typeof ApplicationUpdateApplicationStatus +> = ApplicationUpdateApplicationStatus$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ApplicationUpdateApplicationStatus$ { + /** @deprecated use `ApplicationUpdateApplicationStatus$inboundSchema` instead. */ + export const inboundSchema = ApplicationUpdateApplicationStatus$inboundSchema; + /** @deprecated use `ApplicationUpdateApplicationStatus$outboundSchema` instead. */ + export const outboundSchema = + ApplicationUpdateApplicationStatus$outboundSchema; +} + +/** @internal */ +export const ApplicationUpdateBuildType$inboundSchema: z.ZodNativeEnum< + typeof ApplicationUpdateBuildType +> = z.nativeEnum(ApplicationUpdateBuildType); + +/** @internal */ +export const ApplicationUpdateBuildType$outboundSchema: z.ZodNativeEnum< + typeof ApplicationUpdateBuildType +> = ApplicationUpdateBuildType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ApplicationUpdateBuildType$ { + /** @deprecated use `ApplicationUpdateBuildType$inboundSchema` instead. */ + export const inboundSchema = ApplicationUpdateBuildType$inboundSchema; + /** @deprecated use `ApplicationUpdateBuildType$outboundSchema` instead. */ + export const outboundSchema = ApplicationUpdateBuildType$outboundSchema; +} + +/** @internal */ +export const ApplicationUpdateRequest$inboundSchema: z.ZodType< + ApplicationUpdateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + applicationId: z.string(), + name: z.string().optional(), + appName: z.string().optional(), + description: z.nullable(z.string()).optional(), + env: z.nullable(z.string()).optional(), + buildArgs: z.nullable(z.string()).optional(), + memoryReservation: z.nullable(z.number()).optional(), + memoryLimit: z.nullable(z.number()).optional(), + cpuReservation: z.nullable(z.number()).optional(), + cpuLimit: z.nullable(z.number()).optional(), + title: z.nullable(z.string()).optional(), + enabled: z.nullable(z.boolean()).optional(), + subtitle: z.nullable(z.string()).optional(), + command: z.nullable(z.string()).optional(), + refreshToken: z.nullable(z.string()).optional(), + sourceType: ApplicationUpdateSourceType$inboundSchema.optional(), + repository: z.nullable(z.string()).optional(), + owner: z.nullable(z.string()).optional(), + branch: z.nullable(z.string()).optional(), + buildPath: z.nullable(z.string()).optional(), + autoDeploy: z.nullable(z.boolean()).optional(), + gitlabProjectId: z.nullable(z.number()).optional(), + gitlabRepository: z.nullable(z.string()).optional(), + gitlabOwner: z.nullable(z.string()).optional(), + gitlabBranch: z.nullable(z.string()).optional(), + gitlabBuildPath: z.nullable(z.string()).optional(), + gitlabPathNamespace: z.nullable(z.string()).optional(), + bitbucketRepository: z.nullable(z.string()).optional(), + bitbucketOwner: z.nullable(z.string()).optional(), + bitbucketBranch: z.nullable(z.string()).optional(), + bitbucketBuildPath: z.nullable(z.string()).optional(), + username: z.nullable(z.string()).optional(), + password: z.nullable(z.string()).optional(), + dockerImage: z.nullable(z.string()).optional(), + customGitUrl: z.nullable(z.string()).optional(), + customGitBranch: z.nullable(z.string()).optional(), + customGitBuildPath: z.nullable(z.string()).optional(), + customGitSSHKeyId: z.nullable(z.string()).optional(), + dockerfile: z.nullable(z.string()).optional(), + dockerContextPath: z.nullable(z.string()).optional(), + dockerBuildStage: z.nullable(z.string()).optional(), + dropBuildPath: z.nullable(z.string()).optional(), + healthCheckSwarm: z.nullable(z.lazy(() => HealthCheckSwarm$inboundSchema)) + .optional(), + restartPolicySwarm: z.nullable(z.lazy(() => RestartPolicySwarm$inboundSchema)) + .optional(), + placementSwarm: z.nullable(z.lazy(() => PlacementSwarm$inboundSchema)) + .optional(), + updateConfigSwarm: z.nullable(z.lazy(() => UpdateConfigSwarm$inboundSchema)) + .optional(), + rollbackConfigSwarm: z.nullable( + z.lazy(() => RollbackConfigSwarm$inboundSchema), + ).optional(), + modeSwarm: z.nullable(z.lazy(() => ModeSwarm$inboundSchema)).optional(), + labelsSwarm: z.nullable(z.record(z.string())).optional(), + networkSwarm: z.nullable(z.array(z.lazy(() => NetworkSwarm$inboundSchema))) + .optional(), + replicas: z.number().optional(), + applicationStatus: ApplicationUpdateApplicationStatus$inboundSchema + .optional(), + buildType: ApplicationUpdateBuildType$inboundSchema.optional(), + publishDirectory: z.nullable(z.string()).optional(), + createdAt: z.string().optional(), + registryId: z.nullable(z.string()).optional(), + projectId: z.string().optional(), + githubId: z.nullable(z.string()).optional(), + gitlabId: z.nullable(z.string()).optional(), + bitbucketId: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type ApplicationUpdateRequest$Outbound = { + applicationId: string; + name?: string | undefined; + appName?: string | undefined; + description?: string | null | undefined; + env?: string | null | undefined; + buildArgs?: string | null | undefined; + memoryReservation?: number | null | undefined; + memoryLimit?: number | null | undefined; + cpuReservation?: number | null | undefined; + cpuLimit?: number | null | undefined; + title?: string | null | undefined; + enabled?: boolean | null | undefined; + subtitle?: string | null | undefined; + command?: string | null | undefined; + refreshToken?: string | null | undefined; + sourceType?: string | undefined; + repository?: string | null | undefined; + owner?: string | null | undefined; + branch?: string | null | undefined; + buildPath?: string | null | undefined; + autoDeploy?: boolean | null | undefined; + gitlabProjectId?: number | null | undefined; + gitlabRepository?: string | null | undefined; + gitlabOwner?: string | null | undefined; + gitlabBranch?: string | null | undefined; + gitlabBuildPath?: string | null | undefined; + gitlabPathNamespace?: string | null | undefined; + bitbucketRepository?: string | null | undefined; + bitbucketOwner?: string | null | undefined; + bitbucketBranch?: string | null | undefined; + bitbucketBuildPath?: string | null | undefined; + username?: string | null | undefined; + password?: string | null | undefined; + dockerImage?: string | null | undefined; + customGitUrl?: string | null | undefined; + customGitBranch?: string | null | undefined; + customGitBuildPath?: string | null | undefined; + customGitSSHKeyId?: string | null | undefined; + dockerfile?: string | null | undefined; + dockerContextPath?: string | null | undefined; + dockerBuildStage?: string | null | undefined; + dropBuildPath?: string | null | undefined; + healthCheckSwarm?: HealthCheckSwarm$Outbound | null | undefined; + restartPolicySwarm?: RestartPolicySwarm$Outbound | null | undefined; + placementSwarm?: PlacementSwarm$Outbound | null | undefined; + updateConfigSwarm?: UpdateConfigSwarm$Outbound | null | undefined; + rollbackConfigSwarm?: RollbackConfigSwarm$Outbound | null | undefined; + modeSwarm?: ModeSwarm$Outbound | null | undefined; + labelsSwarm?: { [k: string]: string } | null | undefined; + networkSwarm?: Array | null | undefined; + replicas?: number | undefined; + applicationStatus?: string | undefined; + buildType?: string | undefined; + publishDirectory?: string | null | undefined; + createdAt?: string | undefined; + registryId?: string | null | undefined; + projectId?: string | undefined; + githubId?: string | null | undefined; + gitlabId?: string | null | undefined; + bitbucketId?: string | null | undefined; +}; + +/** @internal */ +export const ApplicationUpdateRequest$outboundSchema: z.ZodType< + ApplicationUpdateRequest$Outbound, + z.ZodTypeDef, + ApplicationUpdateRequest +> = z.object({ + applicationId: z.string(), + name: z.string().optional(), + appName: z.string().optional(), + description: z.nullable(z.string()).optional(), + env: z.nullable(z.string()).optional(), + buildArgs: z.nullable(z.string()).optional(), + memoryReservation: z.nullable(z.number()).optional(), + memoryLimit: z.nullable(z.number()).optional(), + cpuReservation: z.nullable(z.number()).optional(), + cpuLimit: z.nullable(z.number()).optional(), + title: z.nullable(z.string()).optional(), + enabled: z.nullable(z.boolean()).optional(), + subtitle: z.nullable(z.string()).optional(), + command: z.nullable(z.string()).optional(), + refreshToken: z.nullable(z.string()).optional(), + sourceType: ApplicationUpdateSourceType$outboundSchema.optional(), + repository: z.nullable(z.string()).optional(), + owner: z.nullable(z.string()).optional(), + branch: z.nullable(z.string()).optional(), + buildPath: z.nullable(z.string()).optional(), + autoDeploy: z.nullable(z.boolean()).optional(), + gitlabProjectId: z.nullable(z.number()).optional(), + gitlabRepository: z.nullable(z.string()).optional(), + gitlabOwner: z.nullable(z.string()).optional(), + gitlabBranch: z.nullable(z.string()).optional(), + gitlabBuildPath: z.nullable(z.string()).optional(), + gitlabPathNamespace: z.nullable(z.string()).optional(), + bitbucketRepository: z.nullable(z.string()).optional(), + bitbucketOwner: z.nullable(z.string()).optional(), + bitbucketBranch: z.nullable(z.string()).optional(), + bitbucketBuildPath: z.nullable(z.string()).optional(), + username: z.nullable(z.string()).optional(), + password: z.nullable(z.string()).optional(), + dockerImage: z.nullable(z.string()).optional(), + customGitUrl: z.nullable(z.string()).optional(), + customGitBranch: z.nullable(z.string()).optional(), + customGitBuildPath: z.nullable(z.string()).optional(), + customGitSSHKeyId: z.nullable(z.string()).optional(), + dockerfile: z.nullable(z.string()).optional(), + dockerContextPath: z.nullable(z.string()).optional(), + dockerBuildStage: z.nullable(z.string()).optional(), + dropBuildPath: z.nullable(z.string()).optional(), + healthCheckSwarm: z.nullable(z.lazy(() => HealthCheckSwarm$outboundSchema)) + .optional(), + restartPolicySwarm: z.nullable( + z.lazy(() => RestartPolicySwarm$outboundSchema), + ).optional(), + placementSwarm: z.nullable(z.lazy(() => PlacementSwarm$outboundSchema)) + .optional(), + updateConfigSwarm: z.nullable(z.lazy(() => UpdateConfigSwarm$outboundSchema)) + .optional(), + rollbackConfigSwarm: z.nullable( + z.lazy(() => RollbackConfigSwarm$outboundSchema), + ).optional(), + modeSwarm: z.nullable(z.lazy(() => ModeSwarm$outboundSchema)).optional(), + labelsSwarm: z.nullable(z.record(z.string())).optional(), + networkSwarm: z.nullable(z.array(z.lazy(() => NetworkSwarm$outboundSchema))) + .optional(), + replicas: z.number().optional(), + applicationStatus: ApplicationUpdateApplicationStatus$outboundSchema + .optional(), + buildType: ApplicationUpdateBuildType$outboundSchema.optional(), + publishDirectory: z.nullable(z.string()).optional(), + createdAt: z.string().optional(), + registryId: z.nullable(z.string()).optional(), + projectId: z.string().optional(), + githubId: z.nullable(z.string()).optional(), + gitlabId: z.nullable(z.string()).optional(), + bitbucketId: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ApplicationUpdateRequest$ { + /** @deprecated use `ApplicationUpdateRequest$inboundSchema` instead. */ + export const inboundSchema = ApplicationUpdateRequest$inboundSchema; + /** @deprecated use `ApplicationUpdateRequest$outboundSchema` instead. */ + export const outboundSchema = ApplicationUpdateRequest$outboundSchema; + /** @deprecated use `ApplicationUpdateRequest$Outbound` instead. */ + export type Outbound = ApplicationUpdateRequest$Outbound; +} + +export function applicationUpdateRequestToJSON( + applicationUpdateRequest: ApplicationUpdateRequest, +): string { + return JSON.stringify( + ApplicationUpdateRequest$outboundSchema.parse(applicationUpdateRequest), + ); +} + +export function applicationUpdateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ApplicationUpdateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ApplicationUpdateRequest' from JSON`, + ); +} diff --git a/src/models/operations/applicationupdatetraefikconfig.ts b/src/models/operations/applicationupdatetraefikconfig.ts new file mode 100644 index 0000000..72e919f --- /dev/null +++ b/src/models/operations/applicationupdatetraefikconfig.ts @@ -0,0 +1,75 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ApplicationUpdateTraefikConfigRequest = { + applicationId: string; + traefikConfig: string; +}; + +/** @internal */ +export const ApplicationUpdateTraefikConfigRequest$inboundSchema: z.ZodType< + ApplicationUpdateTraefikConfigRequest, + z.ZodTypeDef, + unknown +> = z.object({ + applicationId: z.string(), + traefikConfig: z.string(), +}); + +/** @internal */ +export type ApplicationUpdateTraefikConfigRequest$Outbound = { + applicationId: string; + traefikConfig: string; +}; + +/** @internal */ +export const ApplicationUpdateTraefikConfigRequest$outboundSchema: z.ZodType< + ApplicationUpdateTraefikConfigRequest$Outbound, + z.ZodTypeDef, + ApplicationUpdateTraefikConfigRequest +> = z.object({ + applicationId: z.string(), + traefikConfig: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ApplicationUpdateTraefikConfigRequest$ { + /** @deprecated use `ApplicationUpdateTraefikConfigRequest$inboundSchema` instead. */ + export const inboundSchema = + ApplicationUpdateTraefikConfigRequest$inboundSchema; + /** @deprecated use `ApplicationUpdateTraefikConfigRequest$outboundSchema` instead. */ + export const outboundSchema = + ApplicationUpdateTraefikConfigRequest$outboundSchema; + /** @deprecated use `ApplicationUpdateTraefikConfigRequest$Outbound` instead. */ + export type Outbound = ApplicationUpdateTraefikConfigRequest$Outbound; +} + +export function applicationUpdateTraefikConfigRequestToJSON( + applicationUpdateTraefikConfigRequest: ApplicationUpdateTraefikConfigRequest, +): string { + return JSON.stringify( + ApplicationUpdateTraefikConfigRequest$outboundSchema.parse( + applicationUpdateTraefikConfigRequest, + ), + ); +} + +export function applicationUpdateTraefikConfigRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + ApplicationUpdateTraefikConfigRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ApplicationUpdateTraefikConfigRequest' from JSON`, + ); +} diff --git a/src/models/operations/authconfirmemail.ts b/src/models/operations/authconfirmemail.ts new file mode 100644 index 0000000..d9c4c32 --- /dev/null +++ b/src/models/operations/authconfirmemail.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type AuthConfirmEmailRequest = { + confirmationToken: string; +}; + +/** @internal */ +export const AuthConfirmEmailRequest$inboundSchema: z.ZodType< + AuthConfirmEmailRequest, + z.ZodTypeDef, + unknown +> = z.object({ + confirmationToken: z.string(), +}); + +/** @internal */ +export type AuthConfirmEmailRequest$Outbound = { + confirmationToken: string; +}; + +/** @internal */ +export const AuthConfirmEmailRequest$outboundSchema: z.ZodType< + AuthConfirmEmailRequest$Outbound, + z.ZodTypeDef, + AuthConfirmEmailRequest +> = z.object({ + confirmationToken: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AuthConfirmEmailRequest$ { + /** @deprecated use `AuthConfirmEmailRequest$inboundSchema` instead. */ + export const inboundSchema = AuthConfirmEmailRequest$inboundSchema; + /** @deprecated use `AuthConfirmEmailRequest$outboundSchema` instead. */ + export const outboundSchema = AuthConfirmEmailRequest$outboundSchema; + /** @deprecated use `AuthConfirmEmailRequest$Outbound` instead. */ + export type Outbound = AuthConfirmEmailRequest$Outbound; +} + +export function authConfirmEmailRequestToJSON( + authConfirmEmailRequest: AuthConfirmEmailRequest, +): string { + return JSON.stringify( + AuthConfirmEmailRequest$outboundSchema.parse(authConfirmEmailRequest), + ); +} + +export function authConfirmEmailRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AuthConfirmEmailRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AuthConfirmEmailRequest' from JSON`, + ); +} diff --git a/src/models/operations/authcreateadmin.ts b/src/models/operations/authcreateadmin.ts new file mode 100644 index 0000000..2986d0f --- /dev/null +++ b/src/models/operations/authcreateadmin.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type AuthCreateAdminRequest = { + email: string; + password: string; +}; + +/** @internal */ +export const AuthCreateAdminRequest$inboundSchema: z.ZodType< + AuthCreateAdminRequest, + z.ZodTypeDef, + unknown +> = z.object({ + email: z.string(), + password: z.string(), +}); + +/** @internal */ +export type AuthCreateAdminRequest$Outbound = { + email: string; + password: string; +}; + +/** @internal */ +export const AuthCreateAdminRequest$outboundSchema: z.ZodType< + AuthCreateAdminRequest$Outbound, + z.ZodTypeDef, + AuthCreateAdminRequest +> = z.object({ + email: z.string(), + password: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AuthCreateAdminRequest$ { + /** @deprecated use `AuthCreateAdminRequest$inboundSchema` instead. */ + export const inboundSchema = AuthCreateAdminRequest$inboundSchema; + /** @deprecated use `AuthCreateAdminRequest$outboundSchema` instead. */ + export const outboundSchema = AuthCreateAdminRequest$outboundSchema; + /** @deprecated use `AuthCreateAdminRequest$Outbound` instead. */ + export type Outbound = AuthCreateAdminRequest$Outbound; +} + +export function authCreateAdminRequestToJSON( + authCreateAdminRequest: AuthCreateAdminRequest, +): string { + return JSON.stringify( + AuthCreateAdminRequest$outboundSchema.parse(authCreateAdminRequest), + ); +} + +export function authCreateAdminRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AuthCreateAdminRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AuthCreateAdminRequest' from JSON`, + ); +} diff --git a/src/models/operations/authcreateuser.ts b/src/models/operations/authcreateuser.ts new file mode 100644 index 0000000..6e24506 --- /dev/null +++ b/src/models/operations/authcreateuser.ts @@ -0,0 +1,74 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type AuthCreateUserRequest = { + password: string; + id: string; + token: string; +}; + +/** @internal */ +export const AuthCreateUserRequest$inboundSchema: z.ZodType< + AuthCreateUserRequest, + z.ZodTypeDef, + unknown +> = z.object({ + password: z.string(), + id: z.string(), + token: z.string(), +}); + +/** @internal */ +export type AuthCreateUserRequest$Outbound = { + password: string; + id: string; + token: string; +}; + +/** @internal */ +export const AuthCreateUserRequest$outboundSchema: z.ZodType< + AuthCreateUserRequest$Outbound, + z.ZodTypeDef, + AuthCreateUserRequest +> = z.object({ + password: z.string(), + id: z.string(), + token: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AuthCreateUserRequest$ { + /** @deprecated use `AuthCreateUserRequest$inboundSchema` instead. */ + export const inboundSchema = AuthCreateUserRequest$inboundSchema; + /** @deprecated use `AuthCreateUserRequest$outboundSchema` instead. */ + export const outboundSchema = AuthCreateUserRequest$outboundSchema; + /** @deprecated use `AuthCreateUserRequest$Outbound` instead. */ + export type Outbound = AuthCreateUserRequest$Outbound; +} + +export function authCreateUserRequestToJSON( + authCreateUserRequest: AuthCreateUserRequest, +): string { + return JSON.stringify( + AuthCreateUserRequest$outboundSchema.parse(authCreateUserRequest), + ); +} + +export function authCreateUserRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AuthCreateUserRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AuthCreateUserRequest' from JSON`, + ); +} diff --git a/src/models/operations/authlogin.ts b/src/models/operations/authlogin.ts new file mode 100644 index 0000000..649c704 --- /dev/null +++ b/src/models/operations/authlogin.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type AuthLoginRequest = { + email: string; + password: string; +}; + +/** @internal */ +export const AuthLoginRequest$inboundSchema: z.ZodType< + AuthLoginRequest, + z.ZodTypeDef, + unknown +> = z.object({ + email: z.string(), + password: z.string(), +}); + +/** @internal */ +export type AuthLoginRequest$Outbound = { + email: string; + password: string; +}; + +/** @internal */ +export const AuthLoginRequest$outboundSchema: z.ZodType< + AuthLoginRequest$Outbound, + z.ZodTypeDef, + AuthLoginRequest +> = z.object({ + email: z.string(), + password: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AuthLoginRequest$ { + /** @deprecated use `AuthLoginRequest$inboundSchema` instead. */ + export const inboundSchema = AuthLoginRequest$inboundSchema; + /** @deprecated use `AuthLoginRequest$outboundSchema` instead. */ + export const outboundSchema = AuthLoginRequest$outboundSchema; + /** @deprecated use `AuthLoginRequest$Outbound` instead. */ + export type Outbound = AuthLoginRequest$Outbound; +} + +export function authLoginRequestToJSON( + authLoginRequest: AuthLoginRequest, +): string { + return JSON.stringify( + AuthLoginRequest$outboundSchema.parse(authLoginRequest), + ); +} + +export function authLoginRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AuthLoginRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AuthLoginRequest' from JSON`, + ); +} diff --git a/src/models/operations/authone.ts b/src/models/operations/authone.ts new file mode 100644 index 0000000..15a037e --- /dev/null +++ b/src/models/operations/authone.ts @@ -0,0 +1,62 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type AuthOneRequest = { + id: string; +}; + +/** @internal */ +export const AuthOneRequest$inboundSchema: z.ZodType< + AuthOneRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), +}); + +/** @internal */ +export type AuthOneRequest$Outbound = { + id: string; +}; + +/** @internal */ +export const AuthOneRequest$outboundSchema: z.ZodType< + AuthOneRequest$Outbound, + z.ZodTypeDef, + AuthOneRequest +> = z.object({ + id: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AuthOneRequest$ { + /** @deprecated use `AuthOneRequest$inboundSchema` instead. */ + export const inboundSchema = AuthOneRequest$inboundSchema; + /** @deprecated use `AuthOneRequest$outboundSchema` instead. */ + export const outboundSchema = AuthOneRequest$outboundSchema; + /** @deprecated use `AuthOneRequest$Outbound` instead. */ + export type Outbound = AuthOneRequest$Outbound; +} + +export function authOneRequestToJSON(authOneRequest: AuthOneRequest): string { + return JSON.stringify(AuthOneRequest$outboundSchema.parse(authOneRequest)); +} + +export function authOneRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AuthOneRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AuthOneRequest' from JSON`, + ); +} diff --git a/src/models/operations/authresetpassword.ts b/src/models/operations/authresetpassword.ts new file mode 100644 index 0000000..3a850e9 --- /dev/null +++ b/src/models/operations/authresetpassword.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type AuthResetPasswordRequest = { + resetPasswordToken: string; + password: string; +}; + +/** @internal */ +export const AuthResetPasswordRequest$inboundSchema: z.ZodType< + AuthResetPasswordRequest, + z.ZodTypeDef, + unknown +> = z.object({ + resetPasswordToken: z.string(), + password: z.string(), +}); + +/** @internal */ +export type AuthResetPasswordRequest$Outbound = { + resetPasswordToken: string; + password: string; +}; + +/** @internal */ +export const AuthResetPasswordRequest$outboundSchema: z.ZodType< + AuthResetPasswordRequest$Outbound, + z.ZodTypeDef, + AuthResetPasswordRequest +> = z.object({ + resetPasswordToken: z.string(), + password: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AuthResetPasswordRequest$ { + /** @deprecated use `AuthResetPasswordRequest$inboundSchema` instead. */ + export const inboundSchema = AuthResetPasswordRequest$inboundSchema; + /** @deprecated use `AuthResetPasswordRequest$outboundSchema` instead. */ + export const outboundSchema = AuthResetPasswordRequest$outboundSchema; + /** @deprecated use `AuthResetPasswordRequest$Outbound` instead. */ + export type Outbound = AuthResetPasswordRequest$Outbound; +} + +export function authResetPasswordRequestToJSON( + authResetPasswordRequest: AuthResetPasswordRequest, +): string { + return JSON.stringify( + AuthResetPasswordRequest$outboundSchema.parse(authResetPasswordRequest), + ); +} + +export function authResetPasswordRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AuthResetPasswordRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AuthResetPasswordRequest' from JSON`, + ); +} diff --git a/src/models/operations/authsendresetpasswordemail.ts b/src/models/operations/authsendresetpasswordemail.ts new file mode 100644 index 0000000..33791b3 --- /dev/null +++ b/src/models/operations/authsendresetpasswordemail.ts @@ -0,0 +1,69 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type AuthSendResetPasswordEmailRequest = { + email: string; +}; + +/** @internal */ +export const AuthSendResetPasswordEmailRequest$inboundSchema: z.ZodType< + AuthSendResetPasswordEmailRequest, + z.ZodTypeDef, + unknown +> = z.object({ + email: z.string(), +}); + +/** @internal */ +export type AuthSendResetPasswordEmailRequest$Outbound = { + email: string; +}; + +/** @internal */ +export const AuthSendResetPasswordEmailRequest$outboundSchema: z.ZodType< + AuthSendResetPasswordEmailRequest$Outbound, + z.ZodTypeDef, + AuthSendResetPasswordEmailRequest +> = z.object({ + email: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AuthSendResetPasswordEmailRequest$ { + /** @deprecated use `AuthSendResetPasswordEmailRequest$inboundSchema` instead. */ + export const inboundSchema = AuthSendResetPasswordEmailRequest$inboundSchema; + /** @deprecated use `AuthSendResetPasswordEmailRequest$outboundSchema` instead. */ + export const outboundSchema = + AuthSendResetPasswordEmailRequest$outboundSchema; + /** @deprecated use `AuthSendResetPasswordEmailRequest$Outbound` instead. */ + export type Outbound = AuthSendResetPasswordEmailRequest$Outbound; +} + +export function authSendResetPasswordEmailRequestToJSON( + authSendResetPasswordEmailRequest: AuthSendResetPasswordEmailRequest, +): string { + return JSON.stringify( + AuthSendResetPasswordEmailRequest$outboundSchema.parse( + authSendResetPasswordEmailRequest, + ), + ); +} + +export function authSendResetPasswordEmailRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AuthSendResetPasswordEmailRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AuthSendResetPasswordEmailRequest' from JSON`, + ); +} diff --git a/src/models/operations/authupdate.ts b/src/models/operations/authupdate.ts new file mode 100644 index 0000000..954ec9c --- /dev/null +++ b/src/models/operations/authupdate.ts @@ -0,0 +1,139 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const Rol = { + Admin: "admin", + User: "user", +} as const; +export type Rol = ClosedEnum; + +export type AuthUpdateRequest = { + id?: string | undefined; + email: string | null; + password: string | null; + rol?: Rol | undefined; + image?: string | undefined; + secret?: string | null | undefined; + token?: string | null | undefined; + is2FAEnabled?: boolean | undefined; + createdAt?: string | undefined; + resetPasswordToken?: string | null | undefined; + resetPasswordExpiresAt?: string | null | undefined; + confirmationToken?: string | null | undefined; + confirmationExpiresAt?: string | null | undefined; +}; + +/** @internal */ +export const Rol$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Rol); + +/** @internal */ +export const Rol$outboundSchema: z.ZodNativeEnum = + Rol$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Rol$ { + /** @deprecated use `Rol$inboundSchema` instead. */ + export const inboundSchema = Rol$inboundSchema; + /** @deprecated use `Rol$outboundSchema` instead. */ + export const outboundSchema = Rol$outboundSchema; +} + +/** @internal */ +export const AuthUpdateRequest$inboundSchema: z.ZodType< + AuthUpdateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string().optional(), + email: z.nullable(z.string()), + password: z.nullable(z.string()), + rol: Rol$inboundSchema.optional(), + image: z.string().optional(), + secret: z.nullable(z.string()).optional(), + token: z.nullable(z.string()).optional(), + is2FAEnabled: z.boolean().optional(), + createdAt: z.string().optional(), + resetPasswordToken: z.nullable(z.string()).optional(), + resetPasswordExpiresAt: z.nullable(z.string()).optional(), + confirmationToken: z.nullable(z.string()).optional(), + confirmationExpiresAt: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type AuthUpdateRequest$Outbound = { + id?: string | undefined; + email: string | null; + password: string | null; + rol?: string | undefined; + image?: string | undefined; + secret?: string | null | undefined; + token?: string | null | undefined; + is2FAEnabled?: boolean | undefined; + createdAt?: string | undefined; + resetPasswordToken?: string | null | undefined; + resetPasswordExpiresAt?: string | null | undefined; + confirmationToken?: string | null | undefined; + confirmationExpiresAt?: string | null | undefined; +}; + +/** @internal */ +export const AuthUpdateRequest$outboundSchema: z.ZodType< + AuthUpdateRequest$Outbound, + z.ZodTypeDef, + AuthUpdateRequest +> = z.object({ + id: z.string().optional(), + email: z.nullable(z.string()), + password: z.nullable(z.string()), + rol: Rol$outboundSchema.optional(), + image: z.string().optional(), + secret: z.nullable(z.string()).optional(), + token: z.nullable(z.string()).optional(), + is2FAEnabled: z.boolean().optional(), + createdAt: z.string().optional(), + resetPasswordToken: z.nullable(z.string()).optional(), + resetPasswordExpiresAt: z.nullable(z.string()).optional(), + confirmationToken: z.nullable(z.string()).optional(), + confirmationExpiresAt: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AuthUpdateRequest$ { + /** @deprecated use `AuthUpdateRequest$inboundSchema` instead. */ + export const inboundSchema = AuthUpdateRequest$inboundSchema; + /** @deprecated use `AuthUpdateRequest$outboundSchema` instead. */ + export const outboundSchema = AuthUpdateRequest$outboundSchema; + /** @deprecated use `AuthUpdateRequest$Outbound` instead. */ + export type Outbound = AuthUpdateRequest$Outbound; +} + +export function authUpdateRequestToJSON( + authUpdateRequest: AuthUpdateRequest, +): string { + return JSON.stringify( + AuthUpdateRequest$outboundSchema.parse(authUpdateRequest), + ); +} + +export function authUpdateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AuthUpdateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AuthUpdateRequest' from JSON`, + ); +} diff --git a/src/models/operations/authverify2fasetup.ts b/src/models/operations/authverify2fasetup.ts new file mode 100644 index 0000000..9c2407d --- /dev/null +++ b/src/models/operations/authverify2fasetup.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type AuthVerify2FASetupRequest = { + pin: string; + secret: string; +}; + +/** @internal */ +export const AuthVerify2FASetupRequest$inboundSchema: z.ZodType< + AuthVerify2FASetupRequest, + z.ZodTypeDef, + unknown +> = z.object({ + pin: z.string(), + secret: z.string(), +}); + +/** @internal */ +export type AuthVerify2FASetupRequest$Outbound = { + pin: string; + secret: string; +}; + +/** @internal */ +export const AuthVerify2FASetupRequest$outboundSchema: z.ZodType< + AuthVerify2FASetupRequest$Outbound, + z.ZodTypeDef, + AuthVerify2FASetupRequest +> = z.object({ + pin: z.string(), + secret: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AuthVerify2FASetupRequest$ { + /** @deprecated use `AuthVerify2FASetupRequest$inboundSchema` instead. */ + export const inboundSchema = AuthVerify2FASetupRequest$inboundSchema; + /** @deprecated use `AuthVerify2FASetupRequest$outboundSchema` instead. */ + export const outboundSchema = AuthVerify2FASetupRequest$outboundSchema; + /** @deprecated use `AuthVerify2FASetupRequest$Outbound` instead. */ + export type Outbound = AuthVerify2FASetupRequest$Outbound; +} + +export function authVerify2FASetupRequestToJSON( + authVerify2FASetupRequest: AuthVerify2FASetupRequest, +): string { + return JSON.stringify( + AuthVerify2FASetupRequest$outboundSchema.parse(authVerify2FASetupRequest), + ); +} + +export function authVerify2FASetupRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AuthVerify2FASetupRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AuthVerify2FASetupRequest' from JSON`, + ); +} diff --git a/src/models/operations/authverifylogin2fa.ts b/src/models/operations/authverifylogin2fa.ts new file mode 100644 index 0000000..580c5ba --- /dev/null +++ b/src/models/operations/authverifylogin2fa.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type AuthVerifyLogin2FARequest = { + pin: string; + id: string; +}; + +/** @internal */ +export const AuthVerifyLogin2FARequest$inboundSchema: z.ZodType< + AuthVerifyLogin2FARequest, + z.ZodTypeDef, + unknown +> = z.object({ + pin: z.string(), + id: z.string(), +}); + +/** @internal */ +export type AuthVerifyLogin2FARequest$Outbound = { + pin: string; + id: string; +}; + +/** @internal */ +export const AuthVerifyLogin2FARequest$outboundSchema: z.ZodType< + AuthVerifyLogin2FARequest$Outbound, + z.ZodTypeDef, + AuthVerifyLogin2FARequest +> = z.object({ + pin: z.string(), + id: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AuthVerifyLogin2FARequest$ { + /** @deprecated use `AuthVerifyLogin2FARequest$inboundSchema` instead. */ + export const inboundSchema = AuthVerifyLogin2FARequest$inboundSchema; + /** @deprecated use `AuthVerifyLogin2FARequest$outboundSchema` instead. */ + export const outboundSchema = AuthVerifyLogin2FARequest$outboundSchema; + /** @deprecated use `AuthVerifyLogin2FARequest$Outbound` instead. */ + export type Outbound = AuthVerifyLogin2FARequest$Outbound; +} + +export function authVerifyLogin2FARequestToJSON( + authVerifyLogin2FARequest: AuthVerifyLogin2FARequest, +): string { + return JSON.stringify( + AuthVerifyLogin2FARequest$outboundSchema.parse(authVerifyLogin2FARequest), + ); +} + +export function authVerifyLogin2FARequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AuthVerifyLogin2FARequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AuthVerifyLogin2FARequest' from JSON`, + ); +} diff --git a/src/models/operations/backupcreate.ts b/src/models/operations/backupcreate.ts new file mode 100644 index 0000000..b2f7625 --- /dev/null +++ b/src/models/operations/backupcreate.ts @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const DatabaseType = { + Postgres: "postgres", + Mariadb: "mariadb", + Mysql: "mysql", + Mongo: "mongo", +} as const; +export type DatabaseType = ClosedEnum; + +export type BackupCreateRequest = { + schedule: string; + enabled?: boolean | null | undefined; + prefix: string; + destinationId: string; + database: string; + mariadbId?: string | null | undefined; + mysqlId?: string | null | undefined; + postgresId?: string | null | undefined; + mongoId?: string | null | undefined; + databaseType: DatabaseType; +}; + +/** @internal */ +export const DatabaseType$inboundSchema: z.ZodNativeEnum = + z.nativeEnum(DatabaseType); + +/** @internal */ +export const DatabaseType$outboundSchema: z.ZodNativeEnum = + DatabaseType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DatabaseType$ { + /** @deprecated use `DatabaseType$inboundSchema` instead. */ + export const inboundSchema = DatabaseType$inboundSchema; + /** @deprecated use `DatabaseType$outboundSchema` instead. */ + export const outboundSchema = DatabaseType$outboundSchema; +} + +/** @internal */ +export const BackupCreateRequest$inboundSchema: z.ZodType< + BackupCreateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + schedule: z.string(), + enabled: z.nullable(z.boolean()).optional(), + prefix: z.string(), + destinationId: z.string(), + database: z.string(), + mariadbId: z.nullable(z.string()).optional(), + mysqlId: z.nullable(z.string()).optional(), + postgresId: z.nullable(z.string()).optional(), + mongoId: z.nullable(z.string()).optional(), + databaseType: DatabaseType$inboundSchema, +}); + +/** @internal */ +export type BackupCreateRequest$Outbound = { + schedule: string; + enabled?: boolean | null | undefined; + prefix: string; + destinationId: string; + database: string; + mariadbId?: string | null | undefined; + mysqlId?: string | null | undefined; + postgresId?: string | null | undefined; + mongoId?: string | null | undefined; + databaseType: string; +}; + +/** @internal */ +export const BackupCreateRequest$outboundSchema: z.ZodType< + BackupCreateRequest$Outbound, + z.ZodTypeDef, + BackupCreateRequest +> = z.object({ + schedule: z.string(), + enabled: z.nullable(z.boolean()).optional(), + prefix: z.string(), + destinationId: z.string(), + database: z.string(), + mariadbId: z.nullable(z.string()).optional(), + mysqlId: z.nullable(z.string()).optional(), + postgresId: z.nullable(z.string()).optional(), + mongoId: z.nullable(z.string()).optional(), + databaseType: DatabaseType$outboundSchema, +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace BackupCreateRequest$ { + /** @deprecated use `BackupCreateRequest$inboundSchema` instead. */ + export const inboundSchema = BackupCreateRequest$inboundSchema; + /** @deprecated use `BackupCreateRequest$outboundSchema` instead. */ + export const outboundSchema = BackupCreateRequest$outboundSchema; + /** @deprecated use `BackupCreateRequest$Outbound` instead. */ + export type Outbound = BackupCreateRequest$Outbound; +} + +export function backupCreateRequestToJSON( + backupCreateRequest: BackupCreateRequest, +): string { + return JSON.stringify( + BackupCreateRequest$outboundSchema.parse(backupCreateRequest), + ); +} + +export function backupCreateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => BackupCreateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'BackupCreateRequest' from JSON`, + ); +} diff --git a/src/models/operations/backupmanualbackupmariadb.ts b/src/models/operations/backupmanualbackupmariadb.ts new file mode 100644 index 0000000..58628ff --- /dev/null +++ b/src/models/operations/backupmanualbackupmariadb.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type BackupManualBackupMariadbRequest = { + backupId: string; +}; + +/** @internal */ +export const BackupManualBackupMariadbRequest$inboundSchema: z.ZodType< + BackupManualBackupMariadbRequest, + z.ZodTypeDef, + unknown +> = z.object({ + backupId: z.string(), +}); + +/** @internal */ +export type BackupManualBackupMariadbRequest$Outbound = { + backupId: string; +}; + +/** @internal */ +export const BackupManualBackupMariadbRequest$outboundSchema: z.ZodType< + BackupManualBackupMariadbRequest$Outbound, + z.ZodTypeDef, + BackupManualBackupMariadbRequest +> = z.object({ + backupId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace BackupManualBackupMariadbRequest$ { + /** @deprecated use `BackupManualBackupMariadbRequest$inboundSchema` instead. */ + export const inboundSchema = BackupManualBackupMariadbRequest$inboundSchema; + /** @deprecated use `BackupManualBackupMariadbRequest$outboundSchema` instead. */ + export const outboundSchema = BackupManualBackupMariadbRequest$outboundSchema; + /** @deprecated use `BackupManualBackupMariadbRequest$Outbound` instead. */ + export type Outbound = BackupManualBackupMariadbRequest$Outbound; +} + +export function backupManualBackupMariadbRequestToJSON( + backupManualBackupMariadbRequest: BackupManualBackupMariadbRequest, +): string { + return JSON.stringify( + BackupManualBackupMariadbRequest$outboundSchema.parse( + backupManualBackupMariadbRequest, + ), + ); +} + +export function backupManualBackupMariadbRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => BackupManualBackupMariadbRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'BackupManualBackupMariadbRequest' from JSON`, + ); +} diff --git a/src/models/operations/backupmanualbackupmongo.ts b/src/models/operations/backupmanualbackupmongo.ts new file mode 100644 index 0000000..159738f --- /dev/null +++ b/src/models/operations/backupmanualbackupmongo.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type BackupManualBackupMongoRequest = { + backupId: string; +}; + +/** @internal */ +export const BackupManualBackupMongoRequest$inboundSchema: z.ZodType< + BackupManualBackupMongoRequest, + z.ZodTypeDef, + unknown +> = z.object({ + backupId: z.string(), +}); + +/** @internal */ +export type BackupManualBackupMongoRequest$Outbound = { + backupId: string; +}; + +/** @internal */ +export const BackupManualBackupMongoRequest$outboundSchema: z.ZodType< + BackupManualBackupMongoRequest$Outbound, + z.ZodTypeDef, + BackupManualBackupMongoRequest +> = z.object({ + backupId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace BackupManualBackupMongoRequest$ { + /** @deprecated use `BackupManualBackupMongoRequest$inboundSchema` instead. */ + export const inboundSchema = BackupManualBackupMongoRequest$inboundSchema; + /** @deprecated use `BackupManualBackupMongoRequest$outboundSchema` instead. */ + export const outboundSchema = BackupManualBackupMongoRequest$outboundSchema; + /** @deprecated use `BackupManualBackupMongoRequest$Outbound` instead. */ + export type Outbound = BackupManualBackupMongoRequest$Outbound; +} + +export function backupManualBackupMongoRequestToJSON( + backupManualBackupMongoRequest: BackupManualBackupMongoRequest, +): string { + return JSON.stringify( + BackupManualBackupMongoRequest$outboundSchema.parse( + backupManualBackupMongoRequest, + ), + ); +} + +export function backupManualBackupMongoRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => BackupManualBackupMongoRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'BackupManualBackupMongoRequest' from JSON`, + ); +} diff --git a/src/models/operations/backupmanualbackupmysql.ts b/src/models/operations/backupmanualbackupmysql.ts new file mode 100644 index 0000000..458f4cd --- /dev/null +++ b/src/models/operations/backupmanualbackupmysql.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type BackupManualBackupMySqlRequest = { + backupId: string; +}; + +/** @internal */ +export const BackupManualBackupMySqlRequest$inboundSchema: z.ZodType< + BackupManualBackupMySqlRequest, + z.ZodTypeDef, + unknown +> = z.object({ + backupId: z.string(), +}); + +/** @internal */ +export type BackupManualBackupMySqlRequest$Outbound = { + backupId: string; +}; + +/** @internal */ +export const BackupManualBackupMySqlRequest$outboundSchema: z.ZodType< + BackupManualBackupMySqlRequest$Outbound, + z.ZodTypeDef, + BackupManualBackupMySqlRequest +> = z.object({ + backupId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace BackupManualBackupMySqlRequest$ { + /** @deprecated use `BackupManualBackupMySqlRequest$inboundSchema` instead. */ + export const inboundSchema = BackupManualBackupMySqlRequest$inboundSchema; + /** @deprecated use `BackupManualBackupMySqlRequest$outboundSchema` instead. */ + export const outboundSchema = BackupManualBackupMySqlRequest$outboundSchema; + /** @deprecated use `BackupManualBackupMySqlRequest$Outbound` instead. */ + export type Outbound = BackupManualBackupMySqlRequest$Outbound; +} + +export function backupManualBackupMySqlRequestToJSON( + backupManualBackupMySqlRequest: BackupManualBackupMySqlRequest, +): string { + return JSON.stringify( + BackupManualBackupMySqlRequest$outboundSchema.parse( + backupManualBackupMySqlRequest, + ), + ); +} + +export function backupManualBackupMySqlRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => BackupManualBackupMySqlRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'BackupManualBackupMySqlRequest' from JSON`, + ); +} diff --git a/src/models/operations/backupmanualbackuppostgres.ts b/src/models/operations/backupmanualbackuppostgres.ts new file mode 100644 index 0000000..07e02ed --- /dev/null +++ b/src/models/operations/backupmanualbackuppostgres.ts @@ -0,0 +1,69 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type BackupManualBackupPostgresRequest = { + backupId: string; +}; + +/** @internal */ +export const BackupManualBackupPostgresRequest$inboundSchema: z.ZodType< + BackupManualBackupPostgresRequest, + z.ZodTypeDef, + unknown +> = z.object({ + backupId: z.string(), +}); + +/** @internal */ +export type BackupManualBackupPostgresRequest$Outbound = { + backupId: string; +}; + +/** @internal */ +export const BackupManualBackupPostgresRequest$outboundSchema: z.ZodType< + BackupManualBackupPostgresRequest$Outbound, + z.ZodTypeDef, + BackupManualBackupPostgresRequest +> = z.object({ + backupId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace BackupManualBackupPostgresRequest$ { + /** @deprecated use `BackupManualBackupPostgresRequest$inboundSchema` instead. */ + export const inboundSchema = BackupManualBackupPostgresRequest$inboundSchema; + /** @deprecated use `BackupManualBackupPostgresRequest$outboundSchema` instead. */ + export const outboundSchema = + BackupManualBackupPostgresRequest$outboundSchema; + /** @deprecated use `BackupManualBackupPostgresRequest$Outbound` instead. */ + export type Outbound = BackupManualBackupPostgresRequest$Outbound; +} + +export function backupManualBackupPostgresRequestToJSON( + backupManualBackupPostgresRequest: BackupManualBackupPostgresRequest, +): string { + return JSON.stringify( + BackupManualBackupPostgresRequest$outboundSchema.parse( + backupManualBackupPostgresRequest, + ), + ); +} + +export function backupManualBackupPostgresRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => BackupManualBackupPostgresRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'BackupManualBackupPostgresRequest' from JSON`, + ); +} diff --git a/src/models/operations/backupone.ts b/src/models/operations/backupone.ts new file mode 100644 index 0000000..f4efca5 --- /dev/null +++ b/src/models/operations/backupone.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type BackupOneRequest = { + backupId: string; +}; + +/** @internal */ +export const BackupOneRequest$inboundSchema: z.ZodType< + BackupOneRequest, + z.ZodTypeDef, + unknown +> = z.object({ + backupId: z.string(), +}); + +/** @internal */ +export type BackupOneRequest$Outbound = { + backupId: string; +}; + +/** @internal */ +export const BackupOneRequest$outboundSchema: z.ZodType< + BackupOneRequest$Outbound, + z.ZodTypeDef, + BackupOneRequest +> = z.object({ + backupId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace BackupOneRequest$ { + /** @deprecated use `BackupOneRequest$inboundSchema` instead. */ + export const inboundSchema = BackupOneRequest$inboundSchema; + /** @deprecated use `BackupOneRequest$outboundSchema` instead. */ + export const outboundSchema = BackupOneRequest$outboundSchema; + /** @deprecated use `BackupOneRequest$Outbound` instead. */ + export type Outbound = BackupOneRequest$Outbound; +} + +export function backupOneRequestToJSON( + backupOneRequest: BackupOneRequest, +): string { + return JSON.stringify( + BackupOneRequest$outboundSchema.parse(backupOneRequest), + ); +} + +export function backupOneRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => BackupOneRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'BackupOneRequest' from JSON`, + ); +} diff --git a/src/models/operations/backupremove.ts b/src/models/operations/backupremove.ts new file mode 100644 index 0000000..e3e8b7a --- /dev/null +++ b/src/models/operations/backupremove.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type BackupRemoveRequest = { + backupId: string; +}; + +/** @internal */ +export const BackupRemoveRequest$inboundSchema: z.ZodType< + BackupRemoveRequest, + z.ZodTypeDef, + unknown +> = z.object({ + backupId: z.string(), +}); + +/** @internal */ +export type BackupRemoveRequest$Outbound = { + backupId: string; +}; + +/** @internal */ +export const BackupRemoveRequest$outboundSchema: z.ZodType< + BackupRemoveRequest$Outbound, + z.ZodTypeDef, + BackupRemoveRequest +> = z.object({ + backupId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace BackupRemoveRequest$ { + /** @deprecated use `BackupRemoveRequest$inboundSchema` instead. */ + export const inboundSchema = BackupRemoveRequest$inboundSchema; + /** @deprecated use `BackupRemoveRequest$outboundSchema` instead. */ + export const outboundSchema = BackupRemoveRequest$outboundSchema; + /** @deprecated use `BackupRemoveRequest$Outbound` instead. */ + export type Outbound = BackupRemoveRequest$Outbound; +} + +export function backupRemoveRequestToJSON( + backupRemoveRequest: BackupRemoveRequest, +): string { + return JSON.stringify( + BackupRemoveRequest$outboundSchema.parse(backupRemoveRequest), + ); +} + +export function backupRemoveRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => BackupRemoveRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'BackupRemoveRequest' from JSON`, + ); +} diff --git a/src/models/operations/backupupdate.ts b/src/models/operations/backupupdate.ts new file mode 100644 index 0000000..5944f85 --- /dev/null +++ b/src/models/operations/backupupdate.ts @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type BackupUpdateRequest = { + schedule: string; + enabled?: boolean | null | undefined; + prefix: string; + backupId: string; + destinationId: string; + database: string; +}; + +/** @internal */ +export const BackupUpdateRequest$inboundSchema: z.ZodType< + BackupUpdateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + schedule: z.string(), + enabled: z.nullable(z.boolean()).optional(), + prefix: z.string(), + backupId: z.string(), + destinationId: z.string(), + database: z.string(), +}); + +/** @internal */ +export type BackupUpdateRequest$Outbound = { + schedule: string; + enabled?: boolean | null | undefined; + prefix: string; + backupId: string; + destinationId: string; + database: string; +}; + +/** @internal */ +export const BackupUpdateRequest$outboundSchema: z.ZodType< + BackupUpdateRequest$Outbound, + z.ZodTypeDef, + BackupUpdateRequest +> = z.object({ + schedule: z.string(), + enabled: z.nullable(z.boolean()).optional(), + prefix: z.string(), + backupId: z.string(), + destinationId: z.string(), + database: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace BackupUpdateRequest$ { + /** @deprecated use `BackupUpdateRequest$inboundSchema` instead. */ + export const inboundSchema = BackupUpdateRequest$inboundSchema; + /** @deprecated use `BackupUpdateRequest$outboundSchema` instead. */ + export const outboundSchema = BackupUpdateRequest$outboundSchema; + /** @deprecated use `BackupUpdateRequest$Outbound` instead. */ + export type Outbound = BackupUpdateRequest$Outbound; +} + +export function backupUpdateRequestToJSON( + backupUpdateRequest: BackupUpdateRequest, +): string { + return JSON.stringify( + BackupUpdateRequest$outboundSchema.parse(backupUpdateRequest), + ); +} + +export function backupUpdateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => BackupUpdateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'BackupUpdateRequest' from JSON`, + ); +} diff --git a/src/models/operations/bitbucketcreate.ts b/src/models/operations/bitbucketcreate.ts new file mode 100644 index 0000000..e359093 --- /dev/null +++ b/src/models/operations/bitbucketcreate.ts @@ -0,0 +1,90 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type BitbucketCreateRequest = { + bitbucketId?: string | undefined; + bitbucketUsername?: string | undefined; + appPassword?: string | undefined; + bitbucketWorkspaceName?: string | undefined; + gitProviderId?: string | undefined; + authId: string; + name: string; +}; + +/** @internal */ +export const BitbucketCreateRequest$inboundSchema: z.ZodType< + BitbucketCreateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + bitbucketId: z.string().optional(), + bitbucketUsername: z.string().optional(), + appPassword: z.string().optional(), + bitbucketWorkspaceName: z.string().optional(), + gitProviderId: z.string().optional(), + authId: z.string(), + name: z.string(), +}); + +/** @internal */ +export type BitbucketCreateRequest$Outbound = { + bitbucketId?: string | undefined; + bitbucketUsername?: string | undefined; + appPassword?: string | undefined; + bitbucketWorkspaceName?: string | undefined; + gitProviderId?: string | undefined; + authId: string; + name: string; +}; + +/** @internal */ +export const BitbucketCreateRequest$outboundSchema: z.ZodType< + BitbucketCreateRequest$Outbound, + z.ZodTypeDef, + BitbucketCreateRequest +> = z.object({ + bitbucketId: z.string().optional(), + bitbucketUsername: z.string().optional(), + appPassword: z.string().optional(), + bitbucketWorkspaceName: z.string().optional(), + gitProviderId: z.string().optional(), + authId: z.string(), + name: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace BitbucketCreateRequest$ { + /** @deprecated use `BitbucketCreateRequest$inboundSchema` instead. */ + export const inboundSchema = BitbucketCreateRequest$inboundSchema; + /** @deprecated use `BitbucketCreateRequest$outboundSchema` instead. */ + export const outboundSchema = BitbucketCreateRequest$outboundSchema; + /** @deprecated use `BitbucketCreateRequest$Outbound` instead. */ + export type Outbound = BitbucketCreateRequest$Outbound; +} + +export function bitbucketCreateRequestToJSON( + bitbucketCreateRequest: BitbucketCreateRequest, +): string { + return JSON.stringify( + BitbucketCreateRequest$outboundSchema.parse(bitbucketCreateRequest), + ); +} + +export function bitbucketCreateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => BitbucketCreateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'BitbucketCreateRequest' from JSON`, + ); +} diff --git a/src/models/operations/bitbucketgetbitbucketbranches.ts b/src/models/operations/bitbucketgetbitbucketbranches.ts new file mode 100644 index 0000000..0416e33 --- /dev/null +++ b/src/models/operations/bitbucketgetbitbucketbranches.ts @@ -0,0 +1,79 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type BitbucketGetBitbucketBranchesRequest = { + owner: string; + repo: string; + bitbucketId?: string | undefined; +}; + +/** @internal */ +export const BitbucketGetBitbucketBranchesRequest$inboundSchema: z.ZodType< + BitbucketGetBitbucketBranchesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + owner: z.string(), + repo: z.string(), + bitbucketId: z.string().optional(), +}); + +/** @internal */ +export type BitbucketGetBitbucketBranchesRequest$Outbound = { + owner: string; + repo: string; + bitbucketId?: string | undefined; +}; + +/** @internal */ +export const BitbucketGetBitbucketBranchesRequest$outboundSchema: z.ZodType< + BitbucketGetBitbucketBranchesRequest$Outbound, + z.ZodTypeDef, + BitbucketGetBitbucketBranchesRequest +> = z.object({ + owner: z.string(), + repo: z.string(), + bitbucketId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace BitbucketGetBitbucketBranchesRequest$ { + /** @deprecated use `BitbucketGetBitbucketBranchesRequest$inboundSchema` instead. */ + export const inboundSchema = + BitbucketGetBitbucketBranchesRequest$inboundSchema; + /** @deprecated use `BitbucketGetBitbucketBranchesRequest$outboundSchema` instead. */ + export const outboundSchema = + BitbucketGetBitbucketBranchesRequest$outboundSchema; + /** @deprecated use `BitbucketGetBitbucketBranchesRequest$Outbound` instead. */ + export type Outbound = BitbucketGetBitbucketBranchesRequest$Outbound; +} + +export function bitbucketGetBitbucketBranchesRequestToJSON( + bitbucketGetBitbucketBranchesRequest: BitbucketGetBitbucketBranchesRequest, +): string { + return JSON.stringify( + BitbucketGetBitbucketBranchesRequest$outboundSchema.parse( + bitbucketGetBitbucketBranchesRequest, + ), + ); +} + +export function bitbucketGetBitbucketBranchesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + BitbucketGetBitbucketBranchesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'BitbucketGetBitbucketBranchesRequest' from JSON`, + ); +} diff --git a/src/models/operations/bitbucketgetbitbucketrepositories.ts b/src/models/operations/bitbucketgetbitbucketrepositories.ts new file mode 100644 index 0000000..ba01565 --- /dev/null +++ b/src/models/operations/bitbucketgetbitbucketrepositories.ts @@ -0,0 +1,77 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type BitbucketGetBitbucketRepositoriesRequest = { + bitbucketId: string; +}; + +/** @internal */ +export const BitbucketGetBitbucketRepositoriesRequest$inboundSchema: z.ZodType< + BitbucketGetBitbucketRepositoriesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + bitbucketId: z.string(), +}); + +/** @internal */ +export type BitbucketGetBitbucketRepositoriesRequest$Outbound = { + bitbucketId: string; +}; + +/** @internal */ +export const BitbucketGetBitbucketRepositoriesRequest$outboundSchema: z.ZodType< + BitbucketGetBitbucketRepositoriesRequest$Outbound, + z.ZodTypeDef, + BitbucketGetBitbucketRepositoriesRequest +> = z.object({ + bitbucketId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace BitbucketGetBitbucketRepositoriesRequest$ { + /** @deprecated use `BitbucketGetBitbucketRepositoriesRequest$inboundSchema` instead. */ + export const inboundSchema = + BitbucketGetBitbucketRepositoriesRequest$inboundSchema; + /** @deprecated use `BitbucketGetBitbucketRepositoriesRequest$outboundSchema` instead. */ + export const outboundSchema = + BitbucketGetBitbucketRepositoriesRequest$outboundSchema; + /** @deprecated use `BitbucketGetBitbucketRepositoriesRequest$Outbound` instead. */ + export type Outbound = BitbucketGetBitbucketRepositoriesRequest$Outbound; +} + +export function bitbucketGetBitbucketRepositoriesRequestToJSON( + bitbucketGetBitbucketRepositoriesRequest: + BitbucketGetBitbucketRepositoriesRequest, +): string { + return JSON.stringify( + BitbucketGetBitbucketRepositoriesRequest$outboundSchema.parse( + bitbucketGetBitbucketRepositoriesRequest, + ), + ); +} + +export function bitbucketGetBitbucketRepositoriesRequestFromJSON( + jsonString: string, +): SafeParseResult< + BitbucketGetBitbucketRepositoriesRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + BitbucketGetBitbucketRepositoriesRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'BitbucketGetBitbucketRepositoriesRequest' from JSON`, + ); +} diff --git a/src/models/operations/bitbucketone.ts b/src/models/operations/bitbucketone.ts new file mode 100644 index 0000000..9a78069 --- /dev/null +++ b/src/models/operations/bitbucketone.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type BitbucketOneRequest = { + bitbucketId: string; +}; + +/** @internal */ +export const BitbucketOneRequest$inboundSchema: z.ZodType< + BitbucketOneRequest, + z.ZodTypeDef, + unknown +> = z.object({ + bitbucketId: z.string(), +}); + +/** @internal */ +export type BitbucketOneRequest$Outbound = { + bitbucketId: string; +}; + +/** @internal */ +export const BitbucketOneRequest$outboundSchema: z.ZodType< + BitbucketOneRequest$Outbound, + z.ZodTypeDef, + BitbucketOneRequest +> = z.object({ + bitbucketId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace BitbucketOneRequest$ { + /** @deprecated use `BitbucketOneRequest$inboundSchema` instead. */ + export const inboundSchema = BitbucketOneRequest$inboundSchema; + /** @deprecated use `BitbucketOneRequest$outboundSchema` instead. */ + export const outboundSchema = BitbucketOneRequest$outboundSchema; + /** @deprecated use `BitbucketOneRequest$Outbound` instead. */ + export type Outbound = BitbucketOneRequest$Outbound; +} + +export function bitbucketOneRequestToJSON( + bitbucketOneRequest: BitbucketOneRequest, +): string { + return JSON.stringify( + BitbucketOneRequest$outboundSchema.parse(bitbucketOneRequest), + ); +} + +export function bitbucketOneRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => BitbucketOneRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'BitbucketOneRequest' from JSON`, + ); +} diff --git a/src/models/operations/bitbuckettestconnection.ts b/src/models/operations/bitbuckettestconnection.ts new file mode 100644 index 0000000..e2ab81a --- /dev/null +++ b/src/models/operations/bitbuckettestconnection.ts @@ -0,0 +1,76 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type BitbucketTestConnectionRequest = { + bitbucketId: string; + bitbucketUsername?: string | undefined; + workspaceName?: string | undefined; +}; + +/** @internal */ +export const BitbucketTestConnectionRequest$inboundSchema: z.ZodType< + BitbucketTestConnectionRequest, + z.ZodTypeDef, + unknown +> = z.object({ + bitbucketId: z.string(), + bitbucketUsername: z.string().optional(), + workspaceName: z.string().optional(), +}); + +/** @internal */ +export type BitbucketTestConnectionRequest$Outbound = { + bitbucketId: string; + bitbucketUsername?: string | undefined; + workspaceName?: string | undefined; +}; + +/** @internal */ +export const BitbucketTestConnectionRequest$outboundSchema: z.ZodType< + BitbucketTestConnectionRequest$Outbound, + z.ZodTypeDef, + BitbucketTestConnectionRequest +> = z.object({ + bitbucketId: z.string(), + bitbucketUsername: z.string().optional(), + workspaceName: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace BitbucketTestConnectionRequest$ { + /** @deprecated use `BitbucketTestConnectionRequest$inboundSchema` instead. */ + export const inboundSchema = BitbucketTestConnectionRequest$inboundSchema; + /** @deprecated use `BitbucketTestConnectionRequest$outboundSchema` instead. */ + export const outboundSchema = BitbucketTestConnectionRequest$outboundSchema; + /** @deprecated use `BitbucketTestConnectionRequest$Outbound` instead. */ + export type Outbound = BitbucketTestConnectionRequest$Outbound; +} + +export function bitbucketTestConnectionRequestToJSON( + bitbucketTestConnectionRequest: BitbucketTestConnectionRequest, +): string { + return JSON.stringify( + BitbucketTestConnectionRequest$outboundSchema.parse( + bitbucketTestConnectionRequest, + ), + ); +} + +export function bitbucketTestConnectionRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => BitbucketTestConnectionRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'BitbucketTestConnectionRequest' from JSON`, + ); +} diff --git a/src/models/operations/bitbucketupdate.ts b/src/models/operations/bitbucketupdate.ts new file mode 100644 index 0000000..5f6ad71 --- /dev/null +++ b/src/models/operations/bitbucketupdate.ts @@ -0,0 +1,90 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type BitbucketUpdateRequest = { + bitbucketId: string; + bitbucketUsername?: string | undefined; + appPassword?: string | null | undefined; + bitbucketWorkspaceName?: string | undefined; + gitProviderId: string; + name: string; + adminId?: string | undefined; +}; + +/** @internal */ +export const BitbucketUpdateRequest$inboundSchema: z.ZodType< + BitbucketUpdateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + bitbucketId: z.string(), + bitbucketUsername: z.string().optional(), + appPassword: z.nullable(z.string()).optional(), + bitbucketWorkspaceName: z.string().optional(), + gitProviderId: z.string(), + name: z.string(), + adminId: z.string().optional(), +}); + +/** @internal */ +export type BitbucketUpdateRequest$Outbound = { + bitbucketId: string; + bitbucketUsername?: string | undefined; + appPassword?: string | null | undefined; + bitbucketWorkspaceName?: string | undefined; + gitProviderId: string; + name: string; + adminId?: string | undefined; +}; + +/** @internal */ +export const BitbucketUpdateRequest$outboundSchema: z.ZodType< + BitbucketUpdateRequest$Outbound, + z.ZodTypeDef, + BitbucketUpdateRequest +> = z.object({ + bitbucketId: z.string(), + bitbucketUsername: z.string().optional(), + appPassword: z.nullable(z.string()).optional(), + bitbucketWorkspaceName: z.string().optional(), + gitProviderId: z.string(), + name: z.string(), + adminId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace BitbucketUpdateRequest$ { + /** @deprecated use `BitbucketUpdateRequest$inboundSchema` instead. */ + export const inboundSchema = BitbucketUpdateRequest$inboundSchema; + /** @deprecated use `BitbucketUpdateRequest$outboundSchema` instead. */ + export const outboundSchema = BitbucketUpdateRequest$outboundSchema; + /** @deprecated use `BitbucketUpdateRequest$Outbound` instead. */ + export type Outbound = BitbucketUpdateRequest$Outbound; +} + +export function bitbucketUpdateRequestToJSON( + bitbucketUpdateRequest: BitbucketUpdateRequest, +): string { + return JSON.stringify( + BitbucketUpdateRequest$outboundSchema.parse(bitbucketUpdateRequest), + ); +} + +export function bitbucketUpdateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => BitbucketUpdateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'BitbucketUpdateRequest' from JSON`, + ); +} diff --git a/src/models/operations/certificatescreate.ts b/src/models/operations/certificatescreate.ts new file mode 100644 index 0000000..69df8a7 --- /dev/null +++ b/src/models/operations/certificatescreate.ts @@ -0,0 +1,94 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type CertificatesCreateRequest = { + certificateId?: string | undefined; + name: string; + certificateData: string; + privateKey: string; + certificatePath?: string | undefined; + autoRenew?: boolean | null | undefined; + adminId?: string | null | undefined; + serverId?: string | null | undefined; +}; + +/** @internal */ +export const CertificatesCreateRequest$inboundSchema: z.ZodType< + CertificatesCreateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + certificateId: z.string().optional(), + name: z.string(), + certificateData: z.string(), + privateKey: z.string(), + certificatePath: z.string().optional(), + autoRenew: z.nullable(z.boolean()).optional(), + adminId: z.nullable(z.string()).optional(), + serverId: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type CertificatesCreateRequest$Outbound = { + certificateId?: string | undefined; + name: string; + certificateData: string; + privateKey: string; + certificatePath?: string | undefined; + autoRenew?: boolean | null | undefined; + adminId?: string | null | undefined; + serverId?: string | null | undefined; +}; + +/** @internal */ +export const CertificatesCreateRequest$outboundSchema: z.ZodType< + CertificatesCreateRequest$Outbound, + z.ZodTypeDef, + CertificatesCreateRequest +> = z.object({ + certificateId: z.string().optional(), + name: z.string(), + certificateData: z.string(), + privateKey: z.string(), + certificatePath: z.string().optional(), + autoRenew: z.nullable(z.boolean()).optional(), + adminId: z.nullable(z.string()).optional(), + serverId: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CertificatesCreateRequest$ { + /** @deprecated use `CertificatesCreateRequest$inboundSchema` instead. */ + export const inboundSchema = CertificatesCreateRequest$inboundSchema; + /** @deprecated use `CertificatesCreateRequest$outboundSchema` instead. */ + export const outboundSchema = CertificatesCreateRequest$outboundSchema; + /** @deprecated use `CertificatesCreateRequest$Outbound` instead. */ + export type Outbound = CertificatesCreateRequest$Outbound; +} + +export function certificatesCreateRequestToJSON( + certificatesCreateRequest: CertificatesCreateRequest, +): string { + return JSON.stringify( + CertificatesCreateRequest$outboundSchema.parse(certificatesCreateRequest), + ); +} + +export function certificatesCreateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CertificatesCreateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CertificatesCreateRequest' from JSON`, + ); +} diff --git a/src/models/operations/certificatesone.ts b/src/models/operations/certificatesone.ts new file mode 100644 index 0000000..c91b585 --- /dev/null +++ b/src/models/operations/certificatesone.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type CertificatesOneRequest = { + certificateId: string; +}; + +/** @internal */ +export const CertificatesOneRequest$inboundSchema: z.ZodType< + CertificatesOneRequest, + z.ZodTypeDef, + unknown +> = z.object({ + certificateId: z.string(), +}); + +/** @internal */ +export type CertificatesOneRequest$Outbound = { + certificateId: string; +}; + +/** @internal */ +export const CertificatesOneRequest$outboundSchema: z.ZodType< + CertificatesOneRequest$Outbound, + z.ZodTypeDef, + CertificatesOneRequest +> = z.object({ + certificateId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CertificatesOneRequest$ { + /** @deprecated use `CertificatesOneRequest$inboundSchema` instead. */ + export const inboundSchema = CertificatesOneRequest$inboundSchema; + /** @deprecated use `CertificatesOneRequest$outboundSchema` instead. */ + export const outboundSchema = CertificatesOneRequest$outboundSchema; + /** @deprecated use `CertificatesOneRequest$Outbound` instead. */ + export type Outbound = CertificatesOneRequest$Outbound; +} + +export function certificatesOneRequestToJSON( + certificatesOneRequest: CertificatesOneRequest, +): string { + return JSON.stringify( + CertificatesOneRequest$outboundSchema.parse(certificatesOneRequest), + ); +} + +export function certificatesOneRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CertificatesOneRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CertificatesOneRequest' from JSON`, + ); +} diff --git a/src/models/operations/certificatesremove.ts b/src/models/operations/certificatesremove.ts new file mode 100644 index 0000000..b422098 --- /dev/null +++ b/src/models/operations/certificatesremove.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type CertificatesRemoveRequest = { + certificateId: string; +}; + +/** @internal */ +export const CertificatesRemoveRequest$inboundSchema: z.ZodType< + CertificatesRemoveRequest, + z.ZodTypeDef, + unknown +> = z.object({ + certificateId: z.string(), +}); + +/** @internal */ +export type CertificatesRemoveRequest$Outbound = { + certificateId: string; +}; + +/** @internal */ +export const CertificatesRemoveRequest$outboundSchema: z.ZodType< + CertificatesRemoveRequest$Outbound, + z.ZodTypeDef, + CertificatesRemoveRequest +> = z.object({ + certificateId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CertificatesRemoveRequest$ { + /** @deprecated use `CertificatesRemoveRequest$inboundSchema` instead. */ + export const inboundSchema = CertificatesRemoveRequest$inboundSchema; + /** @deprecated use `CertificatesRemoveRequest$outboundSchema` instead. */ + export const outboundSchema = CertificatesRemoveRequest$outboundSchema; + /** @deprecated use `CertificatesRemoveRequest$Outbound` instead. */ + export type Outbound = CertificatesRemoveRequest$Outbound; +} + +export function certificatesRemoveRequestToJSON( + certificatesRemoveRequest: CertificatesRemoveRequest, +): string { + return JSON.stringify( + CertificatesRemoveRequest$outboundSchema.parse(certificatesRemoveRequest), + ); +} + +export function certificatesRemoveRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CertificatesRemoveRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CertificatesRemoveRequest' from JSON`, + ); +} diff --git a/src/models/operations/clusterremoveworker.ts b/src/models/operations/clusterremoveworker.ts new file mode 100644 index 0000000..a56e600 --- /dev/null +++ b/src/models/operations/clusterremoveworker.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ClusterRemoveWorkerRequest = { + nodeId: string; +}; + +/** @internal */ +export const ClusterRemoveWorkerRequest$inboundSchema: z.ZodType< + ClusterRemoveWorkerRequest, + z.ZodTypeDef, + unknown +> = z.object({ + nodeId: z.string(), +}); + +/** @internal */ +export type ClusterRemoveWorkerRequest$Outbound = { + nodeId: string; +}; + +/** @internal */ +export const ClusterRemoveWorkerRequest$outboundSchema: z.ZodType< + ClusterRemoveWorkerRequest$Outbound, + z.ZodTypeDef, + ClusterRemoveWorkerRequest +> = z.object({ + nodeId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ClusterRemoveWorkerRequest$ { + /** @deprecated use `ClusterRemoveWorkerRequest$inboundSchema` instead. */ + export const inboundSchema = ClusterRemoveWorkerRequest$inboundSchema; + /** @deprecated use `ClusterRemoveWorkerRequest$outboundSchema` instead. */ + export const outboundSchema = ClusterRemoveWorkerRequest$outboundSchema; + /** @deprecated use `ClusterRemoveWorkerRequest$Outbound` instead. */ + export type Outbound = ClusterRemoveWorkerRequest$Outbound; +} + +export function clusterRemoveWorkerRequestToJSON( + clusterRemoveWorkerRequest: ClusterRemoveWorkerRequest, +): string { + return JSON.stringify( + ClusterRemoveWorkerRequest$outboundSchema.parse(clusterRemoveWorkerRequest), + ); +} + +export function clusterRemoveWorkerRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ClusterRemoveWorkerRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ClusterRemoveWorkerRequest' from JSON`, + ); +} diff --git a/src/models/operations/composecleanqueues.ts b/src/models/operations/composecleanqueues.ts new file mode 100644 index 0000000..61c8235 --- /dev/null +++ b/src/models/operations/composecleanqueues.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ComposeCleanQueuesRequest = { + composeId: string; +}; + +/** @internal */ +export const ComposeCleanQueuesRequest$inboundSchema: z.ZodType< + ComposeCleanQueuesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + composeId: z.string(), +}); + +/** @internal */ +export type ComposeCleanQueuesRequest$Outbound = { + composeId: string; +}; + +/** @internal */ +export const ComposeCleanQueuesRequest$outboundSchema: z.ZodType< + ComposeCleanQueuesRequest$Outbound, + z.ZodTypeDef, + ComposeCleanQueuesRequest +> = z.object({ + composeId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ComposeCleanQueuesRequest$ { + /** @deprecated use `ComposeCleanQueuesRequest$inboundSchema` instead. */ + export const inboundSchema = ComposeCleanQueuesRequest$inboundSchema; + /** @deprecated use `ComposeCleanQueuesRequest$outboundSchema` instead. */ + export const outboundSchema = ComposeCleanQueuesRequest$outboundSchema; + /** @deprecated use `ComposeCleanQueuesRequest$Outbound` instead. */ + export type Outbound = ComposeCleanQueuesRequest$Outbound; +} + +export function composeCleanQueuesRequestToJSON( + composeCleanQueuesRequest: ComposeCleanQueuesRequest, +): string { + return JSON.stringify( + ComposeCleanQueuesRequest$outboundSchema.parse(composeCleanQueuesRequest), + ); +} + +export function composeCleanQueuesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ComposeCleanQueuesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ComposeCleanQueuesRequest' from JSON`, + ); +} diff --git a/src/models/operations/composecreate.ts b/src/models/operations/composecreate.ts new file mode 100644 index 0000000..41b5ae7 --- /dev/null +++ b/src/models/operations/composecreate.ts @@ -0,0 +1,116 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const ComposeCreateComposeType = { + DockerCompose: "docker-compose", + Stack: "stack", +} as const; +export type ComposeCreateComposeType = ClosedEnum< + typeof ComposeCreateComposeType +>; + +export type ComposeCreateRequest = { + name: string; + description?: string | null | undefined; + projectId: string; + composeType?: ComposeCreateComposeType | undefined; + appName?: string | undefined; + serverId?: string | null | undefined; +}; + +/** @internal */ +export const ComposeCreateComposeType$inboundSchema: z.ZodNativeEnum< + typeof ComposeCreateComposeType +> = z.nativeEnum(ComposeCreateComposeType); + +/** @internal */ +export const ComposeCreateComposeType$outboundSchema: z.ZodNativeEnum< + typeof ComposeCreateComposeType +> = ComposeCreateComposeType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ComposeCreateComposeType$ { + /** @deprecated use `ComposeCreateComposeType$inboundSchema` instead. */ + export const inboundSchema = ComposeCreateComposeType$inboundSchema; + /** @deprecated use `ComposeCreateComposeType$outboundSchema` instead. */ + export const outboundSchema = ComposeCreateComposeType$outboundSchema; +} + +/** @internal */ +export const ComposeCreateRequest$inboundSchema: z.ZodType< + ComposeCreateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + description: z.nullable(z.string()).optional(), + projectId: z.string(), + composeType: ComposeCreateComposeType$inboundSchema.optional(), + appName: z.string().optional(), + serverId: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type ComposeCreateRequest$Outbound = { + name: string; + description?: string | null | undefined; + projectId: string; + composeType?: string | undefined; + appName?: string | undefined; + serverId?: string | null | undefined; +}; + +/** @internal */ +export const ComposeCreateRequest$outboundSchema: z.ZodType< + ComposeCreateRequest$Outbound, + z.ZodTypeDef, + ComposeCreateRequest +> = z.object({ + name: z.string(), + description: z.nullable(z.string()).optional(), + projectId: z.string(), + composeType: ComposeCreateComposeType$outboundSchema.optional(), + appName: z.string().optional(), + serverId: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ComposeCreateRequest$ { + /** @deprecated use `ComposeCreateRequest$inboundSchema` instead. */ + export const inboundSchema = ComposeCreateRequest$inboundSchema; + /** @deprecated use `ComposeCreateRequest$outboundSchema` instead. */ + export const outboundSchema = ComposeCreateRequest$outboundSchema; + /** @deprecated use `ComposeCreateRequest$Outbound` instead. */ + export type Outbound = ComposeCreateRequest$Outbound; +} + +export function composeCreateRequestToJSON( + composeCreateRequest: ComposeCreateRequest, +): string { + return JSON.stringify( + ComposeCreateRequest$outboundSchema.parse(composeCreateRequest), + ); +} + +export function composeCreateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ComposeCreateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ComposeCreateRequest' from JSON`, + ); +} diff --git a/src/models/operations/composedelete.ts b/src/models/operations/composedelete.ts new file mode 100644 index 0000000..8a97894 --- /dev/null +++ b/src/models/operations/composedelete.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ComposeDeleteRequest = { + composeId: string; +}; + +/** @internal */ +export const ComposeDeleteRequest$inboundSchema: z.ZodType< + ComposeDeleteRequest, + z.ZodTypeDef, + unknown +> = z.object({ + composeId: z.string(), +}); + +/** @internal */ +export type ComposeDeleteRequest$Outbound = { + composeId: string; +}; + +/** @internal */ +export const ComposeDeleteRequest$outboundSchema: z.ZodType< + ComposeDeleteRequest$Outbound, + z.ZodTypeDef, + ComposeDeleteRequest +> = z.object({ + composeId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ComposeDeleteRequest$ { + /** @deprecated use `ComposeDeleteRequest$inboundSchema` instead. */ + export const inboundSchema = ComposeDeleteRequest$inboundSchema; + /** @deprecated use `ComposeDeleteRequest$outboundSchema` instead. */ + export const outboundSchema = ComposeDeleteRequest$outboundSchema; + /** @deprecated use `ComposeDeleteRequest$Outbound` instead. */ + export type Outbound = ComposeDeleteRequest$Outbound; +} + +export function composeDeleteRequestToJSON( + composeDeleteRequest: ComposeDeleteRequest, +): string { + return JSON.stringify( + ComposeDeleteRequest$outboundSchema.parse(composeDeleteRequest), + ); +} + +export function composeDeleteRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ComposeDeleteRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ComposeDeleteRequest' from JSON`, + ); +} diff --git a/src/models/operations/composedeploy.ts b/src/models/operations/composedeploy.ts new file mode 100644 index 0000000..c12be0a --- /dev/null +++ b/src/models/operations/composedeploy.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ComposeDeployRequest = { + composeId: string; +}; + +/** @internal */ +export const ComposeDeployRequest$inboundSchema: z.ZodType< + ComposeDeployRequest, + z.ZodTypeDef, + unknown +> = z.object({ + composeId: z.string(), +}); + +/** @internal */ +export type ComposeDeployRequest$Outbound = { + composeId: string; +}; + +/** @internal */ +export const ComposeDeployRequest$outboundSchema: z.ZodType< + ComposeDeployRequest$Outbound, + z.ZodTypeDef, + ComposeDeployRequest +> = z.object({ + composeId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ComposeDeployRequest$ { + /** @deprecated use `ComposeDeployRequest$inboundSchema` instead. */ + export const inboundSchema = ComposeDeployRequest$inboundSchema; + /** @deprecated use `ComposeDeployRequest$outboundSchema` instead. */ + export const outboundSchema = ComposeDeployRequest$outboundSchema; + /** @deprecated use `ComposeDeployRequest$Outbound` instead. */ + export type Outbound = ComposeDeployRequest$Outbound; +} + +export function composeDeployRequestToJSON( + composeDeployRequest: ComposeDeployRequest, +): string { + return JSON.stringify( + ComposeDeployRequest$outboundSchema.parse(composeDeployRequest), + ); +} + +export function composeDeployRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ComposeDeployRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ComposeDeployRequest' from JSON`, + ); +} diff --git a/src/models/operations/composedeploytemplate.ts b/src/models/operations/composedeploytemplate.ts new file mode 100644 index 0000000..c95ebc0 --- /dev/null +++ b/src/models/operations/composedeploytemplate.ts @@ -0,0 +1,76 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ComposeDeployTemplateRequest = { + projectId: string; + id: string; + serverId?: string | undefined; +}; + +/** @internal */ +export const ComposeDeployTemplateRequest$inboundSchema: z.ZodType< + ComposeDeployTemplateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + projectId: z.string(), + id: z.string(), + serverId: z.string().optional(), +}); + +/** @internal */ +export type ComposeDeployTemplateRequest$Outbound = { + projectId: string; + id: string; + serverId?: string | undefined; +}; + +/** @internal */ +export const ComposeDeployTemplateRequest$outboundSchema: z.ZodType< + ComposeDeployTemplateRequest$Outbound, + z.ZodTypeDef, + ComposeDeployTemplateRequest +> = z.object({ + projectId: z.string(), + id: z.string(), + serverId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ComposeDeployTemplateRequest$ { + /** @deprecated use `ComposeDeployTemplateRequest$inboundSchema` instead. */ + export const inboundSchema = ComposeDeployTemplateRequest$inboundSchema; + /** @deprecated use `ComposeDeployTemplateRequest$outboundSchema` instead. */ + export const outboundSchema = ComposeDeployTemplateRequest$outboundSchema; + /** @deprecated use `ComposeDeployTemplateRequest$Outbound` instead. */ + export type Outbound = ComposeDeployTemplateRequest$Outbound; +} + +export function composeDeployTemplateRequestToJSON( + composeDeployTemplateRequest: ComposeDeployTemplateRequest, +): string { + return JSON.stringify( + ComposeDeployTemplateRequest$outboundSchema.parse( + composeDeployTemplateRequest, + ), + ); +} + +export function composeDeployTemplateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ComposeDeployTemplateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ComposeDeployTemplateRequest' from JSON`, + ); +} diff --git a/src/models/operations/composefetchsourcetype.ts b/src/models/operations/composefetchsourcetype.ts new file mode 100644 index 0000000..649fe82 --- /dev/null +++ b/src/models/operations/composefetchsourcetype.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ComposeFetchSourceTypeRequest = { + composeId: string; +}; + +/** @internal */ +export const ComposeFetchSourceTypeRequest$inboundSchema: z.ZodType< + ComposeFetchSourceTypeRequest, + z.ZodTypeDef, + unknown +> = z.object({ + composeId: z.string(), +}); + +/** @internal */ +export type ComposeFetchSourceTypeRequest$Outbound = { + composeId: string; +}; + +/** @internal */ +export const ComposeFetchSourceTypeRequest$outboundSchema: z.ZodType< + ComposeFetchSourceTypeRequest$Outbound, + z.ZodTypeDef, + ComposeFetchSourceTypeRequest +> = z.object({ + composeId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ComposeFetchSourceTypeRequest$ { + /** @deprecated use `ComposeFetchSourceTypeRequest$inboundSchema` instead. */ + export const inboundSchema = ComposeFetchSourceTypeRequest$inboundSchema; + /** @deprecated use `ComposeFetchSourceTypeRequest$outboundSchema` instead. */ + export const outboundSchema = ComposeFetchSourceTypeRequest$outboundSchema; + /** @deprecated use `ComposeFetchSourceTypeRequest$Outbound` instead. */ + export type Outbound = ComposeFetchSourceTypeRequest$Outbound; +} + +export function composeFetchSourceTypeRequestToJSON( + composeFetchSourceTypeRequest: ComposeFetchSourceTypeRequest, +): string { + return JSON.stringify( + ComposeFetchSourceTypeRequest$outboundSchema.parse( + composeFetchSourceTypeRequest, + ), + ); +} + +export function composeFetchSourceTypeRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ComposeFetchSourceTypeRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ComposeFetchSourceTypeRequest' from JSON`, + ); +} diff --git a/src/models/operations/composegetconvertedcompose.ts b/src/models/operations/composegetconvertedcompose.ts new file mode 100644 index 0000000..b2206b0 --- /dev/null +++ b/src/models/operations/composegetconvertedcompose.ts @@ -0,0 +1,69 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ComposeGetConvertedComposeRequest = { + composeId: string; +}; + +/** @internal */ +export const ComposeGetConvertedComposeRequest$inboundSchema: z.ZodType< + ComposeGetConvertedComposeRequest, + z.ZodTypeDef, + unknown +> = z.object({ + composeId: z.string(), +}); + +/** @internal */ +export type ComposeGetConvertedComposeRequest$Outbound = { + composeId: string; +}; + +/** @internal */ +export const ComposeGetConvertedComposeRequest$outboundSchema: z.ZodType< + ComposeGetConvertedComposeRequest$Outbound, + z.ZodTypeDef, + ComposeGetConvertedComposeRequest +> = z.object({ + composeId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ComposeGetConvertedComposeRequest$ { + /** @deprecated use `ComposeGetConvertedComposeRequest$inboundSchema` instead. */ + export const inboundSchema = ComposeGetConvertedComposeRequest$inboundSchema; + /** @deprecated use `ComposeGetConvertedComposeRequest$outboundSchema` instead. */ + export const outboundSchema = + ComposeGetConvertedComposeRequest$outboundSchema; + /** @deprecated use `ComposeGetConvertedComposeRequest$Outbound` instead. */ + export type Outbound = ComposeGetConvertedComposeRequest$Outbound; +} + +export function composeGetConvertedComposeRequestToJSON( + composeGetConvertedComposeRequest: ComposeGetConvertedComposeRequest, +): string { + return JSON.stringify( + ComposeGetConvertedComposeRequest$outboundSchema.parse( + composeGetConvertedComposeRequest, + ), + ); +} + +export function composeGetConvertedComposeRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ComposeGetConvertedComposeRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ComposeGetConvertedComposeRequest' from JSON`, + ); +} diff --git a/src/models/operations/composegetdefaultcommand.ts b/src/models/operations/composegetdefaultcommand.ts new file mode 100644 index 0000000..4afcddf --- /dev/null +++ b/src/models/operations/composegetdefaultcommand.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ComposeGetDefaultCommandRequest = { + composeId: string; +}; + +/** @internal */ +export const ComposeGetDefaultCommandRequest$inboundSchema: z.ZodType< + ComposeGetDefaultCommandRequest, + z.ZodTypeDef, + unknown +> = z.object({ + composeId: z.string(), +}); + +/** @internal */ +export type ComposeGetDefaultCommandRequest$Outbound = { + composeId: string; +}; + +/** @internal */ +export const ComposeGetDefaultCommandRequest$outboundSchema: z.ZodType< + ComposeGetDefaultCommandRequest$Outbound, + z.ZodTypeDef, + ComposeGetDefaultCommandRequest +> = z.object({ + composeId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ComposeGetDefaultCommandRequest$ { + /** @deprecated use `ComposeGetDefaultCommandRequest$inboundSchema` instead. */ + export const inboundSchema = ComposeGetDefaultCommandRequest$inboundSchema; + /** @deprecated use `ComposeGetDefaultCommandRequest$outboundSchema` instead. */ + export const outboundSchema = ComposeGetDefaultCommandRequest$outboundSchema; + /** @deprecated use `ComposeGetDefaultCommandRequest$Outbound` instead. */ + export type Outbound = ComposeGetDefaultCommandRequest$Outbound; +} + +export function composeGetDefaultCommandRequestToJSON( + composeGetDefaultCommandRequest: ComposeGetDefaultCommandRequest, +): string { + return JSON.stringify( + ComposeGetDefaultCommandRequest$outboundSchema.parse( + composeGetDefaultCommandRequest, + ), + ); +} + +export function composeGetDefaultCommandRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ComposeGetDefaultCommandRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ComposeGetDefaultCommandRequest' from JSON`, + ); +} diff --git a/src/models/operations/composeone.ts b/src/models/operations/composeone.ts new file mode 100644 index 0000000..a2778d5 --- /dev/null +++ b/src/models/operations/composeone.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ComposeOneRequest = { + composeId: string; +}; + +/** @internal */ +export const ComposeOneRequest$inboundSchema: z.ZodType< + ComposeOneRequest, + z.ZodTypeDef, + unknown +> = z.object({ + composeId: z.string(), +}); + +/** @internal */ +export type ComposeOneRequest$Outbound = { + composeId: string; +}; + +/** @internal */ +export const ComposeOneRequest$outboundSchema: z.ZodType< + ComposeOneRequest$Outbound, + z.ZodTypeDef, + ComposeOneRequest +> = z.object({ + composeId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ComposeOneRequest$ { + /** @deprecated use `ComposeOneRequest$inboundSchema` instead. */ + export const inboundSchema = ComposeOneRequest$inboundSchema; + /** @deprecated use `ComposeOneRequest$outboundSchema` instead. */ + export const outboundSchema = ComposeOneRequest$outboundSchema; + /** @deprecated use `ComposeOneRequest$Outbound` instead. */ + export type Outbound = ComposeOneRequest$Outbound; +} + +export function composeOneRequestToJSON( + composeOneRequest: ComposeOneRequest, +): string { + return JSON.stringify( + ComposeOneRequest$outboundSchema.parse(composeOneRequest), + ); +} + +export function composeOneRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ComposeOneRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ComposeOneRequest' from JSON`, + ); +} diff --git a/src/models/operations/composerandomizecompose.ts b/src/models/operations/composerandomizecompose.ts new file mode 100644 index 0000000..d2bfdee --- /dev/null +++ b/src/models/operations/composerandomizecompose.ts @@ -0,0 +1,72 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ComposeRandomizeComposeRequest = { + composeId: string; + suffix?: string | undefined; +}; + +/** @internal */ +export const ComposeRandomizeComposeRequest$inboundSchema: z.ZodType< + ComposeRandomizeComposeRequest, + z.ZodTypeDef, + unknown +> = z.object({ + composeId: z.string(), + suffix: z.string().optional(), +}); + +/** @internal */ +export type ComposeRandomizeComposeRequest$Outbound = { + composeId: string; + suffix?: string | undefined; +}; + +/** @internal */ +export const ComposeRandomizeComposeRequest$outboundSchema: z.ZodType< + ComposeRandomizeComposeRequest$Outbound, + z.ZodTypeDef, + ComposeRandomizeComposeRequest +> = z.object({ + composeId: z.string(), + suffix: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ComposeRandomizeComposeRequest$ { + /** @deprecated use `ComposeRandomizeComposeRequest$inboundSchema` instead. */ + export const inboundSchema = ComposeRandomizeComposeRequest$inboundSchema; + /** @deprecated use `ComposeRandomizeComposeRequest$outboundSchema` instead. */ + export const outboundSchema = ComposeRandomizeComposeRequest$outboundSchema; + /** @deprecated use `ComposeRandomizeComposeRequest$Outbound` instead. */ + export type Outbound = ComposeRandomizeComposeRequest$Outbound; +} + +export function composeRandomizeComposeRequestToJSON( + composeRandomizeComposeRequest: ComposeRandomizeComposeRequest, +): string { + return JSON.stringify( + ComposeRandomizeComposeRequest$outboundSchema.parse( + composeRandomizeComposeRequest, + ), + ); +} + +export function composeRandomizeComposeRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ComposeRandomizeComposeRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ComposeRandomizeComposeRequest' from JSON`, + ); +} diff --git a/src/models/operations/composeredeploy.ts b/src/models/operations/composeredeploy.ts new file mode 100644 index 0000000..3935a96 --- /dev/null +++ b/src/models/operations/composeredeploy.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ComposeRedeployRequest = { + composeId: string; +}; + +/** @internal */ +export const ComposeRedeployRequest$inboundSchema: z.ZodType< + ComposeRedeployRequest, + z.ZodTypeDef, + unknown +> = z.object({ + composeId: z.string(), +}); + +/** @internal */ +export type ComposeRedeployRequest$Outbound = { + composeId: string; +}; + +/** @internal */ +export const ComposeRedeployRequest$outboundSchema: z.ZodType< + ComposeRedeployRequest$Outbound, + z.ZodTypeDef, + ComposeRedeployRequest +> = z.object({ + composeId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ComposeRedeployRequest$ { + /** @deprecated use `ComposeRedeployRequest$inboundSchema` instead. */ + export const inboundSchema = ComposeRedeployRequest$inboundSchema; + /** @deprecated use `ComposeRedeployRequest$outboundSchema` instead. */ + export const outboundSchema = ComposeRedeployRequest$outboundSchema; + /** @deprecated use `ComposeRedeployRequest$Outbound` instead. */ + export type Outbound = ComposeRedeployRequest$Outbound; +} + +export function composeRedeployRequestToJSON( + composeRedeployRequest: ComposeRedeployRequest, +): string { + return JSON.stringify( + ComposeRedeployRequest$outboundSchema.parse(composeRedeployRequest), + ); +} + +export function composeRedeployRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ComposeRedeployRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ComposeRedeployRequest' from JSON`, + ); +} diff --git a/src/models/operations/composerefreshtoken.ts b/src/models/operations/composerefreshtoken.ts new file mode 100644 index 0000000..5ac0f82 --- /dev/null +++ b/src/models/operations/composerefreshtoken.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ComposeRefreshTokenRequest = { + composeId: string; +}; + +/** @internal */ +export const ComposeRefreshTokenRequest$inboundSchema: z.ZodType< + ComposeRefreshTokenRequest, + z.ZodTypeDef, + unknown +> = z.object({ + composeId: z.string(), +}); + +/** @internal */ +export type ComposeRefreshTokenRequest$Outbound = { + composeId: string; +}; + +/** @internal */ +export const ComposeRefreshTokenRequest$outboundSchema: z.ZodType< + ComposeRefreshTokenRequest$Outbound, + z.ZodTypeDef, + ComposeRefreshTokenRequest +> = z.object({ + composeId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ComposeRefreshTokenRequest$ { + /** @deprecated use `ComposeRefreshTokenRequest$inboundSchema` instead. */ + export const inboundSchema = ComposeRefreshTokenRequest$inboundSchema; + /** @deprecated use `ComposeRefreshTokenRequest$outboundSchema` instead. */ + export const outboundSchema = ComposeRefreshTokenRequest$outboundSchema; + /** @deprecated use `ComposeRefreshTokenRequest$Outbound` instead. */ + export type Outbound = ComposeRefreshTokenRequest$Outbound; +} + +export function composeRefreshTokenRequestToJSON( + composeRefreshTokenRequest: ComposeRefreshTokenRequest, +): string { + return JSON.stringify( + ComposeRefreshTokenRequest$outboundSchema.parse(composeRefreshTokenRequest), + ); +} + +export function composeRefreshTokenRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ComposeRefreshTokenRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ComposeRefreshTokenRequest' from JSON`, + ); +} diff --git a/src/models/operations/composestop.ts b/src/models/operations/composestop.ts new file mode 100644 index 0000000..422070f --- /dev/null +++ b/src/models/operations/composestop.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ComposeStopRequest = { + composeId: string; +}; + +/** @internal */ +export const ComposeStopRequest$inboundSchema: z.ZodType< + ComposeStopRequest, + z.ZodTypeDef, + unknown +> = z.object({ + composeId: z.string(), +}); + +/** @internal */ +export type ComposeStopRequest$Outbound = { + composeId: string; +}; + +/** @internal */ +export const ComposeStopRequest$outboundSchema: z.ZodType< + ComposeStopRequest$Outbound, + z.ZodTypeDef, + ComposeStopRequest +> = z.object({ + composeId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ComposeStopRequest$ { + /** @deprecated use `ComposeStopRequest$inboundSchema` instead. */ + export const inboundSchema = ComposeStopRequest$inboundSchema; + /** @deprecated use `ComposeStopRequest$outboundSchema` instead. */ + export const outboundSchema = ComposeStopRequest$outboundSchema; + /** @deprecated use `ComposeStopRequest$Outbound` instead. */ + export type Outbound = ComposeStopRequest$Outbound; +} + +export function composeStopRequestToJSON( + composeStopRequest: ComposeStopRequest, +): string { + return JSON.stringify( + ComposeStopRequest$outboundSchema.parse(composeStopRequest), + ); +} + +export function composeStopRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ComposeStopRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ComposeStopRequest' from JSON`, + ); +} diff --git a/src/models/operations/composeupdate.ts b/src/models/operations/composeupdate.ts new file mode 100644 index 0000000..27143a3 --- /dev/null +++ b/src/models/operations/composeupdate.ts @@ -0,0 +1,289 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const ComposeUpdateSourceType = { + Git: "git", + Github: "github", + Gitlab: "gitlab", + Bitbucket: "bitbucket", + Raw: "raw", +} as const; +export type ComposeUpdateSourceType = ClosedEnum< + typeof ComposeUpdateSourceType +>; + +export const ComposeUpdateComposeType = { + DockerCompose: "docker-compose", + Stack: "stack", +} as const; +export type ComposeUpdateComposeType = ClosedEnum< + typeof ComposeUpdateComposeType +>; + +export const ComposeStatus = { + Idle: "idle", + Running: "running", + Done: "done", + Error: "error", +} as const; +export type ComposeStatus = ClosedEnum; + +export type ComposeUpdateRequest = { + composeId: string; + name?: string | undefined; + appName?: string | undefined; + description?: string | null | undefined; + env?: string | null | undefined; + composeFile?: string | undefined; + refreshToken?: string | null | undefined; + sourceType?: ComposeUpdateSourceType | undefined; + composeType?: ComposeUpdateComposeType | undefined; + repository?: string | null | undefined; + owner?: string | null | undefined; + branch?: string | null | undefined; + autoDeploy?: boolean | null | undefined; + gitlabProjectId?: number | null | undefined; + gitlabRepository?: string | null | undefined; + gitlabOwner?: string | null | undefined; + gitlabBranch?: string | null | undefined; + gitlabPathNamespace?: string | null | undefined; + bitbucketRepository?: string | null | undefined; + bitbucketOwner?: string | null | undefined; + bitbucketBranch?: string | null | undefined; + customGitUrl?: string | null | undefined; + customGitBranch?: string | null | undefined; + customGitSSHKeyId?: string | null | undefined; + command?: string | undefined; + composePath?: string | undefined; + suffix?: string | undefined; + randomize?: boolean | undefined; + composeStatus?: ComposeStatus | undefined; + projectId?: string | undefined; + createdAt?: string | undefined; + githubId?: string | null | undefined; + gitlabId?: string | null | undefined; + bitbucketId?: string | null | undefined; +}; + +/** @internal */ +export const ComposeUpdateSourceType$inboundSchema: z.ZodNativeEnum< + typeof ComposeUpdateSourceType +> = z.nativeEnum(ComposeUpdateSourceType); + +/** @internal */ +export const ComposeUpdateSourceType$outboundSchema: z.ZodNativeEnum< + typeof ComposeUpdateSourceType +> = ComposeUpdateSourceType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ComposeUpdateSourceType$ { + /** @deprecated use `ComposeUpdateSourceType$inboundSchema` instead. */ + export const inboundSchema = ComposeUpdateSourceType$inboundSchema; + /** @deprecated use `ComposeUpdateSourceType$outboundSchema` instead. */ + export const outboundSchema = ComposeUpdateSourceType$outboundSchema; +} + +/** @internal */ +export const ComposeUpdateComposeType$inboundSchema: z.ZodNativeEnum< + typeof ComposeUpdateComposeType +> = z.nativeEnum(ComposeUpdateComposeType); + +/** @internal */ +export const ComposeUpdateComposeType$outboundSchema: z.ZodNativeEnum< + typeof ComposeUpdateComposeType +> = ComposeUpdateComposeType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ComposeUpdateComposeType$ { + /** @deprecated use `ComposeUpdateComposeType$inboundSchema` instead. */ + export const inboundSchema = ComposeUpdateComposeType$inboundSchema; + /** @deprecated use `ComposeUpdateComposeType$outboundSchema` instead. */ + export const outboundSchema = ComposeUpdateComposeType$outboundSchema; +} + +/** @internal */ +export const ComposeStatus$inboundSchema: z.ZodNativeEnum< + typeof ComposeStatus +> = z.nativeEnum(ComposeStatus); + +/** @internal */ +export const ComposeStatus$outboundSchema: z.ZodNativeEnum< + typeof ComposeStatus +> = ComposeStatus$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ComposeStatus$ { + /** @deprecated use `ComposeStatus$inboundSchema` instead. */ + export const inboundSchema = ComposeStatus$inboundSchema; + /** @deprecated use `ComposeStatus$outboundSchema` instead. */ + export const outboundSchema = ComposeStatus$outboundSchema; +} + +/** @internal */ +export const ComposeUpdateRequest$inboundSchema: z.ZodType< + ComposeUpdateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + composeId: z.string(), + name: z.string().optional(), + appName: z.string().optional(), + description: z.nullable(z.string()).optional(), + env: z.nullable(z.string()).optional(), + composeFile: z.string().optional(), + refreshToken: z.nullable(z.string()).optional(), + sourceType: ComposeUpdateSourceType$inboundSchema.optional(), + composeType: ComposeUpdateComposeType$inboundSchema.optional(), + repository: z.nullable(z.string()).optional(), + owner: z.nullable(z.string()).optional(), + branch: z.nullable(z.string()).optional(), + autoDeploy: z.nullable(z.boolean()).optional(), + gitlabProjectId: z.nullable(z.number()).optional(), + gitlabRepository: z.nullable(z.string()).optional(), + gitlabOwner: z.nullable(z.string()).optional(), + gitlabBranch: z.nullable(z.string()).optional(), + gitlabPathNamespace: z.nullable(z.string()).optional(), + bitbucketRepository: z.nullable(z.string()).optional(), + bitbucketOwner: z.nullable(z.string()).optional(), + bitbucketBranch: z.nullable(z.string()).optional(), + customGitUrl: z.nullable(z.string()).optional(), + customGitBranch: z.nullable(z.string()).optional(), + customGitSSHKeyId: z.nullable(z.string()).optional(), + command: z.string().optional(), + composePath: z.string().optional(), + suffix: z.string().optional(), + randomize: z.boolean().optional(), + composeStatus: ComposeStatus$inboundSchema.optional(), + projectId: z.string().optional(), + createdAt: z.string().optional(), + githubId: z.nullable(z.string()).optional(), + gitlabId: z.nullable(z.string()).optional(), + bitbucketId: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type ComposeUpdateRequest$Outbound = { + composeId: string; + name?: string | undefined; + appName?: string | undefined; + description?: string | null | undefined; + env?: string | null | undefined; + composeFile?: string | undefined; + refreshToken?: string | null | undefined; + sourceType?: string | undefined; + composeType?: string | undefined; + repository?: string | null | undefined; + owner?: string | null | undefined; + branch?: string | null | undefined; + autoDeploy?: boolean | null | undefined; + gitlabProjectId?: number | null | undefined; + gitlabRepository?: string | null | undefined; + gitlabOwner?: string | null | undefined; + gitlabBranch?: string | null | undefined; + gitlabPathNamespace?: string | null | undefined; + bitbucketRepository?: string | null | undefined; + bitbucketOwner?: string | null | undefined; + bitbucketBranch?: string | null | undefined; + customGitUrl?: string | null | undefined; + customGitBranch?: string | null | undefined; + customGitSSHKeyId?: string | null | undefined; + command?: string | undefined; + composePath?: string | undefined; + suffix?: string | undefined; + randomize?: boolean | undefined; + composeStatus?: string | undefined; + projectId?: string | undefined; + createdAt?: string | undefined; + githubId?: string | null | undefined; + gitlabId?: string | null | undefined; + bitbucketId?: string | null | undefined; +}; + +/** @internal */ +export const ComposeUpdateRequest$outboundSchema: z.ZodType< + ComposeUpdateRequest$Outbound, + z.ZodTypeDef, + ComposeUpdateRequest +> = z.object({ + composeId: z.string(), + name: z.string().optional(), + appName: z.string().optional(), + description: z.nullable(z.string()).optional(), + env: z.nullable(z.string()).optional(), + composeFile: z.string().optional(), + refreshToken: z.nullable(z.string()).optional(), + sourceType: ComposeUpdateSourceType$outboundSchema.optional(), + composeType: ComposeUpdateComposeType$outboundSchema.optional(), + repository: z.nullable(z.string()).optional(), + owner: z.nullable(z.string()).optional(), + branch: z.nullable(z.string()).optional(), + autoDeploy: z.nullable(z.boolean()).optional(), + gitlabProjectId: z.nullable(z.number()).optional(), + gitlabRepository: z.nullable(z.string()).optional(), + gitlabOwner: z.nullable(z.string()).optional(), + gitlabBranch: z.nullable(z.string()).optional(), + gitlabPathNamespace: z.nullable(z.string()).optional(), + bitbucketRepository: z.nullable(z.string()).optional(), + bitbucketOwner: z.nullable(z.string()).optional(), + bitbucketBranch: z.nullable(z.string()).optional(), + customGitUrl: z.nullable(z.string()).optional(), + customGitBranch: z.nullable(z.string()).optional(), + customGitSSHKeyId: z.nullable(z.string()).optional(), + command: z.string().optional(), + composePath: z.string().optional(), + suffix: z.string().optional(), + randomize: z.boolean().optional(), + composeStatus: ComposeStatus$outboundSchema.optional(), + projectId: z.string().optional(), + createdAt: z.string().optional(), + githubId: z.nullable(z.string()).optional(), + gitlabId: z.nullable(z.string()).optional(), + bitbucketId: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ComposeUpdateRequest$ { + /** @deprecated use `ComposeUpdateRequest$inboundSchema` instead. */ + export const inboundSchema = ComposeUpdateRequest$inboundSchema; + /** @deprecated use `ComposeUpdateRequest$outboundSchema` instead. */ + export const outboundSchema = ComposeUpdateRequest$outboundSchema; + /** @deprecated use `ComposeUpdateRequest$Outbound` instead. */ + export type Outbound = ComposeUpdateRequest$Outbound; +} + +export function composeUpdateRequestToJSON( + composeUpdateRequest: ComposeUpdateRequest, +): string { + return JSON.stringify( + ComposeUpdateRequest$outboundSchema.parse(composeUpdateRequest), + ); +} + +export function composeUpdateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ComposeUpdateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ComposeUpdateRequest' from JSON`, + ); +} diff --git a/src/models/operations/deploymentall.ts b/src/models/operations/deploymentall.ts new file mode 100644 index 0000000..ccbaf72 --- /dev/null +++ b/src/models/operations/deploymentall.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeploymentAllRequest = { + applicationId: string; +}; + +/** @internal */ +export const DeploymentAllRequest$inboundSchema: z.ZodType< + DeploymentAllRequest, + z.ZodTypeDef, + unknown +> = z.object({ + applicationId: z.string(), +}); + +/** @internal */ +export type DeploymentAllRequest$Outbound = { + applicationId: string; +}; + +/** @internal */ +export const DeploymentAllRequest$outboundSchema: z.ZodType< + DeploymentAllRequest$Outbound, + z.ZodTypeDef, + DeploymentAllRequest +> = z.object({ + applicationId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeploymentAllRequest$ { + /** @deprecated use `DeploymentAllRequest$inboundSchema` instead. */ + export const inboundSchema = DeploymentAllRequest$inboundSchema; + /** @deprecated use `DeploymentAllRequest$outboundSchema` instead. */ + export const outboundSchema = DeploymentAllRequest$outboundSchema; + /** @deprecated use `DeploymentAllRequest$Outbound` instead. */ + export type Outbound = DeploymentAllRequest$Outbound; +} + +export function deploymentAllRequestToJSON( + deploymentAllRequest: DeploymentAllRequest, +): string { + return JSON.stringify( + DeploymentAllRequest$outboundSchema.parse(deploymentAllRequest), + ); +} + +export function deploymentAllRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeploymentAllRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeploymentAllRequest' from JSON`, + ); +} diff --git a/src/models/operations/deploymentallbycompose.ts b/src/models/operations/deploymentallbycompose.ts new file mode 100644 index 0000000..a63066e --- /dev/null +++ b/src/models/operations/deploymentallbycompose.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeploymentAllByComposeRequest = { + composeId: string; +}; + +/** @internal */ +export const DeploymentAllByComposeRequest$inboundSchema: z.ZodType< + DeploymentAllByComposeRequest, + z.ZodTypeDef, + unknown +> = z.object({ + composeId: z.string(), +}); + +/** @internal */ +export type DeploymentAllByComposeRequest$Outbound = { + composeId: string; +}; + +/** @internal */ +export const DeploymentAllByComposeRequest$outboundSchema: z.ZodType< + DeploymentAllByComposeRequest$Outbound, + z.ZodTypeDef, + DeploymentAllByComposeRequest +> = z.object({ + composeId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeploymentAllByComposeRequest$ { + /** @deprecated use `DeploymentAllByComposeRequest$inboundSchema` instead. */ + export const inboundSchema = DeploymentAllByComposeRequest$inboundSchema; + /** @deprecated use `DeploymentAllByComposeRequest$outboundSchema` instead. */ + export const outboundSchema = DeploymentAllByComposeRequest$outboundSchema; + /** @deprecated use `DeploymentAllByComposeRequest$Outbound` instead. */ + export type Outbound = DeploymentAllByComposeRequest$Outbound; +} + +export function deploymentAllByComposeRequestToJSON( + deploymentAllByComposeRequest: DeploymentAllByComposeRequest, +): string { + return JSON.stringify( + DeploymentAllByComposeRequest$outboundSchema.parse( + deploymentAllByComposeRequest, + ), + ); +} + +export function deploymentAllByComposeRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeploymentAllByComposeRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeploymentAllByComposeRequest' from JSON`, + ); +} diff --git a/src/models/operations/deploymentallbyserver.ts b/src/models/operations/deploymentallbyserver.ts new file mode 100644 index 0000000..a37dc1e --- /dev/null +++ b/src/models/operations/deploymentallbyserver.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeploymentAllByServerRequest = { + serverId: string; +}; + +/** @internal */ +export const DeploymentAllByServerRequest$inboundSchema: z.ZodType< + DeploymentAllByServerRequest, + z.ZodTypeDef, + unknown +> = z.object({ + serverId: z.string(), +}); + +/** @internal */ +export type DeploymentAllByServerRequest$Outbound = { + serverId: string; +}; + +/** @internal */ +export const DeploymentAllByServerRequest$outboundSchema: z.ZodType< + DeploymentAllByServerRequest$Outbound, + z.ZodTypeDef, + DeploymentAllByServerRequest +> = z.object({ + serverId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeploymentAllByServerRequest$ { + /** @deprecated use `DeploymentAllByServerRequest$inboundSchema` instead. */ + export const inboundSchema = DeploymentAllByServerRequest$inboundSchema; + /** @deprecated use `DeploymentAllByServerRequest$outboundSchema` instead. */ + export const outboundSchema = DeploymentAllByServerRequest$outboundSchema; + /** @deprecated use `DeploymentAllByServerRequest$Outbound` instead. */ + export type Outbound = DeploymentAllByServerRequest$Outbound; +} + +export function deploymentAllByServerRequestToJSON( + deploymentAllByServerRequest: DeploymentAllByServerRequest, +): string { + return JSON.stringify( + DeploymentAllByServerRequest$outboundSchema.parse( + deploymentAllByServerRequest, + ), + ); +} + +export function deploymentAllByServerRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeploymentAllByServerRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeploymentAllByServerRequest' from JSON`, + ); +} diff --git a/src/models/operations/destinationcreate.ts b/src/models/operations/destinationcreate.ts new file mode 100644 index 0000000..c5537ea --- /dev/null +++ b/src/models/operations/destinationcreate.ts @@ -0,0 +1,90 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DestinationCreateRequest = { + name: string; + accessKey: string; + bucket: string; + region: string; + endpoint: string; + secretAccessKey: string; + serverId?: string | undefined; +}; + +/** @internal */ +export const DestinationCreateRequest$inboundSchema: z.ZodType< + DestinationCreateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + accessKey: z.string(), + bucket: z.string(), + region: z.string(), + endpoint: z.string(), + secretAccessKey: z.string(), + serverId: z.string().optional(), +}); + +/** @internal */ +export type DestinationCreateRequest$Outbound = { + name: string; + accessKey: string; + bucket: string; + region: string; + endpoint: string; + secretAccessKey: string; + serverId?: string | undefined; +}; + +/** @internal */ +export const DestinationCreateRequest$outboundSchema: z.ZodType< + DestinationCreateRequest$Outbound, + z.ZodTypeDef, + DestinationCreateRequest +> = z.object({ + name: z.string(), + accessKey: z.string(), + bucket: z.string(), + region: z.string(), + endpoint: z.string(), + secretAccessKey: z.string(), + serverId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DestinationCreateRequest$ { + /** @deprecated use `DestinationCreateRequest$inboundSchema` instead. */ + export const inboundSchema = DestinationCreateRequest$inboundSchema; + /** @deprecated use `DestinationCreateRequest$outboundSchema` instead. */ + export const outboundSchema = DestinationCreateRequest$outboundSchema; + /** @deprecated use `DestinationCreateRequest$Outbound` instead. */ + export type Outbound = DestinationCreateRequest$Outbound; +} + +export function destinationCreateRequestToJSON( + destinationCreateRequest: DestinationCreateRequest, +): string { + return JSON.stringify( + DestinationCreateRequest$outboundSchema.parse(destinationCreateRequest), + ); +} + +export function destinationCreateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DestinationCreateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DestinationCreateRequest' from JSON`, + ); +} diff --git a/src/models/operations/destinationone.ts b/src/models/operations/destinationone.ts new file mode 100644 index 0000000..27c3f7e --- /dev/null +++ b/src/models/operations/destinationone.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DestinationOneRequest = { + destinationId: string; +}; + +/** @internal */ +export const DestinationOneRequest$inboundSchema: z.ZodType< + DestinationOneRequest, + z.ZodTypeDef, + unknown +> = z.object({ + destinationId: z.string(), +}); + +/** @internal */ +export type DestinationOneRequest$Outbound = { + destinationId: string; +}; + +/** @internal */ +export const DestinationOneRequest$outboundSchema: z.ZodType< + DestinationOneRequest$Outbound, + z.ZodTypeDef, + DestinationOneRequest +> = z.object({ + destinationId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DestinationOneRequest$ { + /** @deprecated use `DestinationOneRequest$inboundSchema` instead. */ + export const inboundSchema = DestinationOneRequest$inboundSchema; + /** @deprecated use `DestinationOneRequest$outboundSchema` instead. */ + export const outboundSchema = DestinationOneRequest$outboundSchema; + /** @deprecated use `DestinationOneRequest$Outbound` instead. */ + export type Outbound = DestinationOneRequest$Outbound; +} + +export function destinationOneRequestToJSON( + destinationOneRequest: DestinationOneRequest, +): string { + return JSON.stringify( + DestinationOneRequest$outboundSchema.parse(destinationOneRequest), + ); +} + +export function destinationOneRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DestinationOneRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DestinationOneRequest' from JSON`, + ); +} diff --git a/src/models/operations/destinationremove.ts b/src/models/operations/destinationremove.ts new file mode 100644 index 0000000..b6fe26d --- /dev/null +++ b/src/models/operations/destinationremove.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DestinationRemoveRequest = { + destinationId: string; +}; + +/** @internal */ +export const DestinationRemoveRequest$inboundSchema: z.ZodType< + DestinationRemoveRequest, + z.ZodTypeDef, + unknown +> = z.object({ + destinationId: z.string(), +}); + +/** @internal */ +export type DestinationRemoveRequest$Outbound = { + destinationId: string; +}; + +/** @internal */ +export const DestinationRemoveRequest$outboundSchema: z.ZodType< + DestinationRemoveRequest$Outbound, + z.ZodTypeDef, + DestinationRemoveRequest +> = z.object({ + destinationId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DestinationRemoveRequest$ { + /** @deprecated use `DestinationRemoveRequest$inboundSchema` instead. */ + export const inboundSchema = DestinationRemoveRequest$inboundSchema; + /** @deprecated use `DestinationRemoveRequest$outboundSchema` instead. */ + export const outboundSchema = DestinationRemoveRequest$outboundSchema; + /** @deprecated use `DestinationRemoveRequest$Outbound` instead. */ + export type Outbound = DestinationRemoveRequest$Outbound; +} + +export function destinationRemoveRequestToJSON( + destinationRemoveRequest: DestinationRemoveRequest, +): string { + return JSON.stringify( + DestinationRemoveRequest$outboundSchema.parse(destinationRemoveRequest), + ); +} + +export function destinationRemoveRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DestinationRemoveRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DestinationRemoveRequest' from JSON`, + ); +} diff --git a/src/models/operations/destinationtestconnection.ts b/src/models/operations/destinationtestconnection.ts new file mode 100644 index 0000000..2861f83 --- /dev/null +++ b/src/models/operations/destinationtestconnection.ts @@ -0,0 +1,92 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DestinationTestConnectionRequest = { + name: string; + accessKey: string; + bucket: string; + region: string; + endpoint: string; + secretAccessKey: string; + serverId?: string | undefined; +}; + +/** @internal */ +export const DestinationTestConnectionRequest$inboundSchema: z.ZodType< + DestinationTestConnectionRequest, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + accessKey: z.string(), + bucket: z.string(), + region: z.string(), + endpoint: z.string(), + secretAccessKey: z.string(), + serverId: z.string().optional(), +}); + +/** @internal */ +export type DestinationTestConnectionRequest$Outbound = { + name: string; + accessKey: string; + bucket: string; + region: string; + endpoint: string; + secretAccessKey: string; + serverId?: string | undefined; +}; + +/** @internal */ +export const DestinationTestConnectionRequest$outboundSchema: z.ZodType< + DestinationTestConnectionRequest$Outbound, + z.ZodTypeDef, + DestinationTestConnectionRequest +> = z.object({ + name: z.string(), + accessKey: z.string(), + bucket: z.string(), + region: z.string(), + endpoint: z.string(), + secretAccessKey: z.string(), + serverId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DestinationTestConnectionRequest$ { + /** @deprecated use `DestinationTestConnectionRequest$inboundSchema` instead. */ + export const inboundSchema = DestinationTestConnectionRequest$inboundSchema; + /** @deprecated use `DestinationTestConnectionRequest$outboundSchema` instead. */ + export const outboundSchema = DestinationTestConnectionRequest$outboundSchema; + /** @deprecated use `DestinationTestConnectionRequest$Outbound` instead. */ + export type Outbound = DestinationTestConnectionRequest$Outbound; +} + +export function destinationTestConnectionRequestToJSON( + destinationTestConnectionRequest: DestinationTestConnectionRequest, +): string { + return JSON.stringify( + DestinationTestConnectionRequest$outboundSchema.parse( + destinationTestConnectionRequest, + ), + ); +} + +export function destinationTestConnectionRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DestinationTestConnectionRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DestinationTestConnectionRequest' from JSON`, + ); +} diff --git a/src/models/operations/destinationupdate.ts b/src/models/operations/destinationupdate.ts new file mode 100644 index 0000000..c67c5bb --- /dev/null +++ b/src/models/operations/destinationupdate.ts @@ -0,0 +1,94 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DestinationUpdateRequest = { + name: string; + accessKey: string; + bucket: string; + region: string; + endpoint: string; + secretAccessKey: string; + destinationId: string; + serverId?: string | undefined; +}; + +/** @internal */ +export const DestinationUpdateRequest$inboundSchema: z.ZodType< + DestinationUpdateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + accessKey: z.string(), + bucket: z.string(), + region: z.string(), + endpoint: z.string(), + secretAccessKey: z.string(), + destinationId: z.string(), + serverId: z.string().optional(), +}); + +/** @internal */ +export type DestinationUpdateRequest$Outbound = { + name: string; + accessKey: string; + bucket: string; + region: string; + endpoint: string; + secretAccessKey: string; + destinationId: string; + serverId?: string | undefined; +}; + +/** @internal */ +export const DestinationUpdateRequest$outboundSchema: z.ZodType< + DestinationUpdateRequest$Outbound, + z.ZodTypeDef, + DestinationUpdateRequest +> = z.object({ + name: z.string(), + accessKey: z.string(), + bucket: z.string(), + region: z.string(), + endpoint: z.string(), + secretAccessKey: z.string(), + destinationId: z.string(), + serverId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DestinationUpdateRequest$ { + /** @deprecated use `DestinationUpdateRequest$inboundSchema` instead. */ + export const inboundSchema = DestinationUpdateRequest$inboundSchema; + /** @deprecated use `DestinationUpdateRequest$outboundSchema` instead. */ + export const outboundSchema = DestinationUpdateRequest$outboundSchema; + /** @deprecated use `DestinationUpdateRequest$Outbound` instead. */ + export type Outbound = DestinationUpdateRequest$Outbound; +} + +export function destinationUpdateRequestToJSON( + destinationUpdateRequest: DestinationUpdateRequest, +): string { + return JSON.stringify( + DestinationUpdateRequest$outboundSchema.parse(destinationUpdateRequest), + ); +} + +export function destinationUpdateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DestinationUpdateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DestinationUpdateRequest' from JSON`, + ); +} diff --git a/src/models/operations/dockergetconfig.ts b/src/models/operations/dockergetconfig.ts new file mode 100644 index 0000000..4a6de77 --- /dev/null +++ b/src/models/operations/dockergetconfig.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DockerGetConfigRequest = { + containerId: string; + serverId?: string | undefined; +}; + +/** @internal */ +export const DockerGetConfigRequest$inboundSchema: z.ZodType< + DockerGetConfigRequest, + z.ZodTypeDef, + unknown +> = z.object({ + containerId: z.string(), + serverId: z.string().optional(), +}); + +/** @internal */ +export type DockerGetConfigRequest$Outbound = { + containerId: string; + serverId?: string | undefined; +}; + +/** @internal */ +export const DockerGetConfigRequest$outboundSchema: z.ZodType< + DockerGetConfigRequest$Outbound, + z.ZodTypeDef, + DockerGetConfigRequest +> = z.object({ + containerId: z.string(), + serverId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DockerGetConfigRequest$ { + /** @deprecated use `DockerGetConfigRequest$inboundSchema` instead. */ + export const inboundSchema = DockerGetConfigRequest$inboundSchema; + /** @deprecated use `DockerGetConfigRequest$outboundSchema` instead. */ + export const outboundSchema = DockerGetConfigRequest$outboundSchema; + /** @deprecated use `DockerGetConfigRequest$Outbound` instead. */ + export type Outbound = DockerGetConfigRequest$Outbound; +} + +export function dockerGetConfigRequestToJSON( + dockerGetConfigRequest: DockerGetConfigRequest, +): string { + return JSON.stringify( + DockerGetConfigRequest$outboundSchema.parse(dockerGetConfigRequest), + ); +} + +export function dockerGetConfigRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DockerGetConfigRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DockerGetConfigRequest' from JSON`, + ); +} diff --git a/src/models/operations/dockergetcontainers.ts b/src/models/operations/dockergetcontainers.ts new file mode 100644 index 0000000..9374b9b --- /dev/null +++ b/src/models/operations/dockergetcontainers.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DockerGetContainersRequest = { + serverId?: string | undefined; +}; + +/** @internal */ +export const DockerGetContainersRequest$inboundSchema: z.ZodType< + DockerGetContainersRequest, + z.ZodTypeDef, + unknown +> = z.object({ + serverId: z.string().optional(), +}); + +/** @internal */ +export type DockerGetContainersRequest$Outbound = { + serverId?: string | undefined; +}; + +/** @internal */ +export const DockerGetContainersRequest$outboundSchema: z.ZodType< + DockerGetContainersRequest$Outbound, + z.ZodTypeDef, + DockerGetContainersRequest +> = z.object({ + serverId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DockerGetContainersRequest$ { + /** @deprecated use `DockerGetContainersRequest$inboundSchema` instead. */ + export const inboundSchema = DockerGetContainersRequest$inboundSchema; + /** @deprecated use `DockerGetContainersRequest$outboundSchema` instead. */ + export const outboundSchema = DockerGetContainersRequest$outboundSchema; + /** @deprecated use `DockerGetContainersRequest$Outbound` instead. */ + export type Outbound = DockerGetContainersRequest$Outbound; +} + +export function dockerGetContainersRequestToJSON( + dockerGetContainersRequest: DockerGetContainersRequest, +): string { + return JSON.stringify( + DockerGetContainersRequest$outboundSchema.parse(dockerGetContainersRequest), + ); +} + +export function dockerGetContainersRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DockerGetContainersRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DockerGetContainersRequest' from JSON`, + ); +} diff --git a/src/models/operations/dockergetcontainersbyapplabel.ts b/src/models/operations/dockergetcontainersbyapplabel.ts new file mode 100644 index 0000000..d059185 --- /dev/null +++ b/src/models/operations/dockergetcontainersbyapplabel.ts @@ -0,0 +1,75 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DockerGetContainersByAppLabelRequest = { + appName: string; + serverId?: string | undefined; +}; + +/** @internal */ +export const DockerGetContainersByAppLabelRequest$inboundSchema: z.ZodType< + DockerGetContainersByAppLabelRequest, + z.ZodTypeDef, + unknown +> = z.object({ + appName: z.string(), + serverId: z.string().optional(), +}); + +/** @internal */ +export type DockerGetContainersByAppLabelRequest$Outbound = { + appName: string; + serverId?: string | undefined; +}; + +/** @internal */ +export const DockerGetContainersByAppLabelRequest$outboundSchema: z.ZodType< + DockerGetContainersByAppLabelRequest$Outbound, + z.ZodTypeDef, + DockerGetContainersByAppLabelRequest +> = z.object({ + appName: z.string(), + serverId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DockerGetContainersByAppLabelRequest$ { + /** @deprecated use `DockerGetContainersByAppLabelRequest$inboundSchema` instead. */ + export const inboundSchema = + DockerGetContainersByAppLabelRequest$inboundSchema; + /** @deprecated use `DockerGetContainersByAppLabelRequest$outboundSchema` instead. */ + export const outboundSchema = + DockerGetContainersByAppLabelRequest$outboundSchema; + /** @deprecated use `DockerGetContainersByAppLabelRequest$Outbound` instead. */ + export type Outbound = DockerGetContainersByAppLabelRequest$Outbound; +} + +export function dockerGetContainersByAppLabelRequestToJSON( + dockerGetContainersByAppLabelRequest: DockerGetContainersByAppLabelRequest, +): string { + return JSON.stringify( + DockerGetContainersByAppLabelRequest$outboundSchema.parse( + dockerGetContainersByAppLabelRequest, + ), + ); +} + +export function dockerGetContainersByAppLabelRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + DockerGetContainersByAppLabelRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DockerGetContainersByAppLabelRequest' from JSON`, + ); +} diff --git a/src/models/operations/dockergetcontainersbyappnamematch.ts b/src/models/operations/dockergetcontainersbyappnamematch.ts new file mode 100644 index 0000000..8103d17 --- /dev/null +++ b/src/models/operations/dockergetcontainersbyappnamematch.ts @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const AppTypeDockerCompose = { + DockerCompose: "docker-compose", +} as const; +export type AppTypeDockerCompose = ClosedEnum; + +export const AppTypeStack = { + Stack: "stack", +} as const; +export type AppTypeStack = ClosedEnum; + +export type AppType = AppTypeStack | AppTypeDockerCompose; + +export type DockerGetContainersByAppNameMatchRequest = { + appType?: AppTypeStack | AppTypeDockerCompose | undefined; + appName: string; + serverId?: string | undefined; +}; + +/** @internal */ +export const AppTypeDockerCompose$inboundSchema: z.ZodNativeEnum< + typeof AppTypeDockerCompose +> = z.nativeEnum(AppTypeDockerCompose); + +/** @internal */ +export const AppTypeDockerCompose$outboundSchema: z.ZodNativeEnum< + typeof AppTypeDockerCompose +> = AppTypeDockerCompose$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AppTypeDockerCompose$ { + /** @deprecated use `AppTypeDockerCompose$inboundSchema` instead. */ + export const inboundSchema = AppTypeDockerCompose$inboundSchema; + /** @deprecated use `AppTypeDockerCompose$outboundSchema` instead. */ + export const outboundSchema = AppTypeDockerCompose$outboundSchema; +} + +/** @internal */ +export const AppTypeStack$inboundSchema: z.ZodNativeEnum = + z.nativeEnum(AppTypeStack); + +/** @internal */ +export const AppTypeStack$outboundSchema: z.ZodNativeEnum = + AppTypeStack$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AppTypeStack$ { + /** @deprecated use `AppTypeStack$inboundSchema` instead. */ + export const inboundSchema = AppTypeStack$inboundSchema; + /** @deprecated use `AppTypeStack$outboundSchema` instead. */ + export const outboundSchema = AppTypeStack$outboundSchema; +} + +/** @internal */ +export const AppType$inboundSchema: z.ZodType = + z.union([AppTypeStack$inboundSchema, AppTypeDockerCompose$inboundSchema]); + +/** @internal */ +export type AppType$Outbound = string | string; + +/** @internal */ +export const AppType$outboundSchema: z.ZodType< + AppType$Outbound, + z.ZodTypeDef, + AppType +> = z.union([AppTypeStack$outboundSchema, AppTypeDockerCompose$outboundSchema]); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AppType$ { + /** @deprecated use `AppType$inboundSchema` instead. */ + export const inboundSchema = AppType$inboundSchema; + /** @deprecated use `AppType$outboundSchema` instead. */ + export const outboundSchema = AppType$outboundSchema; + /** @deprecated use `AppType$Outbound` instead. */ + export type Outbound = AppType$Outbound; +} + +export function appTypeToJSON(appType: AppType): string { + return JSON.stringify(AppType$outboundSchema.parse(appType)); +} + +export function appTypeFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AppType$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AppType' from JSON`, + ); +} + +/** @internal */ +export const DockerGetContainersByAppNameMatchRequest$inboundSchema: z.ZodType< + DockerGetContainersByAppNameMatchRequest, + z.ZodTypeDef, + unknown +> = z.object({ + appType: z.union([ + AppTypeStack$inboundSchema, + AppTypeDockerCompose$inboundSchema, + ]).optional(), + appName: z.string(), + serverId: z.string().optional(), +}); + +/** @internal */ +export type DockerGetContainersByAppNameMatchRequest$Outbound = { + appType?: string | string | undefined; + appName: string; + serverId?: string | undefined; +}; + +/** @internal */ +export const DockerGetContainersByAppNameMatchRequest$outboundSchema: z.ZodType< + DockerGetContainersByAppNameMatchRequest$Outbound, + z.ZodTypeDef, + DockerGetContainersByAppNameMatchRequest +> = z.object({ + appType: z.union([ + AppTypeStack$outboundSchema, + AppTypeDockerCompose$outboundSchema, + ]).optional(), + appName: z.string(), + serverId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DockerGetContainersByAppNameMatchRequest$ { + /** @deprecated use `DockerGetContainersByAppNameMatchRequest$inboundSchema` instead. */ + export const inboundSchema = + DockerGetContainersByAppNameMatchRequest$inboundSchema; + /** @deprecated use `DockerGetContainersByAppNameMatchRequest$outboundSchema` instead. */ + export const outboundSchema = + DockerGetContainersByAppNameMatchRequest$outboundSchema; + /** @deprecated use `DockerGetContainersByAppNameMatchRequest$Outbound` instead. */ + export type Outbound = DockerGetContainersByAppNameMatchRequest$Outbound; +} + +export function dockerGetContainersByAppNameMatchRequestToJSON( + dockerGetContainersByAppNameMatchRequest: + DockerGetContainersByAppNameMatchRequest, +): string { + return JSON.stringify( + DockerGetContainersByAppNameMatchRequest$outboundSchema.parse( + dockerGetContainersByAppNameMatchRequest, + ), + ); +} + +export function dockerGetContainersByAppNameMatchRequestFromJSON( + jsonString: string, +): SafeParseResult< + DockerGetContainersByAppNameMatchRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + DockerGetContainersByAppNameMatchRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'DockerGetContainersByAppNameMatchRequest' from JSON`, + ); +} diff --git a/src/models/operations/dockerrestartcontainer.ts b/src/models/operations/dockerrestartcontainer.ts new file mode 100644 index 0000000..add8164 --- /dev/null +++ b/src/models/operations/dockerrestartcontainer.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DockerRestartContainerRequest = { + containerId: string; +}; + +/** @internal */ +export const DockerRestartContainerRequest$inboundSchema: z.ZodType< + DockerRestartContainerRequest, + z.ZodTypeDef, + unknown +> = z.object({ + containerId: z.string(), +}); + +/** @internal */ +export type DockerRestartContainerRequest$Outbound = { + containerId: string; +}; + +/** @internal */ +export const DockerRestartContainerRequest$outboundSchema: z.ZodType< + DockerRestartContainerRequest$Outbound, + z.ZodTypeDef, + DockerRestartContainerRequest +> = z.object({ + containerId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DockerRestartContainerRequest$ { + /** @deprecated use `DockerRestartContainerRequest$inboundSchema` instead. */ + export const inboundSchema = DockerRestartContainerRequest$inboundSchema; + /** @deprecated use `DockerRestartContainerRequest$outboundSchema` instead. */ + export const outboundSchema = DockerRestartContainerRequest$outboundSchema; + /** @deprecated use `DockerRestartContainerRequest$Outbound` instead. */ + export type Outbound = DockerRestartContainerRequest$Outbound; +} + +export function dockerRestartContainerRequestToJSON( + dockerRestartContainerRequest: DockerRestartContainerRequest, +): string { + return JSON.stringify( + DockerRestartContainerRequest$outboundSchema.parse( + dockerRestartContainerRequest, + ), + ); +} + +export function dockerRestartContainerRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DockerRestartContainerRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DockerRestartContainerRequest' from JSON`, + ); +} diff --git a/src/models/operations/domainbyapplicationid.ts b/src/models/operations/domainbyapplicationid.ts new file mode 100644 index 0000000..7c9b294 --- /dev/null +++ b/src/models/operations/domainbyapplicationid.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DomainByApplicationIdRequest = { + applicationId: string; +}; + +/** @internal */ +export const DomainByApplicationIdRequest$inboundSchema: z.ZodType< + DomainByApplicationIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + applicationId: z.string(), +}); + +/** @internal */ +export type DomainByApplicationIdRequest$Outbound = { + applicationId: string; +}; + +/** @internal */ +export const DomainByApplicationIdRequest$outboundSchema: z.ZodType< + DomainByApplicationIdRequest$Outbound, + z.ZodTypeDef, + DomainByApplicationIdRequest +> = z.object({ + applicationId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DomainByApplicationIdRequest$ { + /** @deprecated use `DomainByApplicationIdRequest$inboundSchema` instead. */ + export const inboundSchema = DomainByApplicationIdRequest$inboundSchema; + /** @deprecated use `DomainByApplicationIdRequest$outboundSchema` instead. */ + export const outboundSchema = DomainByApplicationIdRequest$outboundSchema; + /** @deprecated use `DomainByApplicationIdRequest$Outbound` instead. */ + export type Outbound = DomainByApplicationIdRequest$Outbound; +} + +export function domainByApplicationIdRequestToJSON( + domainByApplicationIdRequest: DomainByApplicationIdRequest, +): string { + return JSON.stringify( + DomainByApplicationIdRequest$outboundSchema.parse( + domainByApplicationIdRequest, + ), + ); +} + +export function domainByApplicationIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DomainByApplicationIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DomainByApplicationIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/domainbycomposeid.ts b/src/models/operations/domainbycomposeid.ts new file mode 100644 index 0000000..a8822cd --- /dev/null +++ b/src/models/operations/domainbycomposeid.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DomainByComposeIdRequest = { + composeId: string; +}; + +/** @internal */ +export const DomainByComposeIdRequest$inboundSchema: z.ZodType< + DomainByComposeIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + composeId: z.string(), +}); + +/** @internal */ +export type DomainByComposeIdRequest$Outbound = { + composeId: string; +}; + +/** @internal */ +export const DomainByComposeIdRequest$outboundSchema: z.ZodType< + DomainByComposeIdRequest$Outbound, + z.ZodTypeDef, + DomainByComposeIdRequest +> = z.object({ + composeId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DomainByComposeIdRequest$ { + /** @deprecated use `DomainByComposeIdRequest$inboundSchema` instead. */ + export const inboundSchema = DomainByComposeIdRequest$inboundSchema; + /** @deprecated use `DomainByComposeIdRequest$outboundSchema` instead. */ + export const outboundSchema = DomainByComposeIdRequest$outboundSchema; + /** @deprecated use `DomainByComposeIdRequest$Outbound` instead. */ + export type Outbound = DomainByComposeIdRequest$Outbound; +} + +export function domainByComposeIdRequestToJSON( + domainByComposeIdRequest: DomainByComposeIdRequest, +): string { + return JSON.stringify( + DomainByComposeIdRequest$outboundSchema.parse(domainByComposeIdRequest), + ); +} + +export function domainByComposeIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DomainByComposeIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DomainByComposeIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/domaincreate.ts b/src/models/operations/domaincreate.ts new file mode 100644 index 0000000..bd76674 --- /dev/null +++ b/src/models/operations/domaincreate.ts @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const DomainCreateCertificateType = { + Letsencrypt: "letsencrypt", + None: "none", +} as const; +export type DomainCreateCertificateType = ClosedEnum< + typeof DomainCreateCertificateType +>; + +export const DomainCreateDomainType = { + Compose: "compose", + Application: "application", +} as const; +export type DomainCreateDomainType = ClosedEnum; + +export type DomainCreateRequest = { + host: string; + path?: string | null | undefined; + port?: number | null | undefined; + https?: boolean | undefined; + applicationId?: string | null | undefined; + certificateType?: DomainCreateCertificateType | undefined; + composeId?: string | null | undefined; + serviceName?: string | null | undefined; + domainType?: DomainCreateDomainType | null | undefined; +}; + +/** @internal */ +export const DomainCreateCertificateType$inboundSchema: z.ZodNativeEnum< + typeof DomainCreateCertificateType +> = z.nativeEnum(DomainCreateCertificateType); + +/** @internal */ +export const DomainCreateCertificateType$outboundSchema: z.ZodNativeEnum< + typeof DomainCreateCertificateType +> = DomainCreateCertificateType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DomainCreateCertificateType$ { + /** @deprecated use `DomainCreateCertificateType$inboundSchema` instead. */ + export const inboundSchema = DomainCreateCertificateType$inboundSchema; + /** @deprecated use `DomainCreateCertificateType$outboundSchema` instead. */ + export const outboundSchema = DomainCreateCertificateType$outboundSchema; +} + +/** @internal */ +export const DomainCreateDomainType$inboundSchema: z.ZodNativeEnum< + typeof DomainCreateDomainType +> = z.nativeEnum(DomainCreateDomainType); + +/** @internal */ +export const DomainCreateDomainType$outboundSchema: z.ZodNativeEnum< + typeof DomainCreateDomainType +> = DomainCreateDomainType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DomainCreateDomainType$ { + /** @deprecated use `DomainCreateDomainType$inboundSchema` instead. */ + export const inboundSchema = DomainCreateDomainType$inboundSchema; + /** @deprecated use `DomainCreateDomainType$outboundSchema` instead. */ + export const outboundSchema = DomainCreateDomainType$outboundSchema; +} + +/** @internal */ +export const DomainCreateRequest$inboundSchema: z.ZodType< + DomainCreateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + host: z.string(), + path: z.nullable(z.string()).optional(), + port: z.nullable(z.number()).optional(), + https: z.boolean().optional(), + applicationId: z.nullable(z.string()).optional(), + certificateType: DomainCreateCertificateType$inboundSchema.optional(), + composeId: z.nullable(z.string()).optional(), + serviceName: z.nullable(z.string()).optional(), + domainType: z.nullable(DomainCreateDomainType$inboundSchema).optional(), +}); + +/** @internal */ +export type DomainCreateRequest$Outbound = { + host: string; + path?: string | null | undefined; + port?: number | null | undefined; + https?: boolean | undefined; + applicationId?: string | null | undefined; + certificateType?: string | undefined; + composeId?: string | null | undefined; + serviceName?: string | null | undefined; + domainType?: string | null | undefined; +}; + +/** @internal */ +export const DomainCreateRequest$outboundSchema: z.ZodType< + DomainCreateRequest$Outbound, + z.ZodTypeDef, + DomainCreateRequest +> = z.object({ + host: z.string(), + path: z.nullable(z.string()).optional(), + port: z.nullable(z.number()).optional(), + https: z.boolean().optional(), + applicationId: z.nullable(z.string()).optional(), + certificateType: DomainCreateCertificateType$outboundSchema.optional(), + composeId: z.nullable(z.string()).optional(), + serviceName: z.nullable(z.string()).optional(), + domainType: z.nullable(DomainCreateDomainType$outboundSchema).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DomainCreateRequest$ { + /** @deprecated use `DomainCreateRequest$inboundSchema` instead. */ + export const inboundSchema = DomainCreateRequest$inboundSchema; + /** @deprecated use `DomainCreateRequest$outboundSchema` instead. */ + export const outboundSchema = DomainCreateRequest$outboundSchema; + /** @deprecated use `DomainCreateRequest$Outbound` instead. */ + export type Outbound = DomainCreateRequest$Outbound; +} + +export function domainCreateRequestToJSON( + domainCreateRequest: DomainCreateRequest, +): string { + return JSON.stringify( + DomainCreateRequest$outboundSchema.parse(domainCreateRequest), + ); +} + +export function domainCreateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DomainCreateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DomainCreateRequest' from JSON`, + ); +} diff --git a/src/models/operations/domaindelete.ts b/src/models/operations/domaindelete.ts new file mode 100644 index 0000000..c0347b7 --- /dev/null +++ b/src/models/operations/domaindelete.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DomainDeleteRequest = { + domainId: string; +}; + +/** @internal */ +export const DomainDeleteRequest$inboundSchema: z.ZodType< + DomainDeleteRequest, + z.ZodTypeDef, + unknown +> = z.object({ + domainId: z.string(), +}); + +/** @internal */ +export type DomainDeleteRequest$Outbound = { + domainId: string; +}; + +/** @internal */ +export const DomainDeleteRequest$outboundSchema: z.ZodType< + DomainDeleteRequest$Outbound, + z.ZodTypeDef, + DomainDeleteRequest +> = z.object({ + domainId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DomainDeleteRequest$ { + /** @deprecated use `DomainDeleteRequest$inboundSchema` instead. */ + export const inboundSchema = DomainDeleteRequest$inboundSchema; + /** @deprecated use `DomainDeleteRequest$outboundSchema` instead. */ + export const outboundSchema = DomainDeleteRequest$outboundSchema; + /** @deprecated use `DomainDeleteRequest$Outbound` instead. */ + export type Outbound = DomainDeleteRequest$Outbound; +} + +export function domainDeleteRequestToJSON( + domainDeleteRequest: DomainDeleteRequest, +): string { + return JSON.stringify( + DomainDeleteRequest$outboundSchema.parse(domainDeleteRequest), + ); +} + +export function domainDeleteRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DomainDeleteRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DomainDeleteRequest' from JSON`, + ); +} diff --git a/src/models/operations/domaingeneratedomain.ts b/src/models/operations/domaingeneratedomain.ts new file mode 100644 index 0000000..322f141 --- /dev/null +++ b/src/models/operations/domaingeneratedomain.ts @@ -0,0 +1,72 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DomainGenerateDomainRequest = { + appName: string; + serverId?: string | undefined; +}; + +/** @internal */ +export const DomainGenerateDomainRequest$inboundSchema: z.ZodType< + DomainGenerateDomainRequest, + z.ZodTypeDef, + unknown +> = z.object({ + appName: z.string(), + serverId: z.string().optional(), +}); + +/** @internal */ +export type DomainGenerateDomainRequest$Outbound = { + appName: string; + serverId?: string | undefined; +}; + +/** @internal */ +export const DomainGenerateDomainRequest$outboundSchema: z.ZodType< + DomainGenerateDomainRequest$Outbound, + z.ZodTypeDef, + DomainGenerateDomainRequest +> = z.object({ + appName: z.string(), + serverId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DomainGenerateDomainRequest$ { + /** @deprecated use `DomainGenerateDomainRequest$inboundSchema` instead. */ + export const inboundSchema = DomainGenerateDomainRequest$inboundSchema; + /** @deprecated use `DomainGenerateDomainRequest$outboundSchema` instead. */ + export const outboundSchema = DomainGenerateDomainRequest$outboundSchema; + /** @deprecated use `DomainGenerateDomainRequest$Outbound` instead. */ + export type Outbound = DomainGenerateDomainRequest$Outbound; +} + +export function domainGenerateDomainRequestToJSON( + domainGenerateDomainRequest: DomainGenerateDomainRequest, +): string { + return JSON.stringify( + DomainGenerateDomainRequest$outboundSchema.parse( + domainGenerateDomainRequest, + ), + ); +} + +export function domainGenerateDomainRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DomainGenerateDomainRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DomainGenerateDomainRequest' from JSON`, + ); +} diff --git a/src/models/operations/domainone.ts b/src/models/operations/domainone.ts new file mode 100644 index 0000000..d1cd24a --- /dev/null +++ b/src/models/operations/domainone.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DomainOneRequest = { + domainId: string; +}; + +/** @internal */ +export const DomainOneRequest$inboundSchema: z.ZodType< + DomainOneRequest, + z.ZodTypeDef, + unknown +> = z.object({ + domainId: z.string(), +}); + +/** @internal */ +export type DomainOneRequest$Outbound = { + domainId: string; +}; + +/** @internal */ +export const DomainOneRequest$outboundSchema: z.ZodType< + DomainOneRequest$Outbound, + z.ZodTypeDef, + DomainOneRequest +> = z.object({ + domainId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DomainOneRequest$ { + /** @deprecated use `DomainOneRequest$inboundSchema` instead. */ + export const inboundSchema = DomainOneRequest$inboundSchema; + /** @deprecated use `DomainOneRequest$outboundSchema` instead. */ + export const outboundSchema = DomainOneRequest$outboundSchema; + /** @deprecated use `DomainOneRequest$Outbound` instead. */ + export type Outbound = DomainOneRequest$Outbound; +} + +export function domainOneRequestToJSON( + domainOneRequest: DomainOneRequest, +): string { + return JSON.stringify( + DomainOneRequest$outboundSchema.parse(domainOneRequest), + ); +} + +export function domainOneRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DomainOneRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DomainOneRequest' from JSON`, + ); +} diff --git a/src/models/operations/domainupdate.ts b/src/models/operations/domainupdate.ts new file mode 100644 index 0000000..de1938d --- /dev/null +++ b/src/models/operations/domainupdate.ts @@ -0,0 +1,151 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const DomainUpdateCertificateType = { + Letsencrypt: "letsencrypt", + None: "none", +} as const; +export type DomainUpdateCertificateType = ClosedEnum< + typeof DomainUpdateCertificateType +>; + +export const DomainUpdateDomainType = { + Compose: "compose", + Application: "application", +} as const; +export type DomainUpdateDomainType = ClosedEnum; + +export type DomainUpdateRequest = { + host: string; + path?: string | null | undefined; + port?: number | null | undefined; + https?: boolean | undefined; + certificateType?: DomainUpdateCertificateType | undefined; + serviceName?: string | null | undefined; + domainType?: DomainUpdateDomainType | null | undefined; + domainId: string; +}; + +/** @internal */ +export const DomainUpdateCertificateType$inboundSchema: z.ZodNativeEnum< + typeof DomainUpdateCertificateType +> = z.nativeEnum(DomainUpdateCertificateType); + +/** @internal */ +export const DomainUpdateCertificateType$outboundSchema: z.ZodNativeEnum< + typeof DomainUpdateCertificateType +> = DomainUpdateCertificateType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DomainUpdateCertificateType$ { + /** @deprecated use `DomainUpdateCertificateType$inboundSchema` instead. */ + export const inboundSchema = DomainUpdateCertificateType$inboundSchema; + /** @deprecated use `DomainUpdateCertificateType$outboundSchema` instead. */ + export const outboundSchema = DomainUpdateCertificateType$outboundSchema; +} + +/** @internal */ +export const DomainUpdateDomainType$inboundSchema: z.ZodNativeEnum< + typeof DomainUpdateDomainType +> = z.nativeEnum(DomainUpdateDomainType); + +/** @internal */ +export const DomainUpdateDomainType$outboundSchema: z.ZodNativeEnum< + typeof DomainUpdateDomainType +> = DomainUpdateDomainType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DomainUpdateDomainType$ { + /** @deprecated use `DomainUpdateDomainType$inboundSchema` instead. */ + export const inboundSchema = DomainUpdateDomainType$inboundSchema; + /** @deprecated use `DomainUpdateDomainType$outboundSchema` instead. */ + export const outboundSchema = DomainUpdateDomainType$outboundSchema; +} + +/** @internal */ +export const DomainUpdateRequest$inboundSchema: z.ZodType< + DomainUpdateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + host: z.string(), + path: z.nullable(z.string()).optional(), + port: z.nullable(z.number()).optional(), + https: z.boolean().optional(), + certificateType: DomainUpdateCertificateType$inboundSchema.optional(), + serviceName: z.nullable(z.string()).optional(), + domainType: z.nullable(DomainUpdateDomainType$inboundSchema).optional(), + domainId: z.string(), +}); + +/** @internal */ +export type DomainUpdateRequest$Outbound = { + host: string; + path?: string | null | undefined; + port?: number | null | undefined; + https?: boolean | undefined; + certificateType?: string | undefined; + serviceName?: string | null | undefined; + domainType?: string | null | undefined; + domainId: string; +}; + +/** @internal */ +export const DomainUpdateRequest$outboundSchema: z.ZodType< + DomainUpdateRequest$Outbound, + z.ZodTypeDef, + DomainUpdateRequest +> = z.object({ + host: z.string(), + path: z.nullable(z.string()).optional(), + port: z.nullable(z.number()).optional(), + https: z.boolean().optional(), + certificateType: DomainUpdateCertificateType$outboundSchema.optional(), + serviceName: z.nullable(z.string()).optional(), + domainType: z.nullable(DomainUpdateDomainType$outboundSchema).optional(), + domainId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DomainUpdateRequest$ { + /** @deprecated use `DomainUpdateRequest$inboundSchema` instead. */ + export const inboundSchema = DomainUpdateRequest$inboundSchema; + /** @deprecated use `DomainUpdateRequest$outboundSchema` instead. */ + export const outboundSchema = DomainUpdateRequest$outboundSchema; + /** @deprecated use `DomainUpdateRequest$Outbound` instead. */ + export type Outbound = DomainUpdateRequest$Outbound; +} + +export function domainUpdateRequestToJSON( + domainUpdateRequest: DomainUpdateRequest, +): string { + return JSON.stringify( + DomainUpdateRequest$outboundSchema.parse(domainUpdateRequest), + ); +} + +export function domainUpdateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DomainUpdateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DomainUpdateRequest' from JSON`, + ); +} diff --git a/src/models/operations/githubgetgithubbranches.ts b/src/models/operations/githubgetgithubbranches.ts new file mode 100644 index 0000000..db55692 --- /dev/null +++ b/src/models/operations/githubgetgithubbranches.ts @@ -0,0 +1,76 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GithubGetGithubBranchesRequest = { + repo: string; + owner: string; + githubId?: string | undefined; +}; + +/** @internal */ +export const GithubGetGithubBranchesRequest$inboundSchema: z.ZodType< + GithubGetGithubBranchesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + repo: z.string(), + owner: z.string(), + githubId: z.string().optional(), +}); + +/** @internal */ +export type GithubGetGithubBranchesRequest$Outbound = { + repo: string; + owner: string; + githubId?: string | undefined; +}; + +/** @internal */ +export const GithubGetGithubBranchesRequest$outboundSchema: z.ZodType< + GithubGetGithubBranchesRequest$Outbound, + z.ZodTypeDef, + GithubGetGithubBranchesRequest +> = z.object({ + repo: z.string(), + owner: z.string(), + githubId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GithubGetGithubBranchesRequest$ { + /** @deprecated use `GithubGetGithubBranchesRequest$inboundSchema` instead. */ + export const inboundSchema = GithubGetGithubBranchesRequest$inboundSchema; + /** @deprecated use `GithubGetGithubBranchesRequest$outboundSchema` instead. */ + export const outboundSchema = GithubGetGithubBranchesRequest$outboundSchema; + /** @deprecated use `GithubGetGithubBranchesRequest$Outbound` instead. */ + export type Outbound = GithubGetGithubBranchesRequest$Outbound; +} + +export function githubGetGithubBranchesRequestToJSON( + githubGetGithubBranchesRequest: GithubGetGithubBranchesRequest, +): string { + return JSON.stringify( + GithubGetGithubBranchesRequest$outboundSchema.parse( + githubGetGithubBranchesRequest, + ), + ); +} + +export function githubGetGithubBranchesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GithubGetGithubBranchesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GithubGetGithubBranchesRequest' from JSON`, + ); +} diff --git a/src/models/operations/githubgetgithubrepositories.ts b/src/models/operations/githubgetgithubrepositories.ts new file mode 100644 index 0000000..e281754 --- /dev/null +++ b/src/models/operations/githubgetgithubrepositories.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GithubGetGithubRepositoriesRequest = { + githubId: string; +}; + +/** @internal */ +export const GithubGetGithubRepositoriesRequest$inboundSchema: z.ZodType< + GithubGetGithubRepositoriesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + githubId: z.string(), +}); + +/** @internal */ +export type GithubGetGithubRepositoriesRequest$Outbound = { + githubId: string; +}; + +/** @internal */ +export const GithubGetGithubRepositoriesRequest$outboundSchema: z.ZodType< + GithubGetGithubRepositoriesRequest$Outbound, + z.ZodTypeDef, + GithubGetGithubRepositoriesRequest +> = z.object({ + githubId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GithubGetGithubRepositoriesRequest$ { + /** @deprecated use `GithubGetGithubRepositoriesRequest$inboundSchema` instead. */ + export const inboundSchema = GithubGetGithubRepositoriesRequest$inboundSchema; + /** @deprecated use `GithubGetGithubRepositoriesRequest$outboundSchema` instead. */ + export const outboundSchema = + GithubGetGithubRepositoriesRequest$outboundSchema; + /** @deprecated use `GithubGetGithubRepositoriesRequest$Outbound` instead. */ + export type Outbound = GithubGetGithubRepositoriesRequest$Outbound; +} + +export function githubGetGithubRepositoriesRequestToJSON( + githubGetGithubRepositoriesRequest: GithubGetGithubRepositoriesRequest, +): string { + return JSON.stringify( + GithubGetGithubRepositoriesRequest$outboundSchema.parse( + githubGetGithubRepositoriesRequest, + ), + ); +} + +export function githubGetGithubRepositoriesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + GithubGetGithubRepositoriesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GithubGetGithubRepositoriesRequest' from JSON`, + ); +} diff --git a/src/models/operations/githubone.ts b/src/models/operations/githubone.ts new file mode 100644 index 0000000..13fbb88 --- /dev/null +++ b/src/models/operations/githubone.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GithubOneRequest = { + githubId: string; +}; + +/** @internal */ +export const GithubOneRequest$inboundSchema: z.ZodType< + GithubOneRequest, + z.ZodTypeDef, + unknown +> = z.object({ + githubId: z.string(), +}); + +/** @internal */ +export type GithubOneRequest$Outbound = { + githubId: string; +}; + +/** @internal */ +export const GithubOneRequest$outboundSchema: z.ZodType< + GithubOneRequest$Outbound, + z.ZodTypeDef, + GithubOneRequest +> = z.object({ + githubId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GithubOneRequest$ { + /** @deprecated use `GithubOneRequest$inboundSchema` instead. */ + export const inboundSchema = GithubOneRequest$inboundSchema; + /** @deprecated use `GithubOneRequest$outboundSchema` instead. */ + export const outboundSchema = GithubOneRequest$outboundSchema; + /** @deprecated use `GithubOneRequest$Outbound` instead. */ + export type Outbound = GithubOneRequest$Outbound; +} + +export function githubOneRequestToJSON( + githubOneRequest: GithubOneRequest, +): string { + return JSON.stringify( + GithubOneRequest$outboundSchema.parse(githubOneRequest), + ); +} + +export function githubOneRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GithubOneRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GithubOneRequest' from JSON`, + ); +} diff --git a/src/models/operations/githubtestconnection.ts b/src/models/operations/githubtestconnection.ts new file mode 100644 index 0000000..a48c416 --- /dev/null +++ b/src/models/operations/githubtestconnection.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GithubTestConnectionRequest = { + githubId: string; +}; + +/** @internal */ +export const GithubTestConnectionRequest$inboundSchema: z.ZodType< + GithubTestConnectionRequest, + z.ZodTypeDef, + unknown +> = z.object({ + githubId: z.string(), +}); + +/** @internal */ +export type GithubTestConnectionRequest$Outbound = { + githubId: string; +}; + +/** @internal */ +export const GithubTestConnectionRequest$outboundSchema: z.ZodType< + GithubTestConnectionRequest$Outbound, + z.ZodTypeDef, + GithubTestConnectionRequest +> = z.object({ + githubId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GithubTestConnectionRequest$ { + /** @deprecated use `GithubTestConnectionRequest$inboundSchema` instead. */ + export const inboundSchema = GithubTestConnectionRequest$inboundSchema; + /** @deprecated use `GithubTestConnectionRequest$outboundSchema` instead. */ + export const outboundSchema = GithubTestConnectionRequest$outboundSchema; + /** @deprecated use `GithubTestConnectionRequest$Outbound` instead. */ + export type Outbound = GithubTestConnectionRequest$Outbound; +} + +export function githubTestConnectionRequestToJSON( + githubTestConnectionRequest: GithubTestConnectionRequest, +): string { + return JSON.stringify( + GithubTestConnectionRequest$outboundSchema.parse( + githubTestConnectionRequest, + ), + ); +} + +export function githubTestConnectionRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GithubTestConnectionRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GithubTestConnectionRequest' from JSON`, + ); +} diff --git a/src/models/operations/githubupdate.ts b/src/models/operations/githubupdate.ts new file mode 100644 index 0000000..7ba1b28 --- /dev/null +++ b/src/models/operations/githubupdate.ts @@ -0,0 +1,102 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GithubUpdateRequest = { + githubId: string; + githubAppName?: string | null | undefined; + githubAppId?: number | null | undefined; + githubClientId?: string | null | undefined; + githubClientSecret?: string | null | undefined; + githubInstallationId?: string | null | undefined; + githubPrivateKey?: string | null | undefined; + githubWebhookSecret?: string | null | undefined; + gitProviderId: string; + name: string; +}; + +/** @internal */ +export const GithubUpdateRequest$inboundSchema: z.ZodType< + GithubUpdateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + githubId: z.string(), + githubAppName: z.nullable(z.string()).optional(), + githubAppId: z.nullable(z.number()).optional(), + githubClientId: z.nullable(z.string()).optional(), + githubClientSecret: z.nullable(z.string()).optional(), + githubInstallationId: z.nullable(z.string()).optional(), + githubPrivateKey: z.nullable(z.string()).optional(), + githubWebhookSecret: z.nullable(z.string()).optional(), + gitProviderId: z.string(), + name: z.string(), +}); + +/** @internal */ +export type GithubUpdateRequest$Outbound = { + githubId: string; + githubAppName?: string | null | undefined; + githubAppId?: number | null | undefined; + githubClientId?: string | null | undefined; + githubClientSecret?: string | null | undefined; + githubInstallationId?: string | null | undefined; + githubPrivateKey?: string | null | undefined; + githubWebhookSecret?: string | null | undefined; + gitProviderId: string; + name: string; +}; + +/** @internal */ +export const GithubUpdateRequest$outboundSchema: z.ZodType< + GithubUpdateRequest$Outbound, + z.ZodTypeDef, + GithubUpdateRequest +> = z.object({ + githubId: z.string(), + githubAppName: z.nullable(z.string()).optional(), + githubAppId: z.nullable(z.number()).optional(), + githubClientId: z.nullable(z.string()).optional(), + githubClientSecret: z.nullable(z.string()).optional(), + githubInstallationId: z.nullable(z.string()).optional(), + githubPrivateKey: z.nullable(z.string()).optional(), + githubWebhookSecret: z.nullable(z.string()).optional(), + gitProviderId: z.string(), + name: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GithubUpdateRequest$ { + /** @deprecated use `GithubUpdateRequest$inboundSchema` instead. */ + export const inboundSchema = GithubUpdateRequest$inboundSchema; + /** @deprecated use `GithubUpdateRequest$outboundSchema` instead. */ + export const outboundSchema = GithubUpdateRequest$outboundSchema; + /** @deprecated use `GithubUpdateRequest$Outbound` instead. */ + export type Outbound = GithubUpdateRequest$Outbound; +} + +export function githubUpdateRequestToJSON( + githubUpdateRequest: GithubUpdateRequest, +): string { + return JSON.stringify( + GithubUpdateRequest$outboundSchema.parse(githubUpdateRequest), + ); +} + +export function githubUpdateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GithubUpdateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GithubUpdateRequest' from JSON`, + ); +} diff --git a/src/models/operations/gitlabcreate.ts b/src/models/operations/gitlabcreate.ts new file mode 100644 index 0000000..8bae9f9 --- /dev/null +++ b/src/models/operations/gitlabcreate.ts @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GitlabCreateRequest = { + gitlabId?: string | undefined; + applicationId?: string | undefined; + redirectUri?: string | undefined; + secret?: string | undefined; + accessToken?: string | null | undefined; + refreshToken?: string | null | undefined; + groupName?: string | undefined; + expiresAt?: number | null | undefined; + gitProviderId?: string | undefined; + authId: string; + name: string; +}; + +/** @internal */ +export const GitlabCreateRequest$inboundSchema: z.ZodType< + GitlabCreateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + gitlabId: z.string().optional(), + applicationId: z.string().optional(), + redirectUri: z.string().optional(), + secret: z.string().optional(), + accessToken: z.nullable(z.string()).optional(), + refreshToken: z.nullable(z.string()).optional(), + groupName: z.string().optional(), + expiresAt: z.nullable(z.number()).optional(), + gitProviderId: z.string().optional(), + authId: z.string(), + name: z.string(), +}); + +/** @internal */ +export type GitlabCreateRequest$Outbound = { + gitlabId?: string | undefined; + applicationId?: string | undefined; + redirectUri?: string | undefined; + secret?: string | undefined; + accessToken?: string | null | undefined; + refreshToken?: string | null | undefined; + groupName?: string | undefined; + expiresAt?: number | null | undefined; + gitProviderId?: string | undefined; + authId: string; + name: string; +}; + +/** @internal */ +export const GitlabCreateRequest$outboundSchema: z.ZodType< + GitlabCreateRequest$Outbound, + z.ZodTypeDef, + GitlabCreateRequest +> = z.object({ + gitlabId: z.string().optional(), + applicationId: z.string().optional(), + redirectUri: z.string().optional(), + secret: z.string().optional(), + accessToken: z.nullable(z.string()).optional(), + refreshToken: z.nullable(z.string()).optional(), + groupName: z.string().optional(), + expiresAt: z.nullable(z.number()).optional(), + gitProviderId: z.string().optional(), + authId: z.string(), + name: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GitlabCreateRequest$ { + /** @deprecated use `GitlabCreateRequest$inboundSchema` instead. */ + export const inboundSchema = GitlabCreateRequest$inboundSchema; + /** @deprecated use `GitlabCreateRequest$outboundSchema` instead. */ + export const outboundSchema = GitlabCreateRequest$outboundSchema; + /** @deprecated use `GitlabCreateRequest$Outbound` instead. */ + export type Outbound = GitlabCreateRequest$Outbound; +} + +export function gitlabCreateRequestToJSON( + gitlabCreateRequest: GitlabCreateRequest, +): string { + return JSON.stringify( + GitlabCreateRequest$outboundSchema.parse(gitlabCreateRequest), + ); +} + +export function gitlabCreateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GitlabCreateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GitlabCreateRequest' from JSON`, + ); +} diff --git a/src/models/operations/gitlabgetgitlabbranches.ts b/src/models/operations/gitlabgetgitlabbranches.ts new file mode 100644 index 0000000..ec0c075 --- /dev/null +++ b/src/models/operations/gitlabgetgitlabbranches.ts @@ -0,0 +1,80 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GitlabGetGitlabBranchesRequest = { + id?: number | undefined; + owner: string; + repo: string; + gitlabId?: string | undefined; +}; + +/** @internal */ +export const GitlabGetGitlabBranchesRequest$inboundSchema: z.ZodType< + GitlabGetGitlabBranchesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().optional(), + owner: z.string(), + repo: z.string(), + gitlabId: z.string().optional(), +}); + +/** @internal */ +export type GitlabGetGitlabBranchesRequest$Outbound = { + id?: number | undefined; + owner: string; + repo: string; + gitlabId?: string | undefined; +}; + +/** @internal */ +export const GitlabGetGitlabBranchesRequest$outboundSchema: z.ZodType< + GitlabGetGitlabBranchesRequest$Outbound, + z.ZodTypeDef, + GitlabGetGitlabBranchesRequest +> = z.object({ + id: z.number().optional(), + owner: z.string(), + repo: z.string(), + gitlabId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GitlabGetGitlabBranchesRequest$ { + /** @deprecated use `GitlabGetGitlabBranchesRequest$inboundSchema` instead. */ + export const inboundSchema = GitlabGetGitlabBranchesRequest$inboundSchema; + /** @deprecated use `GitlabGetGitlabBranchesRequest$outboundSchema` instead. */ + export const outboundSchema = GitlabGetGitlabBranchesRequest$outboundSchema; + /** @deprecated use `GitlabGetGitlabBranchesRequest$Outbound` instead. */ + export type Outbound = GitlabGetGitlabBranchesRequest$Outbound; +} + +export function gitlabGetGitlabBranchesRequestToJSON( + gitlabGetGitlabBranchesRequest: GitlabGetGitlabBranchesRequest, +): string { + return JSON.stringify( + GitlabGetGitlabBranchesRequest$outboundSchema.parse( + gitlabGetGitlabBranchesRequest, + ), + ); +} + +export function gitlabGetGitlabBranchesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GitlabGetGitlabBranchesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GitlabGetGitlabBranchesRequest' from JSON`, + ); +} diff --git a/src/models/operations/gitlabgetgitlabrepositories.ts b/src/models/operations/gitlabgetgitlabrepositories.ts new file mode 100644 index 0000000..8237e13 --- /dev/null +++ b/src/models/operations/gitlabgetgitlabrepositories.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GitlabGetGitlabRepositoriesRequest = { + gitlabId: string; +}; + +/** @internal */ +export const GitlabGetGitlabRepositoriesRequest$inboundSchema: z.ZodType< + GitlabGetGitlabRepositoriesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + gitlabId: z.string(), +}); + +/** @internal */ +export type GitlabGetGitlabRepositoriesRequest$Outbound = { + gitlabId: string; +}; + +/** @internal */ +export const GitlabGetGitlabRepositoriesRequest$outboundSchema: z.ZodType< + GitlabGetGitlabRepositoriesRequest$Outbound, + z.ZodTypeDef, + GitlabGetGitlabRepositoriesRequest +> = z.object({ + gitlabId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GitlabGetGitlabRepositoriesRequest$ { + /** @deprecated use `GitlabGetGitlabRepositoriesRequest$inboundSchema` instead. */ + export const inboundSchema = GitlabGetGitlabRepositoriesRequest$inboundSchema; + /** @deprecated use `GitlabGetGitlabRepositoriesRequest$outboundSchema` instead. */ + export const outboundSchema = + GitlabGetGitlabRepositoriesRequest$outboundSchema; + /** @deprecated use `GitlabGetGitlabRepositoriesRequest$Outbound` instead. */ + export type Outbound = GitlabGetGitlabRepositoriesRequest$Outbound; +} + +export function gitlabGetGitlabRepositoriesRequestToJSON( + gitlabGetGitlabRepositoriesRequest: GitlabGetGitlabRepositoriesRequest, +): string { + return JSON.stringify( + GitlabGetGitlabRepositoriesRequest$outboundSchema.parse( + gitlabGetGitlabRepositoriesRequest, + ), + ); +} + +export function gitlabGetGitlabRepositoriesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + GitlabGetGitlabRepositoriesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GitlabGetGitlabRepositoriesRequest' from JSON`, + ); +} diff --git a/src/models/operations/gitlabone.ts b/src/models/operations/gitlabone.ts new file mode 100644 index 0000000..60de744 --- /dev/null +++ b/src/models/operations/gitlabone.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GitlabOneRequest = { + gitlabId: string; +}; + +/** @internal */ +export const GitlabOneRequest$inboundSchema: z.ZodType< + GitlabOneRequest, + z.ZodTypeDef, + unknown +> = z.object({ + gitlabId: z.string(), +}); + +/** @internal */ +export type GitlabOneRequest$Outbound = { + gitlabId: string; +}; + +/** @internal */ +export const GitlabOneRequest$outboundSchema: z.ZodType< + GitlabOneRequest$Outbound, + z.ZodTypeDef, + GitlabOneRequest +> = z.object({ + gitlabId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GitlabOneRequest$ { + /** @deprecated use `GitlabOneRequest$inboundSchema` instead. */ + export const inboundSchema = GitlabOneRequest$inboundSchema; + /** @deprecated use `GitlabOneRequest$outboundSchema` instead. */ + export const outboundSchema = GitlabOneRequest$outboundSchema; + /** @deprecated use `GitlabOneRequest$Outbound` instead. */ + export type Outbound = GitlabOneRequest$Outbound; +} + +export function gitlabOneRequestToJSON( + gitlabOneRequest: GitlabOneRequest, +): string { + return JSON.stringify( + GitlabOneRequest$outboundSchema.parse(gitlabOneRequest), + ); +} + +export function gitlabOneRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GitlabOneRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GitlabOneRequest' from JSON`, + ); +} diff --git a/src/models/operations/gitlabtestconnection.ts b/src/models/operations/gitlabtestconnection.ts new file mode 100644 index 0000000..c560c45 --- /dev/null +++ b/src/models/operations/gitlabtestconnection.ts @@ -0,0 +1,72 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GitlabTestConnectionRequest = { + gitlabId?: string | undefined; + groupName?: string | undefined; +}; + +/** @internal */ +export const GitlabTestConnectionRequest$inboundSchema: z.ZodType< + GitlabTestConnectionRequest, + z.ZodTypeDef, + unknown +> = z.object({ + gitlabId: z.string().optional(), + groupName: z.string().optional(), +}); + +/** @internal */ +export type GitlabTestConnectionRequest$Outbound = { + gitlabId?: string | undefined; + groupName?: string | undefined; +}; + +/** @internal */ +export const GitlabTestConnectionRequest$outboundSchema: z.ZodType< + GitlabTestConnectionRequest$Outbound, + z.ZodTypeDef, + GitlabTestConnectionRequest +> = z.object({ + gitlabId: z.string().optional(), + groupName: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GitlabTestConnectionRequest$ { + /** @deprecated use `GitlabTestConnectionRequest$inboundSchema` instead. */ + export const inboundSchema = GitlabTestConnectionRequest$inboundSchema; + /** @deprecated use `GitlabTestConnectionRequest$outboundSchema` instead. */ + export const outboundSchema = GitlabTestConnectionRequest$outboundSchema; + /** @deprecated use `GitlabTestConnectionRequest$Outbound` instead. */ + export type Outbound = GitlabTestConnectionRequest$Outbound; +} + +export function gitlabTestConnectionRequestToJSON( + gitlabTestConnectionRequest: GitlabTestConnectionRequest, +): string { + return JSON.stringify( + GitlabTestConnectionRequest$outboundSchema.parse( + gitlabTestConnectionRequest, + ), + ); +} + +export function gitlabTestConnectionRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GitlabTestConnectionRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GitlabTestConnectionRequest' from JSON`, + ); +} diff --git a/src/models/operations/gitlabupdate.ts b/src/models/operations/gitlabupdate.ts new file mode 100644 index 0000000..647ba92 --- /dev/null +++ b/src/models/operations/gitlabupdate.ts @@ -0,0 +1,102 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GitlabUpdateRequest = { + gitlabId: string; + applicationId?: string | undefined; + redirectUri?: string | undefined; + secret?: string | undefined; + accessToken?: string | null | undefined; + refreshToken?: string | null | undefined; + groupName?: string | undefined; + expiresAt?: number | null | undefined; + gitProviderId: string; + name: string; +}; + +/** @internal */ +export const GitlabUpdateRequest$inboundSchema: z.ZodType< + GitlabUpdateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + gitlabId: z.string(), + applicationId: z.string().optional(), + redirectUri: z.string().optional(), + secret: z.string().optional(), + accessToken: z.nullable(z.string()).optional(), + refreshToken: z.nullable(z.string()).optional(), + groupName: z.string().optional(), + expiresAt: z.nullable(z.number()).optional(), + gitProviderId: z.string(), + name: z.string(), +}); + +/** @internal */ +export type GitlabUpdateRequest$Outbound = { + gitlabId: string; + applicationId?: string | undefined; + redirectUri?: string | undefined; + secret?: string | undefined; + accessToken?: string | null | undefined; + refreshToken?: string | null | undefined; + groupName?: string | undefined; + expiresAt?: number | null | undefined; + gitProviderId: string; + name: string; +}; + +/** @internal */ +export const GitlabUpdateRequest$outboundSchema: z.ZodType< + GitlabUpdateRequest$Outbound, + z.ZodTypeDef, + GitlabUpdateRequest +> = z.object({ + gitlabId: z.string(), + applicationId: z.string().optional(), + redirectUri: z.string().optional(), + secret: z.string().optional(), + accessToken: z.nullable(z.string()).optional(), + refreshToken: z.nullable(z.string()).optional(), + groupName: z.string().optional(), + expiresAt: z.nullable(z.number()).optional(), + gitProviderId: z.string(), + name: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GitlabUpdateRequest$ { + /** @deprecated use `GitlabUpdateRequest$inboundSchema` instead. */ + export const inboundSchema = GitlabUpdateRequest$inboundSchema; + /** @deprecated use `GitlabUpdateRequest$outboundSchema` instead. */ + export const outboundSchema = GitlabUpdateRequest$outboundSchema; + /** @deprecated use `GitlabUpdateRequest$Outbound` instead. */ + export type Outbound = GitlabUpdateRequest$Outbound; +} + +export function gitlabUpdateRequestToJSON( + gitlabUpdateRequest: GitlabUpdateRequest, +): string { + return JSON.stringify( + GitlabUpdateRequest$outboundSchema.parse(gitlabUpdateRequest), + ); +} + +export function gitlabUpdateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GitlabUpdateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GitlabUpdateRequest' from JSON`, + ); +} diff --git a/src/models/operations/gitproviderremove.ts b/src/models/operations/gitproviderremove.ts new file mode 100644 index 0000000..aec3c1e --- /dev/null +++ b/src/models/operations/gitproviderremove.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GitProviderRemoveRequest = { + gitProviderId: string; +}; + +/** @internal */ +export const GitProviderRemoveRequest$inboundSchema: z.ZodType< + GitProviderRemoveRequest, + z.ZodTypeDef, + unknown +> = z.object({ + gitProviderId: z.string(), +}); + +/** @internal */ +export type GitProviderRemoveRequest$Outbound = { + gitProviderId: string; +}; + +/** @internal */ +export const GitProviderRemoveRequest$outboundSchema: z.ZodType< + GitProviderRemoveRequest$Outbound, + z.ZodTypeDef, + GitProviderRemoveRequest +> = z.object({ + gitProviderId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GitProviderRemoveRequest$ { + /** @deprecated use `GitProviderRemoveRequest$inboundSchema` instead. */ + export const inboundSchema = GitProviderRemoveRequest$inboundSchema; + /** @deprecated use `GitProviderRemoveRequest$outboundSchema` instead. */ + export const outboundSchema = GitProviderRemoveRequest$outboundSchema; + /** @deprecated use `GitProviderRemoveRequest$Outbound` instead. */ + export type Outbound = GitProviderRemoveRequest$Outbound; +} + +export function gitProviderRemoveRequestToJSON( + gitProviderRemoveRequest: GitProviderRemoveRequest, +): string { + return JSON.stringify( + GitProviderRemoveRequest$outboundSchema.parse(gitProviderRemoveRequest), + ); +} + +export function gitProviderRemoveRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GitProviderRemoveRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GitProviderRemoveRequest' from JSON`, + ); +} diff --git a/src/models/operations/index.ts b/src/models/operations/index.ts new file mode 100644 index 0000000..2fc1c10 --- /dev/null +++ b/src/models/operations/index.ts @@ -0,0 +1,233 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export * from "./adminassignpermissions.js"; +export * from "./admincreateuserinvitation.js"; +export * from "./admingetuserbytoken.js"; +export * from "./adminremoveuser.js"; +export * from "./applicationcleanqueues.js"; +export * from "./applicationcreate.js"; +export * from "./applicationdelete.js"; +export * from "./applicationdeploy.js"; +export * from "./applicationmarkrunning.js"; +export * from "./applicationone.js"; +export * from "./applicationreadappmonitoring.js"; +export * from "./applicationreadtraefikconfig.js"; +export * from "./applicationredeploy.js"; +export * from "./applicationrefreshtoken.js"; +export * from "./applicationreload.js"; +export * from "./applicationsavebitbucketprovider.js"; +export * from "./applicationsavebuildtype.js"; +export * from "./applicationsavedockerprovider.js"; +export * from "./applicationsaveenvironment.js"; +export * from "./applicationsavegithubprovider.js"; +export * from "./applicationsavegitlabprovider.js"; +export * from "./applicationsavegitprodiver.js"; +export * from "./applicationstart.js"; +export * from "./applicationstop.js"; +export * from "./applicationupdate.js"; +export * from "./applicationupdatetraefikconfig.js"; +export * from "./authconfirmemail.js"; +export * from "./authcreateadmin.js"; +export * from "./authcreateuser.js"; +export * from "./authlogin.js"; +export * from "./authone.js"; +export * from "./authresetpassword.js"; +export * from "./authsendresetpasswordemail.js"; +export * from "./authupdate.js"; +export * from "./authverify2fasetup.js"; +export * from "./authverifylogin2fa.js"; +export * from "./backupcreate.js"; +export * from "./backupmanualbackupmariadb.js"; +export * from "./backupmanualbackupmongo.js"; +export * from "./backupmanualbackupmysql.js"; +export * from "./backupmanualbackuppostgres.js"; +export * from "./backupone.js"; +export * from "./backupremove.js"; +export * from "./backupupdate.js"; +export * from "./bitbucketcreate.js"; +export * from "./bitbucketgetbitbucketbranches.js"; +export * from "./bitbucketgetbitbucketrepositories.js"; +export * from "./bitbucketone.js"; +export * from "./bitbuckettestconnection.js"; +export * from "./bitbucketupdate.js"; +export * from "./certificatescreate.js"; +export * from "./certificatesone.js"; +export * from "./certificatesremove.js"; +export * from "./clusterremoveworker.js"; +export * from "./composecleanqueues.js"; +export * from "./composecreate.js"; +export * from "./composedelete.js"; +export * from "./composedeploy.js"; +export * from "./composedeploytemplate.js"; +export * from "./composefetchsourcetype.js"; +export * from "./composegetconvertedcompose.js"; +export * from "./composegetdefaultcommand.js"; +export * from "./composeone.js"; +export * from "./composerandomizecompose.js"; +export * from "./composeredeploy.js"; +export * from "./composerefreshtoken.js"; +export * from "./composestop.js"; +export * from "./composeupdate.js"; +export * from "./deploymentall.js"; +export * from "./deploymentallbycompose.js"; +export * from "./deploymentallbyserver.js"; +export * from "./destinationcreate.js"; +export * from "./destinationone.js"; +export * from "./destinationremove.js"; +export * from "./destinationtestconnection.js"; +export * from "./destinationupdate.js"; +export * from "./dockergetconfig.js"; +export * from "./dockergetcontainers.js"; +export * from "./dockergetcontainersbyapplabel.js"; +export * from "./dockergetcontainersbyappnamematch.js"; +export * from "./dockerrestartcontainer.js"; +export * from "./domainbyapplicationid.js"; +export * from "./domainbycomposeid.js"; +export * from "./domaincreate.js"; +export * from "./domaindelete.js"; +export * from "./domaingeneratedomain.js"; +export * from "./domainone.js"; +export * from "./domainupdate.js"; +export * from "./githubgetgithubbranches.js"; +export * from "./githubgetgithubrepositories.js"; +export * from "./githubone.js"; +export * from "./githubtestconnection.js"; +export * from "./githubupdate.js"; +export * from "./gitlabcreate.js"; +export * from "./gitlabgetgitlabbranches.js"; +export * from "./gitlabgetgitlabrepositories.js"; +export * from "./gitlabone.js"; +export * from "./gitlabtestconnection.js"; +export * from "./gitlabupdate.js"; +export * from "./gitproviderremove.js"; +export * from "./mariadbchangestatus.js"; +export * from "./mariadbcreate.js"; +export * from "./mariadbdeploy.js"; +export * from "./mariadbone.js"; +export * from "./mariadbreload.js"; +export * from "./mariadbremove.js"; +export * from "./mariadbsaveenvironment.js"; +export * from "./mariadbsaveexternalport.js"; +export * from "./mariadbstart.js"; +export * from "./mariadbstop.js"; +export * from "./mariadbupdate.js"; +export * from "./mongochangestatus.js"; +export * from "./mongocreate.js"; +export * from "./mongodeploy.js"; +export * from "./mongoone.js"; +export * from "./mongoreload.js"; +export * from "./mongoremove.js"; +export * from "./mongosaveenvironment.js"; +export * from "./mongosaveexternalport.js"; +export * from "./mongostart.js"; +export * from "./mongostop.js"; +export * from "./mongoupdate.js"; +export * from "./mountscreate.js"; +export * from "./mountsone.js"; +export * from "./mountsremove.js"; +export * from "./mountsupdate.js"; +export * from "./mysqlchangestatus.js"; +export * from "./mysqlcreate.js"; +export * from "./mysqldeploy.js"; +export * from "./mysqlone.js"; +export * from "./mysqlreload.js"; +export * from "./mysqlremove.js"; +export * from "./mysqlsaveenvironment.js"; +export * from "./mysqlsaveexternalport.js"; +export * from "./mysqlstart.js"; +export * from "./mysqlstop.js"; +export * from "./mysqlupdate.js"; +export * from "./notificationcreatediscord.js"; +export * from "./notificationcreateemail.js"; +export * from "./notificationcreateslack.js"; +export * from "./notificationcreatetelegram.js"; +export * from "./notificationone.js"; +export * from "./notificationremove.js"; +export * from "./notificationtestdiscordconnection.js"; +export * from "./notificationtestemailconnection.js"; +export * from "./notificationtestslackconnection.js"; +export * from "./notificationtesttelegramconnection.js"; +export * from "./notificationupdatediscord.js"; +export * from "./notificationupdateemail.js"; +export * from "./notificationupdateslack.js"; +export * from "./notificationupdatetelegram.js"; +export * from "./portcreate.js"; +export * from "./portdelete.js"; +export * from "./portone.js"; +export * from "./portupdate.js"; +export * from "./postgreschangestatus.js"; +export * from "./postgrescreate.js"; +export * from "./postgresdeploy.js"; +export * from "./postgresone.js"; +export * from "./postgresreload.js"; +export * from "./postgresremove.js"; +export * from "./postgressaveenvironment.js"; +export * from "./postgressaveexternalport.js"; +export * from "./postgresstart.js"; +export * from "./postgresstop.js"; +export * from "./postgresupdate.js"; +export * from "./projectcreate.js"; +export * from "./projectone.js"; +export * from "./projectremove.js"; +export * from "./projectupdate.js"; +export * from "./redirectscreate.js"; +export * from "./redirectsdelete.js"; +export * from "./redirectsone.js"; +export * from "./redirectsupdate.js"; +export * from "./redischangestatus.js"; +export * from "./rediscreate.js"; +export * from "./redisdeploy.js"; +export * from "./redisone.js"; +export * from "./redisreload.js"; +export * from "./redisremove.js"; +export * from "./redissaveenvironment.js"; +export * from "./redissaveexternalport.js"; +export * from "./redisstart.js"; +export * from "./redisstop.js"; +export * from "./redisupdate.js"; +export * from "./registrycreate.js"; +export * from "./registryone.js"; +export * from "./registryremove.js"; +export * from "./registrytestregistry.js"; +export * from "./registryupdate.js"; +export * from "./securitycreate.js"; +export * from "./securitydelete.js"; +export * from "./securityone.js"; +export * from "./securityupdate.js"; +export * from "./servercreate.js"; +export * from "./serverone.js"; +export * from "./serverremove.js"; +export * from "./serversetup.js"; +export * from "./serverupdate.js"; +export * from "./settingsassigndomainserver.js"; +export * from "./settingscleanall.js"; +export * from "./settingscleandockerbuilder.js"; +export * from "./settingscleandockerprune.js"; +export * from "./settingscleanstoppedcontainers.js"; +export * from "./settingscleanunusedimages.js"; +export * from "./settingscleanunusedvolumes.js"; +export * from "./settingshavetraefikdashboardportenabled.js"; +export * from "./settingsreaddirectories.js"; +export * from "./settingsreadtraefikenv.js"; +export * from "./settingsreadtraefikfile.js"; +export * from "./settingsreloadtraefik.js"; +export * from "./settingssavesshprivatekey.js"; +export * from "./settingstoggledashboard.js"; +export * from "./settingstogglelogrotate.js"; +export * from "./settingstogglerequests.js"; +export * from "./settingsupdatedockercleanup.js"; +export * from "./settingsupdatemiddlewaretraefikconfig.js"; +export * from "./settingsupdatetraefikconfig.js"; +export * from "./settingsupdatetraefikfile.js"; +export * from "./settingsupdatewebservertraefikconfig.js"; +export * from "./settingswritetraefikenv.js"; +export * from "./sshkeycreate.js"; +export * from "./sshkeygenerate.js"; +export * from "./sshkeyone.js"; +export * from "./sshkeyremove.js"; +export * from "./sshkeyupdate.js"; +export * from "./stripecreatecheckoutsession.js"; +export * from "./userbyauthid.js"; +export * from "./userbyuserid.js"; diff --git a/src/models/operations/mariadbchangestatus.ts b/src/models/operations/mariadbchangestatus.ts new file mode 100644 index 0000000..05110e3 --- /dev/null +++ b/src/models/operations/mariadbchangestatus.ts @@ -0,0 +1,105 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const MariadbChangeStatusApplicationStatus = { + Idle: "idle", + Running: "running", + Done: "done", + Error: "error", +} as const; +export type MariadbChangeStatusApplicationStatus = ClosedEnum< + typeof MariadbChangeStatusApplicationStatus +>; + +export type MariadbChangeStatusRequest = { + mariadbId: string; + applicationStatus: MariadbChangeStatusApplicationStatus; +}; + +/** @internal */ +export const MariadbChangeStatusApplicationStatus$inboundSchema: + z.ZodNativeEnum = z.nativeEnum( + MariadbChangeStatusApplicationStatus, + ); + +/** @internal */ +export const MariadbChangeStatusApplicationStatus$outboundSchema: + z.ZodNativeEnum = + MariadbChangeStatusApplicationStatus$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MariadbChangeStatusApplicationStatus$ { + /** @deprecated use `MariadbChangeStatusApplicationStatus$inboundSchema` instead. */ + export const inboundSchema = + MariadbChangeStatusApplicationStatus$inboundSchema; + /** @deprecated use `MariadbChangeStatusApplicationStatus$outboundSchema` instead. */ + export const outboundSchema = + MariadbChangeStatusApplicationStatus$outboundSchema; +} + +/** @internal */ +export const MariadbChangeStatusRequest$inboundSchema: z.ZodType< + MariadbChangeStatusRequest, + z.ZodTypeDef, + unknown +> = z.object({ + mariadbId: z.string(), + applicationStatus: MariadbChangeStatusApplicationStatus$inboundSchema, +}); + +/** @internal */ +export type MariadbChangeStatusRequest$Outbound = { + mariadbId: string; + applicationStatus: string; +}; + +/** @internal */ +export const MariadbChangeStatusRequest$outboundSchema: z.ZodType< + MariadbChangeStatusRequest$Outbound, + z.ZodTypeDef, + MariadbChangeStatusRequest +> = z.object({ + mariadbId: z.string(), + applicationStatus: MariadbChangeStatusApplicationStatus$outboundSchema, +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MariadbChangeStatusRequest$ { + /** @deprecated use `MariadbChangeStatusRequest$inboundSchema` instead. */ + export const inboundSchema = MariadbChangeStatusRequest$inboundSchema; + /** @deprecated use `MariadbChangeStatusRequest$outboundSchema` instead. */ + export const outboundSchema = MariadbChangeStatusRequest$outboundSchema; + /** @deprecated use `MariadbChangeStatusRequest$Outbound` instead. */ + export type Outbound = MariadbChangeStatusRequest$Outbound; +} + +export function mariadbChangeStatusRequestToJSON( + mariadbChangeStatusRequest: MariadbChangeStatusRequest, +): string { + return JSON.stringify( + MariadbChangeStatusRequest$outboundSchema.parse(mariadbChangeStatusRequest), + ); +} + +export function mariadbChangeStatusRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MariadbChangeStatusRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MariadbChangeStatusRequest' from JSON`, + ); +} diff --git a/src/models/operations/mariadbcreate.ts b/src/models/operations/mariadbcreate.ts new file mode 100644 index 0000000..e5b24ee --- /dev/null +++ b/src/models/operations/mariadbcreate.ts @@ -0,0 +1,102 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type MariadbCreateRequest = { + name: string; + appName: string; + dockerImage?: string | undefined; + databaseRootPassword: string; + projectId: string; + description?: string | null | undefined; + databaseName: string; + databaseUser: string; + databasePassword: string; + serverId?: string | null | undefined; +}; + +/** @internal */ +export const MariadbCreateRequest$inboundSchema: z.ZodType< + MariadbCreateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + appName: z.string(), + dockerImage: z.string().default("mariadb:6"), + databaseRootPassword: z.string(), + projectId: z.string(), + description: z.nullable(z.string()).optional(), + databaseName: z.string(), + databaseUser: z.string(), + databasePassword: z.string(), + serverId: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type MariadbCreateRequest$Outbound = { + name: string; + appName: string; + dockerImage: string; + databaseRootPassword: string; + projectId: string; + description?: string | null | undefined; + databaseName: string; + databaseUser: string; + databasePassword: string; + serverId?: string | null | undefined; +}; + +/** @internal */ +export const MariadbCreateRequest$outboundSchema: z.ZodType< + MariadbCreateRequest$Outbound, + z.ZodTypeDef, + MariadbCreateRequest +> = z.object({ + name: z.string(), + appName: z.string(), + dockerImage: z.string().default("mariadb:6"), + databaseRootPassword: z.string(), + projectId: z.string(), + description: z.nullable(z.string()).optional(), + databaseName: z.string(), + databaseUser: z.string(), + databasePassword: z.string(), + serverId: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MariadbCreateRequest$ { + /** @deprecated use `MariadbCreateRequest$inboundSchema` instead. */ + export const inboundSchema = MariadbCreateRequest$inboundSchema; + /** @deprecated use `MariadbCreateRequest$outboundSchema` instead. */ + export const outboundSchema = MariadbCreateRequest$outboundSchema; + /** @deprecated use `MariadbCreateRequest$Outbound` instead. */ + export type Outbound = MariadbCreateRequest$Outbound; +} + +export function mariadbCreateRequestToJSON( + mariadbCreateRequest: MariadbCreateRequest, +): string { + return JSON.stringify( + MariadbCreateRequest$outboundSchema.parse(mariadbCreateRequest), + ); +} + +export function mariadbCreateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MariadbCreateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MariadbCreateRequest' from JSON`, + ); +} diff --git a/src/models/operations/mariadbdeploy.ts b/src/models/operations/mariadbdeploy.ts new file mode 100644 index 0000000..e0947b4 --- /dev/null +++ b/src/models/operations/mariadbdeploy.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type MariadbDeployRequest = { + mariadbId: string; +}; + +/** @internal */ +export const MariadbDeployRequest$inboundSchema: z.ZodType< + MariadbDeployRequest, + z.ZodTypeDef, + unknown +> = z.object({ + mariadbId: z.string(), +}); + +/** @internal */ +export type MariadbDeployRequest$Outbound = { + mariadbId: string; +}; + +/** @internal */ +export const MariadbDeployRequest$outboundSchema: z.ZodType< + MariadbDeployRequest$Outbound, + z.ZodTypeDef, + MariadbDeployRequest +> = z.object({ + mariadbId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MariadbDeployRequest$ { + /** @deprecated use `MariadbDeployRequest$inboundSchema` instead. */ + export const inboundSchema = MariadbDeployRequest$inboundSchema; + /** @deprecated use `MariadbDeployRequest$outboundSchema` instead. */ + export const outboundSchema = MariadbDeployRequest$outboundSchema; + /** @deprecated use `MariadbDeployRequest$Outbound` instead. */ + export type Outbound = MariadbDeployRequest$Outbound; +} + +export function mariadbDeployRequestToJSON( + mariadbDeployRequest: MariadbDeployRequest, +): string { + return JSON.stringify( + MariadbDeployRequest$outboundSchema.parse(mariadbDeployRequest), + ); +} + +export function mariadbDeployRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MariadbDeployRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MariadbDeployRequest' from JSON`, + ); +} diff --git a/src/models/operations/mariadbone.ts b/src/models/operations/mariadbone.ts new file mode 100644 index 0000000..d6668c0 --- /dev/null +++ b/src/models/operations/mariadbone.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type MariadbOneRequest = { + mariadbId: string; +}; + +/** @internal */ +export const MariadbOneRequest$inboundSchema: z.ZodType< + MariadbOneRequest, + z.ZodTypeDef, + unknown +> = z.object({ + mariadbId: z.string(), +}); + +/** @internal */ +export type MariadbOneRequest$Outbound = { + mariadbId: string; +}; + +/** @internal */ +export const MariadbOneRequest$outboundSchema: z.ZodType< + MariadbOneRequest$Outbound, + z.ZodTypeDef, + MariadbOneRequest +> = z.object({ + mariadbId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MariadbOneRequest$ { + /** @deprecated use `MariadbOneRequest$inboundSchema` instead. */ + export const inboundSchema = MariadbOneRequest$inboundSchema; + /** @deprecated use `MariadbOneRequest$outboundSchema` instead. */ + export const outboundSchema = MariadbOneRequest$outboundSchema; + /** @deprecated use `MariadbOneRequest$Outbound` instead. */ + export type Outbound = MariadbOneRequest$Outbound; +} + +export function mariadbOneRequestToJSON( + mariadbOneRequest: MariadbOneRequest, +): string { + return JSON.stringify( + MariadbOneRequest$outboundSchema.parse(mariadbOneRequest), + ); +} + +export function mariadbOneRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MariadbOneRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MariadbOneRequest' from JSON`, + ); +} diff --git a/src/models/operations/mariadbreload.ts b/src/models/operations/mariadbreload.ts new file mode 100644 index 0000000..a3c5689 --- /dev/null +++ b/src/models/operations/mariadbreload.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type MariadbReloadRequest = { + mariadbId: string; + appName: string; +}; + +/** @internal */ +export const MariadbReloadRequest$inboundSchema: z.ZodType< + MariadbReloadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + mariadbId: z.string(), + appName: z.string(), +}); + +/** @internal */ +export type MariadbReloadRequest$Outbound = { + mariadbId: string; + appName: string; +}; + +/** @internal */ +export const MariadbReloadRequest$outboundSchema: z.ZodType< + MariadbReloadRequest$Outbound, + z.ZodTypeDef, + MariadbReloadRequest +> = z.object({ + mariadbId: z.string(), + appName: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MariadbReloadRequest$ { + /** @deprecated use `MariadbReloadRequest$inboundSchema` instead. */ + export const inboundSchema = MariadbReloadRequest$inboundSchema; + /** @deprecated use `MariadbReloadRequest$outboundSchema` instead. */ + export const outboundSchema = MariadbReloadRequest$outboundSchema; + /** @deprecated use `MariadbReloadRequest$Outbound` instead. */ + export type Outbound = MariadbReloadRequest$Outbound; +} + +export function mariadbReloadRequestToJSON( + mariadbReloadRequest: MariadbReloadRequest, +): string { + return JSON.stringify( + MariadbReloadRequest$outboundSchema.parse(mariadbReloadRequest), + ); +} + +export function mariadbReloadRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MariadbReloadRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MariadbReloadRequest' from JSON`, + ); +} diff --git a/src/models/operations/mariadbremove.ts b/src/models/operations/mariadbremove.ts new file mode 100644 index 0000000..3d6ab7c --- /dev/null +++ b/src/models/operations/mariadbremove.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type MariadbRemoveRequest = { + mariadbId: string; +}; + +/** @internal */ +export const MariadbRemoveRequest$inboundSchema: z.ZodType< + MariadbRemoveRequest, + z.ZodTypeDef, + unknown +> = z.object({ + mariadbId: z.string(), +}); + +/** @internal */ +export type MariadbRemoveRequest$Outbound = { + mariadbId: string; +}; + +/** @internal */ +export const MariadbRemoveRequest$outboundSchema: z.ZodType< + MariadbRemoveRequest$Outbound, + z.ZodTypeDef, + MariadbRemoveRequest +> = z.object({ + mariadbId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MariadbRemoveRequest$ { + /** @deprecated use `MariadbRemoveRequest$inboundSchema` instead. */ + export const inboundSchema = MariadbRemoveRequest$inboundSchema; + /** @deprecated use `MariadbRemoveRequest$outboundSchema` instead. */ + export const outboundSchema = MariadbRemoveRequest$outboundSchema; + /** @deprecated use `MariadbRemoveRequest$Outbound` instead. */ + export type Outbound = MariadbRemoveRequest$Outbound; +} + +export function mariadbRemoveRequestToJSON( + mariadbRemoveRequest: MariadbRemoveRequest, +): string { + return JSON.stringify( + MariadbRemoveRequest$outboundSchema.parse(mariadbRemoveRequest), + ); +} + +export function mariadbRemoveRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MariadbRemoveRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MariadbRemoveRequest' from JSON`, + ); +} diff --git a/src/models/operations/mariadbsaveenvironment.ts b/src/models/operations/mariadbsaveenvironment.ts new file mode 100644 index 0000000..c9d802e --- /dev/null +++ b/src/models/operations/mariadbsaveenvironment.ts @@ -0,0 +1,72 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type MariadbSaveEnvironmentRequest = { + mariadbId: string; + env?: string | null | undefined; +}; + +/** @internal */ +export const MariadbSaveEnvironmentRequest$inboundSchema: z.ZodType< + MariadbSaveEnvironmentRequest, + z.ZodTypeDef, + unknown +> = z.object({ + mariadbId: z.string(), + env: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type MariadbSaveEnvironmentRequest$Outbound = { + mariadbId: string; + env?: string | null | undefined; +}; + +/** @internal */ +export const MariadbSaveEnvironmentRequest$outboundSchema: z.ZodType< + MariadbSaveEnvironmentRequest$Outbound, + z.ZodTypeDef, + MariadbSaveEnvironmentRequest +> = z.object({ + mariadbId: z.string(), + env: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MariadbSaveEnvironmentRequest$ { + /** @deprecated use `MariadbSaveEnvironmentRequest$inboundSchema` instead. */ + export const inboundSchema = MariadbSaveEnvironmentRequest$inboundSchema; + /** @deprecated use `MariadbSaveEnvironmentRequest$outboundSchema` instead. */ + export const outboundSchema = MariadbSaveEnvironmentRequest$outboundSchema; + /** @deprecated use `MariadbSaveEnvironmentRequest$Outbound` instead. */ + export type Outbound = MariadbSaveEnvironmentRequest$Outbound; +} + +export function mariadbSaveEnvironmentRequestToJSON( + mariadbSaveEnvironmentRequest: MariadbSaveEnvironmentRequest, +): string { + return JSON.stringify( + MariadbSaveEnvironmentRequest$outboundSchema.parse( + mariadbSaveEnvironmentRequest, + ), + ); +} + +export function mariadbSaveEnvironmentRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MariadbSaveEnvironmentRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MariadbSaveEnvironmentRequest' from JSON`, + ); +} diff --git a/src/models/operations/mariadbsaveexternalport.ts b/src/models/operations/mariadbsaveexternalport.ts new file mode 100644 index 0000000..70903f4 --- /dev/null +++ b/src/models/operations/mariadbsaveexternalport.ts @@ -0,0 +1,72 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type MariadbSaveExternalPortRequest = { + mariadbId: string; + externalPort: number | null; +}; + +/** @internal */ +export const MariadbSaveExternalPortRequest$inboundSchema: z.ZodType< + MariadbSaveExternalPortRequest, + z.ZodTypeDef, + unknown +> = z.object({ + mariadbId: z.string(), + externalPort: z.nullable(z.number()), +}); + +/** @internal */ +export type MariadbSaveExternalPortRequest$Outbound = { + mariadbId: string; + externalPort: number | null; +}; + +/** @internal */ +export const MariadbSaveExternalPortRequest$outboundSchema: z.ZodType< + MariadbSaveExternalPortRequest$Outbound, + z.ZodTypeDef, + MariadbSaveExternalPortRequest +> = z.object({ + mariadbId: z.string(), + externalPort: z.nullable(z.number()), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MariadbSaveExternalPortRequest$ { + /** @deprecated use `MariadbSaveExternalPortRequest$inboundSchema` instead. */ + export const inboundSchema = MariadbSaveExternalPortRequest$inboundSchema; + /** @deprecated use `MariadbSaveExternalPortRequest$outboundSchema` instead. */ + export const outboundSchema = MariadbSaveExternalPortRequest$outboundSchema; + /** @deprecated use `MariadbSaveExternalPortRequest$Outbound` instead. */ + export type Outbound = MariadbSaveExternalPortRequest$Outbound; +} + +export function mariadbSaveExternalPortRequestToJSON( + mariadbSaveExternalPortRequest: MariadbSaveExternalPortRequest, +): string { + return JSON.stringify( + MariadbSaveExternalPortRequest$outboundSchema.parse( + mariadbSaveExternalPortRequest, + ), + ); +} + +export function mariadbSaveExternalPortRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MariadbSaveExternalPortRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MariadbSaveExternalPortRequest' from JSON`, + ); +} diff --git a/src/models/operations/mariadbstart.ts b/src/models/operations/mariadbstart.ts new file mode 100644 index 0000000..74ed93c --- /dev/null +++ b/src/models/operations/mariadbstart.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type MariadbStartRequest = { + mariadbId: string; +}; + +/** @internal */ +export const MariadbStartRequest$inboundSchema: z.ZodType< + MariadbStartRequest, + z.ZodTypeDef, + unknown +> = z.object({ + mariadbId: z.string(), +}); + +/** @internal */ +export type MariadbStartRequest$Outbound = { + mariadbId: string; +}; + +/** @internal */ +export const MariadbStartRequest$outboundSchema: z.ZodType< + MariadbStartRequest$Outbound, + z.ZodTypeDef, + MariadbStartRequest +> = z.object({ + mariadbId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MariadbStartRequest$ { + /** @deprecated use `MariadbStartRequest$inboundSchema` instead. */ + export const inboundSchema = MariadbStartRequest$inboundSchema; + /** @deprecated use `MariadbStartRequest$outboundSchema` instead. */ + export const outboundSchema = MariadbStartRequest$outboundSchema; + /** @deprecated use `MariadbStartRequest$Outbound` instead. */ + export type Outbound = MariadbStartRequest$Outbound; +} + +export function mariadbStartRequestToJSON( + mariadbStartRequest: MariadbStartRequest, +): string { + return JSON.stringify( + MariadbStartRequest$outboundSchema.parse(mariadbStartRequest), + ); +} + +export function mariadbStartRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MariadbStartRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MariadbStartRequest' from JSON`, + ); +} diff --git a/src/models/operations/mariadbstop.ts b/src/models/operations/mariadbstop.ts new file mode 100644 index 0000000..8ee673d --- /dev/null +++ b/src/models/operations/mariadbstop.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type MariadbStopRequest = { + mariadbId: string; +}; + +/** @internal */ +export const MariadbStopRequest$inboundSchema: z.ZodType< + MariadbStopRequest, + z.ZodTypeDef, + unknown +> = z.object({ + mariadbId: z.string(), +}); + +/** @internal */ +export type MariadbStopRequest$Outbound = { + mariadbId: string; +}; + +/** @internal */ +export const MariadbStopRequest$outboundSchema: z.ZodType< + MariadbStopRequest$Outbound, + z.ZodTypeDef, + MariadbStopRequest +> = z.object({ + mariadbId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MariadbStopRequest$ { + /** @deprecated use `MariadbStopRequest$inboundSchema` instead. */ + export const inboundSchema = MariadbStopRequest$inboundSchema; + /** @deprecated use `MariadbStopRequest$outboundSchema` instead. */ + export const outboundSchema = MariadbStopRequest$outboundSchema; + /** @deprecated use `MariadbStopRequest$Outbound` instead. */ + export type Outbound = MariadbStopRequest$Outbound; +} + +export function mariadbStopRequestToJSON( + mariadbStopRequest: MariadbStopRequest, +): string { + return JSON.stringify( + MariadbStopRequest$outboundSchema.parse(mariadbStopRequest), + ); +} + +export function mariadbStopRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MariadbStopRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MariadbStopRequest' from JSON`, + ); +} diff --git a/src/models/operations/mariadbupdate.ts b/src/models/operations/mariadbupdate.ts new file mode 100644 index 0000000..46f31fb --- /dev/null +++ b/src/models/operations/mariadbupdate.ts @@ -0,0 +1,170 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const MariadbUpdateApplicationStatus = { + Idle: "idle", + Running: "running", + Done: "done", + Error: "error", +} as const; +export type MariadbUpdateApplicationStatus = ClosedEnum< + typeof MariadbUpdateApplicationStatus +>; + +export type MariadbUpdateRequest = { + mariadbId: string; + name?: string | undefined; + appName?: string | undefined; + description?: string | null | undefined; + databaseName?: string | undefined; + databaseUser?: string | undefined; + databasePassword?: string | undefined; + databaseRootPassword?: string | undefined; + dockerImage?: string | undefined; + command?: string | null | undefined; + env?: string | null | undefined; + memoryReservation?: number | null | undefined; + memoryLimit?: number | null | undefined; + cpuReservation?: number | null | undefined; + cpuLimit?: number | null | undefined; + externalPort?: number | null | undefined; + applicationStatus?: MariadbUpdateApplicationStatus | undefined; + createdAt?: string | undefined; + projectId?: string | undefined; +}; + +/** @internal */ +export const MariadbUpdateApplicationStatus$inboundSchema: z.ZodNativeEnum< + typeof MariadbUpdateApplicationStatus +> = z.nativeEnum(MariadbUpdateApplicationStatus); + +/** @internal */ +export const MariadbUpdateApplicationStatus$outboundSchema: z.ZodNativeEnum< + typeof MariadbUpdateApplicationStatus +> = MariadbUpdateApplicationStatus$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MariadbUpdateApplicationStatus$ { + /** @deprecated use `MariadbUpdateApplicationStatus$inboundSchema` instead. */ + export const inboundSchema = MariadbUpdateApplicationStatus$inboundSchema; + /** @deprecated use `MariadbUpdateApplicationStatus$outboundSchema` instead. */ + export const outboundSchema = MariadbUpdateApplicationStatus$outboundSchema; +} + +/** @internal */ +export const MariadbUpdateRequest$inboundSchema: z.ZodType< + MariadbUpdateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + mariadbId: z.string(), + name: z.string().optional(), + appName: z.string().optional(), + description: z.nullable(z.string()).optional(), + databaseName: z.string().optional(), + databaseUser: z.string().optional(), + databasePassword: z.string().optional(), + databaseRootPassword: z.string().optional(), + dockerImage: z.string().default("mariadb:6"), + command: z.nullable(z.string()).optional(), + env: z.nullable(z.string()).optional(), + memoryReservation: z.nullable(z.number()).optional(), + memoryLimit: z.nullable(z.number()).optional(), + cpuReservation: z.nullable(z.number()).optional(), + cpuLimit: z.nullable(z.number()).optional(), + externalPort: z.nullable(z.number()).optional(), + applicationStatus: MariadbUpdateApplicationStatus$inboundSchema.optional(), + createdAt: z.string().optional(), + projectId: z.string().optional(), +}); + +/** @internal */ +export type MariadbUpdateRequest$Outbound = { + mariadbId: string; + name?: string | undefined; + appName?: string | undefined; + description?: string | null | undefined; + databaseName?: string | undefined; + databaseUser?: string | undefined; + databasePassword?: string | undefined; + databaseRootPassword?: string | undefined; + dockerImage: string; + command?: string | null | undefined; + env?: string | null | undefined; + memoryReservation?: number | null | undefined; + memoryLimit?: number | null | undefined; + cpuReservation?: number | null | undefined; + cpuLimit?: number | null | undefined; + externalPort?: number | null | undefined; + applicationStatus?: string | undefined; + createdAt?: string | undefined; + projectId?: string | undefined; +}; + +/** @internal */ +export const MariadbUpdateRequest$outboundSchema: z.ZodType< + MariadbUpdateRequest$Outbound, + z.ZodTypeDef, + MariadbUpdateRequest +> = z.object({ + mariadbId: z.string(), + name: z.string().optional(), + appName: z.string().optional(), + description: z.nullable(z.string()).optional(), + databaseName: z.string().optional(), + databaseUser: z.string().optional(), + databasePassword: z.string().optional(), + databaseRootPassword: z.string().optional(), + dockerImage: z.string().default("mariadb:6"), + command: z.nullable(z.string()).optional(), + env: z.nullable(z.string()).optional(), + memoryReservation: z.nullable(z.number()).optional(), + memoryLimit: z.nullable(z.number()).optional(), + cpuReservation: z.nullable(z.number()).optional(), + cpuLimit: z.nullable(z.number()).optional(), + externalPort: z.nullable(z.number()).optional(), + applicationStatus: MariadbUpdateApplicationStatus$outboundSchema.optional(), + createdAt: z.string().optional(), + projectId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MariadbUpdateRequest$ { + /** @deprecated use `MariadbUpdateRequest$inboundSchema` instead. */ + export const inboundSchema = MariadbUpdateRequest$inboundSchema; + /** @deprecated use `MariadbUpdateRequest$outboundSchema` instead. */ + export const outboundSchema = MariadbUpdateRequest$outboundSchema; + /** @deprecated use `MariadbUpdateRequest$Outbound` instead. */ + export type Outbound = MariadbUpdateRequest$Outbound; +} + +export function mariadbUpdateRequestToJSON( + mariadbUpdateRequest: MariadbUpdateRequest, +): string { + return JSON.stringify( + MariadbUpdateRequest$outboundSchema.parse(mariadbUpdateRequest), + ); +} + +export function mariadbUpdateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MariadbUpdateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MariadbUpdateRequest' from JSON`, + ); +} diff --git a/src/models/operations/mongochangestatus.ts b/src/models/operations/mongochangestatus.ts new file mode 100644 index 0000000..8ed6054 --- /dev/null +++ b/src/models/operations/mongochangestatus.ts @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const MongoChangeStatusApplicationStatus = { + Idle: "idle", + Running: "running", + Done: "done", + Error: "error", +} as const; +export type MongoChangeStatusApplicationStatus = ClosedEnum< + typeof MongoChangeStatusApplicationStatus +>; + +export type MongoChangeStatusRequest = { + mongoId: string; + applicationStatus: MongoChangeStatusApplicationStatus; +}; + +/** @internal */ +export const MongoChangeStatusApplicationStatus$inboundSchema: z.ZodNativeEnum< + typeof MongoChangeStatusApplicationStatus +> = z.nativeEnum(MongoChangeStatusApplicationStatus); + +/** @internal */ +export const MongoChangeStatusApplicationStatus$outboundSchema: z.ZodNativeEnum< + typeof MongoChangeStatusApplicationStatus +> = MongoChangeStatusApplicationStatus$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MongoChangeStatusApplicationStatus$ { + /** @deprecated use `MongoChangeStatusApplicationStatus$inboundSchema` instead. */ + export const inboundSchema = MongoChangeStatusApplicationStatus$inboundSchema; + /** @deprecated use `MongoChangeStatusApplicationStatus$outboundSchema` instead. */ + export const outboundSchema = + MongoChangeStatusApplicationStatus$outboundSchema; +} + +/** @internal */ +export const MongoChangeStatusRequest$inboundSchema: z.ZodType< + MongoChangeStatusRequest, + z.ZodTypeDef, + unknown +> = z.object({ + mongoId: z.string(), + applicationStatus: MongoChangeStatusApplicationStatus$inboundSchema, +}); + +/** @internal */ +export type MongoChangeStatusRequest$Outbound = { + mongoId: string; + applicationStatus: string; +}; + +/** @internal */ +export const MongoChangeStatusRequest$outboundSchema: z.ZodType< + MongoChangeStatusRequest$Outbound, + z.ZodTypeDef, + MongoChangeStatusRequest +> = z.object({ + mongoId: z.string(), + applicationStatus: MongoChangeStatusApplicationStatus$outboundSchema, +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MongoChangeStatusRequest$ { + /** @deprecated use `MongoChangeStatusRequest$inboundSchema` instead. */ + export const inboundSchema = MongoChangeStatusRequest$inboundSchema; + /** @deprecated use `MongoChangeStatusRequest$outboundSchema` instead. */ + export const outboundSchema = MongoChangeStatusRequest$outboundSchema; + /** @deprecated use `MongoChangeStatusRequest$Outbound` instead. */ + export type Outbound = MongoChangeStatusRequest$Outbound; +} + +export function mongoChangeStatusRequestToJSON( + mongoChangeStatusRequest: MongoChangeStatusRequest, +): string { + return JSON.stringify( + MongoChangeStatusRequest$outboundSchema.parse(mongoChangeStatusRequest), + ); +} + +export function mongoChangeStatusRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MongoChangeStatusRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MongoChangeStatusRequest' from JSON`, + ); +} diff --git a/src/models/operations/mongocreate.ts b/src/models/operations/mongocreate.ts new file mode 100644 index 0000000..5545209 --- /dev/null +++ b/src/models/operations/mongocreate.ts @@ -0,0 +1,94 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type MongoCreateRequest = { + name: string; + appName: string; + dockerImage?: string | undefined; + projectId: string; + description?: string | null | undefined; + databaseUser: string; + databasePassword: string; + serverId?: string | null | undefined; +}; + +/** @internal */ +export const MongoCreateRequest$inboundSchema: z.ZodType< + MongoCreateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + appName: z.string(), + dockerImage: z.string().default("mongo:15"), + projectId: z.string(), + description: z.nullable(z.string()).optional(), + databaseUser: z.string(), + databasePassword: z.string(), + serverId: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type MongoCreateRequest$Outbound = { + name: string; + appName: string; + dockerImage: string; + projectId: string; + description?: string | null | undefined; + databaseUser: string; + databasePassword: string; + serverId?: string | null | undefined; +}; + +/** @internal */ +export const MongoCreateRequest$outboundSchema: z.ZodType< + MongoCreateRequest$Outbound, + z.ZodTypeDef, + MongoCreateRequest +> = z.object({ + name: z.string(), + appName: z.string(), + dockerImage: z.string().default("mongo:15"), + projectId: z.string(), + description: z.nullable(z.string()).optional(), + databaseUser: z.string(), + databasePassword: z.string(), + serverId: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MongoCreateRequest$ { + /** @deprecated use `MongoCreateRequest$inboundSchema` instead. */ + export const inboundSchema = MongoCreateRequest$inboundSchema; + /** @deprecated use `MongoCreateRequest$outboundSchema` instead. */ + export const outboundSchema = MongoCreateRequest$outboundSchema; + /** @deprecated use `MongoCreateRequest$Outbound` instead. */ + export type Outbound = MongoCreateRequest$Outbound; +} + +export function mongoCreateRequestToJSON( + mongoCreateRequest: MongoCreateRequest, +): string { + return JSON.stringify( + MongoCreateRequest$outboundSchema.parse(mongoCreateRequest), + ); +} + +export function mongoCreateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MongoCreateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MongoCreateRequest' from JSON`, + ); +} diff --git a/src/models/operations/mongodeploy.ts b/src/models/operations/mongodeploy.ts new file mode 100644 index 0000000..ec3edd0 --- /dev/null +++ b/src/models/operations/mongodeploy.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type MongoDeployRequest = { + mongoId: string; +}; + +/** @internal */ +export const MongoDeployRequest$inboundSchema: z.ZodType< + MongoDeployRequest, + z.ZodTypeDef, + unknown +> = z.object({ + mongoId: z.string(), +}); + +/** @internal */ +export type MongoDeployRequest$Outbound = { + mongoId: string; +}; + +/** @internal */ +export const MongoDeployRequest$outboundSchema: z.ZodType< + MongoDeployRequest$Outbound, + z.ZodTypeDef, + MongoDeployRequest +> = z.object({ + mongoId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MongoDeployRequest$ { + /** @deprecated use `MongoDeployRequest$inboundSchema` instead. */ + export const inboundSchema = MongoDeployRequest$inboundSchema; + /** @deprecated use `MongoDeployRequest$outboundSchema` instead. */ + export const outboundSchema = MongoDeployRequest$outboundSchema; + /** @deprecated use `MongoDeployRequest$Outbound` instead. */ + export type Outbound = MongoDeployRequest$Outbound; +} + +export function mongoDeployRequestToJSON( + mongoDeployRequest: MongoDeployRequest, +): string { + return JSON.stringify( + MongoDeployRequest$outboundSchema.parse(mongoDeployRequest), + ); +} + +export function mongoDeployRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MongoDeployRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MongoDeployRequest' from JSON`, + ); +} diff --git a/src/models/operations/mongoone.ts b/src/models/operations/mongoone.ts new file mode 100644 index 0000000..7a7f6dd --- /dev/null +++ b/src/models/operations/mongoone.ts @@ -0,0 +1,64 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type MongoOneRequest = { + mongoId: string; +}; + +/** @internal */ +export const MongoOneRequest$inboundSchema: z.ZodType< + MongoOneRequest, + z.ZodTypeDef, + unknown +> = z.object({ + mongoId: z.string(), +}); + +/** @internal */ +export type MongoOneRequest$Outbound = { + mongoId: string; +}; + +/** @internal */ +export const MongoOneRequest$outboundSchema: z.ZodType< + MongoOneRequest$Outbound, + z.ZodTypeDef, + MongoOneRequest +> = z.object({ + mongoId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MongoOneRequest$ { + /** @deprecated use `MongoOneRequest$inboundSchema` instead. */ + export const inboundSchema = MongoOneRequest$inboundSchema; + /** @deprecated use `MongoOneRequest$outboundSchema` instead. */ + export const outboundSchema = MongoOneRequest$outboundSchema; + /** @deprecated use `MongoOneRequest$Outbound` instead. */ + export type Outbound = MongoOneRequest$Outbound; +} + +export function mongoOneRequestToJSON( + mongoOneRequest: MongoOneRequest, +): string { + return JSON.stringify(MongoOneRequest$outboundSchema.parse(mongoOneRequest)); +} + +export function mongoOneRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MongoOneRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MongoOneRequest' from JSON`, + ); +} diff --git a/src/models/operations/mongoreload.ts b/src/models/operations/mongoreload.ts new file mode 100644 index 0000000..b459b3b --- /dev/null +++ b/src/models/operations/mongoreload.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type MongoReloadRequest = { + mongoId: string; + appName: string; +}; + +/** @internal */ +export const MongoReloadRequest$inboundSchema: z.ZodType< + MongoReloadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + mongoId: z.string(), + appName: z.string(), +}); + +/** @internal */ +export type MongoReloadRequest$Outbound = { + mongoId: string; + appName: string; +}; + +/** @internal */ +export const MongoReloadRequest$outboundSchema: z.ZodType< + MongoReloadRequest$Outbound, + z.ZodTypeDef, + MongoReloadRequest +> = z.object({ + mongoId: z.string(), + appName: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MongoReloadRequest$ { + /** @deprecated use `MongoReloadRequest$inboundSchema` instead. */ + export const inboundSchema = MongoReloadRequest$inboundSchema; + /** @deprecated use `MongoReloadRequest$outboundSchema` instead. */ + export const outboundSchema = MongoReloadRequest$outboundSchema; + /** @deprecated use `MongoReloadRequest$Outbound` instead. */ + export type Outbound = MongoReloadRequest$Outbound; +} + +export function mongoReloadRequestToJSON( + mongoReloadRequest: MongoReloadRequest, +): string { + return JSON.stringify( + MongoReloadRequest$outboundSchema.parse(mongoReloadRequest), + ); +} + +export function mongoReloadRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MongoReloadRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MongoReloadRequest' from JSON`, + ); +} diff --git a/src/models/operations/mongoremove.ts b/src/models/operations/mongoremove.ts new file mode 100644 index 0000000..b5b914d --- /dev/null +++ b/src/models/operations/mongoremove.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type MongoRemoveRequest = { + mongoId: string; +}; + +/** @internal */ +export const MongoRemoveRequest$inboundSchema: z.ZodType< + MongoRemoveRequest, + z.ZodTypeDef, + unknown +> = z.object({ + mongoId: z.string(), +}); + +/** @internal */ +export type MongoRemoveRequest$Outbound = { + mongoId: string; +}; + +/** @internal */ +export const MongoRemoveRequest$outboundSchema: z.ZodType< + MongoRemoveRequest$Outbound, + z.ZodTypeDef, + MongoRemoveRequest +> = z.object({ + mongoId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MongoRemoveRequest$ { + /** @deprecated use `MongoRemoveRequest$inboundSchema` instead. */ + export const inboundSchema = MongoRemoveRequest$inboundSchema; + /** @deprecated use `MongoRemoveRequest$outboundSchema` instead. */ + export const outboundSchema = MongoRemoveRequest$outboundSchema; + /** @deprecated use `MongoRemoveRequest$Outbound` instead. */ + export type Outbound = MongoRemoveRequest$Outbound; +} + +export function mongoRemoveRequestToJSON( + mongoRemoveRequest: MongoRemoveRequest, +): string { + return JSON.stringify( + MongoRemoveRequest$outboundSchema.parse(mongoRemoveRequest), + ); +} + +export function mongoRemoveRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MongoRemoveRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MongoRemoveRequest' from JSON`, + ); +} diff --git a/src/models/operations/mongosaveenvironment.ts b/src/models/operations/mongosaveenvironment.ts new file mode 100644 index 0000000..a6c1bf6 --- /dev/null +++ b/src/models/operations/mongosaveenvironment.ts @@ -0,0 +1,72 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type MongoSaveEnvironmentRequest = { + mongoId: string; + env?: string | null | undefined; +}; + +/** @internal */ +export const MongoSaveEnvironmentRequest$inboundSchema: z.ZodType< + MongoSaveEnvironmentRequest, + z.ZodTypeDef, + unknown +> = z.object({ + mongoId: z.string(), + env: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type MongoSaveEnvironmentRequest$Outbound = { + mongoId: string; + env?: string | null | undefined; +}; + +/** @internal */ +export const MongoSaveEnvironmentRequest$outboundSchema: z.ZodType< + MongoSaveEnvironmentRequest$Outbound, + z.ZodTypeDef, + MongoSaveEnvironmentRequest +> = z.object({ + mongoId: z.string(), + env: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MongoSaveEnvironmentRequest$ { + /** @deprecated use `MongoSaveEnvironmentRequest$inboundSchema` instead. */ + export const inboundSchema = MongoSaveEnvironmentRequest$inboundSchema; + /** @deprecated use `MongoSaveEnvironmentRequest$outboundSchema` instead. */ + export const outboundSchema = MongoSaveEnvironmentRequest$outboundSchema; + /** @deprecated use `MongoSaveEnvironmentRequest$Outbound` instead. */ + export type Outbound = MongoSaveEnvironmentRequest$Outbound; +} + +export function mongoSaveEnvironmentRequestToJSON( + mongoSaveEnvironmentRequest: MongoSaveEnvironmentRequest, +): string { + return JSON.stringify( + MongoSaveEnvironmentRequest$outboundSchema.parse( + mongoSaveEnvironmentRequest, + ), + ); +} + +export function mongoSaveEnvironmentRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MongoSaveEnvironmentRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MongoSaveEnvironmentRequest' from JSON`, + ); +} diff --git a/src/models/operations/mongosaveexternalport.ts b/src/models/operations/mongosaveexternalport.ts new file mode 100644 index 0000000..1e93b3a --- /dev/null +++ b/src/models/operations/mongosaveexternalport.ts @@ -0,0 +1,72 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type MongoSaveExternalPortRequest = { + mongoId: string; + externalPort: number | null; +}; + +/** @internal */ +export const MongoSaveExternalPortRequest$inboundSchema: z.ZodType< + MongoSaveExternalPortRequest, + z.ZodTypeDef, + unknown +> = z.object({ + mongoId: z.string(), + externalPort: z.nullable(z.number()), +}); + +/** @internal */ +export type MongoSaveExternalPortRequest$Outbound = { + mongoId: string; + externalPort: number | null; +}; + +/** @internal */ +export const MongoSaveExternalPortRequest$outboundSchema: z.ZodType< + MongoSaveExternalPortRequest$Outbound, + z.ZodTypeDef, + MongoSaveExternalPortRequest +> = z.object({ + mongoId: z.string(), + externalPort: z.nullable(z.number()), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MongoSaveExternalPortRequest$ { + /** @deprecated use `MongoSaveExternalPortRequest$inboundSchema` instead. */ + export const inboundSchema = MongoSaveExternalPortRequest$inboundSchema; + /** @deprecated use `MongoSaveExternalPortRequest$outboundSchema` instead. */ + export const outboundSchema = MongoSaveExternalPortRequest$outboundSchema; + /** @deprecated use `MongoSaveExternalPortRequest$Outbound` instead. */ + export type Outbound = MongoSaveExternalPortRequest$Outbound; +} + +export function mongoSaveExternalPortRequestToJSON( + mongoSaveExternalPortRequest: MongoSaveExternalPortRequest, +): string { + return JSON.stringify( + MongoSaveExternalPortRequest$outboundSchema.parse( + mongoSaveExternalPortRequest, + ), + ); +} + +export function mongoSaveExternalPortRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MongoSaveExternalPortRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MongoSaveExternalPortRequest' from JSON`, + ); +} diff --git a/src/models/operations/mongostart.ts b/src/models/operations/mongostart.ts new file mode 100644 index 0000000..c7422b3 --- /dev/null +++ b/src/models/operations/mongostart.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type MongoStartRequest = { + mongoId: string; +}; + +/** @internal */ +export const MongoStartRequest$inboundSchema: z.ZodType< + MongoStartRequest, + z.ZodTypeDef, + unknown +> = z.object({ + mongoId: z.string(), +}); + +/** @internal */ +export type MongoStartRequest$Outbound = { + mongoId: string; +}; + +/** @internal */ +export const MongoStartRequest$outboundSchema: z.ZodType< + MongoStartRequest$Outbound, + z.ZodTypeDef, + MongoStartRequest +> = z.object({ + mongoId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MongoStartRequest$ { + /** @deprecated use `MongoStartRequest$inboundSchema` instead. */ + export const inboundSchema = MongoStartRequest$inboundSchema; + /** @deprecated use `MongoStartRequest$outboundSchema` instead. */ + export const outboundSchema = MongoStartRequest$outboundSchema; + /** @deprecated use `MongoStartRequest$Outbound` instead. */ + export type Outbound = MongoStartRequest$Outbound; +} + +export function mongoStartRequestToJSON( + mongoStartRequest: MongoStartRequest, +): string { + return JSON.stringify( + MongoStartRequest$outboundSchema.parse(mongoStartRequest), + ); +} + +export function mongoStartRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MongoStartRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MongoStartRequest' from JSON`, + ); +} diff --git a/src/models/operations/mongostop.ts b/src/models/operations/mongostop.ts new file mode 100644 index 0000000..9986a7d --- /dev/null +++ b/src/models/operations/mongostop.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type MongoStopRequest = { + mongoId: string; +}; + +/** @internal */ +export const MongoStopRequest$inboundSchema: z.ZodType< + MongoStopRequest, + z.ZodTypeDef, + unknown +> = z.object({ + mongoId: z.string(), +}); + +/** @internal */ +export type MongoStopRequest$Outbound = { + mongoId: string; +}; + +/** @internal */ +export const MongoStopRequest$outboundSchema: z.ZodType< + MongoStopRequest$Outbound, + z.ZodTypeDef, + MongoStopRequest +> = z.object({ + mongoId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MongoStopRequest$ { + /** @deprecated use `MongoStopRequest$inboundSchema` instead. */ + export const inboundSchema = MongoStopRequest$inboundSchema; + /** @deprecated use `MongoStopRequest$outboundSchema` instead. */ + export const outboundSchema = MongoStopRequest$outboundSchema; + /** @deprecated use `MongoStopRequest$Outbound` instead. */ + export type Outbound = MongoStopRequest$Outbound; +} + +export function mongoStopRequestToJSON( + mongoStopRequest: MongoStopRequest, +): string { + return JSON.stringify( + MongoStopRequest$outboundSchema.parse(mongoStopRequest), + ); +} + +export function mongoStopRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MongoStopRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MongoStopRequest' from JSON`, + ); +} diff --git a/src/models/operations/mongoupdate.ts b/src/models/operations/mongoupdate.ts new file mode 100644 index 0000000..7f21c38 --- /dev/null +++ b/src/models/operations/mongoupdate.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const MongoUpdateApplicationStatus = { + Idle: "idle", + Running: "running", + Done: "done", + Error: "error", +} as const; +export type MongoUpdateApplicationStatus = ClosedEnum< + typeof MongoUpdateApplicationStatus +>; + +export type MongoUpdateRequest = { + mongoId: string; + name?: string | undefined; + appName?: string | undefined; + description?: string | null | undefined; + databaseUser?: string | undefined; + databasePassword?: string | undefined; + dockerImage?: string | undefined; + command?: string | null | undefined; + env?: string | null | undefined; + memoryReservation?: number | null | undefined; + memoryLimit?: number | null | undefined; + cpuReservation?: number | null | undefined; + cpuLimit?: number | null | undefined; + externalPort?: number | null | undefined; + applicationStatus?: MongoUpdateApplicationStatus | undefined; + createdAt?: string | undefined; + projectId?: string | undefined; +}; + +/** @internal */ +export const MongoUpdateApplicationStatus$inboundSchema: z.ZodNativeEnum< + typeof MongoUpdateApplicationStatus +> = z.nativeEnum(MongoUpdateApplicationStatus); + +/** @internal */ +export const MongoUpdateApplicationStatus$outboundSchema: z.ZodNativeEnum< + typeof MongoUpdateApplicationStatus +> = MongoUpdateApplicationStatus$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MongoUpdateApplicationStatus$ { + /** @deprecated use `MongoUpdateApplicationStatus$inboundSchema` instead. */ + export const inboundSchema = MongoUpdateApplicationStatus$inboundSchema; + /** @deprecated use `MongoUpdateApplicationStatus$outboundSchema` instead. */ + export const outboundSchema = MongoUpdateApplicationStatus$outboundSchema; +} + +/** @internal */ +export const MongoUpdateRequest$inboundSchema: z.ZodType< + MongoUpdateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + mongoId: z.string(), + name: z.string().optional(), + appName: z.string().optional(), + description: z.nullable(z.string()).optional(), + databaseUser: z.string().optional(), + databasePassword: z.string().optional(), + dockerImage: z.string().default("mongo:15"), + command: z.nullable(z.string()).optional(), + env: z.nullable(z.string()).optional(), + memoryReservation: z.nullable(z.number()).optional(), + memoryLimit: z.nullable(z.number()).optional(), + cpuReservation: z.nullable(z.number()).optional(), + cpuLimit: z.nullable(z.number()).optional(), + externalPort: z.nullable(z.number()).optional(), + applicationStatus: MongoUpdateApplicationStatus$inboundSchema.optional(), + createdAt: z.string().optional(), + projectId: z.string().optional(), +}); + +/** @internal */ +export type MongoUpdateRequest$Outbound = { + mongoId: string; + name?: string | undefined; + appName?: string | undefined; + description?: string | null | undefined; + databaseUser?: string | undefined; + databasePassword?: string | undefined; + dockerImage: string; + command?: string | null | undefined; + env?: string | null | undefined; + memoryReservation?: number | null | undefined; + memoryLimit?: number | null | undefined; + cpuReservation?: number | null | undefined; + cpuLimit?: number | null | undefined; + externalPort?: number | null | undefined; + applicationStatus?: string | undefined; + createdAt?: string | undefined; + projectId?: string | undefined; +}; + +/** @internal */ +export const MongoUpdateRequest$outboundSchema: z.ZodType< + MongoUpdateRequest$Outbound, + z.ZodTypeDef, + MongoUpdateRequest +> = z.object({ + mongoId: z.string(), + name: z.string().optional(), + appName: z.string().optional(), + description: z.nullable(z.string()).optional(), + databaseUser: z.string().optional(), + databasePassword: z.string().optional(), + dockerImage: z.string().default("mongo:15"), + command: z.nullable(z.string()).optional(), + env: z.nullable(z.string()).optional(), + memoryReservation: z.nullable(z.number()).optional(), + memoryLimit: z.nullable(z.number()).optional(), + cpuReservation: z.nullable(z.number()).optional(), + cpuLimit: z.nullable(z.number()).optional(), + externalPort: z.nullable(z.number()).optional(), + applicationStatus: MongoUpdateApplicationStatus$outboundSchema.optional(), + createdAt: z.string().optional(), + projectId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MongoUpdateRequest$ { + /** @deprecated use `MongoUpdateRequest$inboundSchema` instead. */ + export const inboundSchema = MongoUpdateRequest$inboundSchema; + /** @deprecated use `MongoUpdateRequest$outboundSchema` instead. */ + export const outboundSchema = MongoUpdateRequest$outboundSchema; + /** @deprecated use `MongoUpdateRequest$Outbound` instead. */ + export type Outbound = MongoUpdateRequest$Outbound; +} + +export function mongoUpdateRequestToJSON( + mongoUpdateRequest: MongoUpdateRequest, +): string { + return JSON.stringify( + MongoUpdateRequest$outboundSchema.parse(mongoUpdateRequest), + ); +} + +export function mongoUpdateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MongoUpdateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MongoUpdateRequest' from JSON`, + ); +} diff --git a/src/models/operations/mountscreate.ts b/src/models/operations/mountscreate.ts new file mode 100644 index 0000000..0a41290 --- /dev/null +++ b/src/models/operations/mountscreate.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const MountsCreateType = { + Bind: "bind", + Volume: "volume", + File: "file", +} as const; +export type MountsCreateType = ClosedEnum; + +export const MountsCreateServiceType = { + Application: "application", + Postgres: "postgres", + Mysql: "mysql", + Mariadb: "mariadb", + Mongo: "mongo", + Redis: "redis", + Compose: "compose", +} as const; +export type MountsCreateServiceType = ClosedEnum< + typeof MountsCreateServiceType +>; + +export type MountsCreateRequest = { + type: MountsCreateType; + hostPath?: string | null | undefined; + volumeName?: string | null | undefined; + content?: string | null | undefined; + mountPath: string; + serviceType?: MountsCreateServiceType | undefined; + filePath?: string | null | undefined; + serviceId: string; +}; + +/** @internal */ +export const MountsCreateType$inboundSchema: z.ZodNativeEnum< + typeof MountsCreateType +> = z.nativeEnum(MountsCreateType); + +/** @internal */ +export const MountsCreateType$outboundSchema: z.ZodNativeEnum< + typeof MountsCreateType +> = MountsCreateType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MountsCreateType$ { + /** @deprecated use `MountsCreateType$inboundSchema` instead. */ + export const inboundSchema = MountsCreateType$inboundSchema; + /** @deprecated use `MountsCreateType$outboundSchema` instead. */ + export const outboundSchema = MountsCreateType$outboundSchema; +} + +/** @internal */ +export const MountsCreateServiceType$inboundSchema: z.ZodNativeEnum< + typeof MountsCreateServiceType +> = z.nativeEnum(MountsCreateServiceType); + +/** @internal */ +export const MountsCreateServiceType$outboundSchema: z.ZodNativeEnum< + typeof MountsCreateServiceType +> = MountsCreateServiceType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MountsCreateServiceType$ { + /** @deprecated use `MountsCreateServiceType$inboundSchema` instead. */ + export const inboundSchema = MountsCreateServiceType$inboundSchema; + /** @deprecated use `MountsCreateServiceType$outboundSchema` instead. */ + export const outboundSchema = MountsCreateServiceType$outboundSchema; +} + +/** @internal */ +export const MountsCreateRequest$inboundSchema: z.ZodType< + MountsCreateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + type: MountsCreateType$inboundSchema, + hostPath: z.nullable(z.string()).optional(), + volumeName: z.nullable(z.string()).optional(), + content: z.nullable(z.string()).optional(), + mountPath: z.string(), + serviceType: MountsCreateServiceType$inboundSchema.default("application"), + filePath: z.nullable(z.string()).optional(), + serviceId: z.string(), +}); + +/** @internal */ +export type MountsCreateRequest$Outbound = { + type: string; + hostPath?: string | null | undefined; + volumeName?: string | null | undefined; + content?: string | null | undefined; + mountPath: string; + serviceType: string; + filePath?: string | null | undefined; + serviceId: string; +}; + +/** @internal */ +export const MountsCreateRequest$outboundSchema: z.ZodType< + MountsCreateRequest$Outbound, + z.ZodTypeDef, + MountsCreateRequest +> = z.object({ + type: MountsCreateType$outboundSchema, + hostPath: z.nullable(z.string()).optional(), + volumeName: z.nullable(z.string()).optional(), + content: z.nullable(z.string()).optional(), + mountPath: z.string(), + serviceType: MountsCreateServiceType$outboundSchema.default("application"), + filePath: z.nullable(z.string()).optional(), + serviceId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MountsCreateRequest$ { + /** @deprecated use `MountsCreateRequest$inboundSchema` instead. */ + export const inboundSchema = MountsCreateRequest$inboundSchema; + /** @deprecated use `MountsCreateRequest$outboundSchema` instead. */ + export const outboundSchema = MountsCreateRequest$outboundSchema; + /** @deprecated use `MountsCreateRequest$Outbound` instead. */ + export type Outbound = MountsCreateRequest$Outbound; +} + +export function mountsCreateRequestToJSON( + mountsCreateRequest: MountsCreateRequest, +): string { + return JSON.stringify( + MountsCreateRequest$outboundSchema.parse(mountsCreateRequest), + ); +} + +export function mountsCreateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MountsCreateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MountsCreateRequest' from JSON`, + ); +} diff --git a/src/models/operations/mountsone.ts b/src/models/operations/mountsone.ts new file mode 100644 index 0000000..1095185 --- /dev/null +++ b/src/models/operations/mountsone.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type MountsOneRequest = { + mountId: string; +}; + +/** @internal */ +export const MountsOneRequest$inboundSchema: z.ZodType< + MountsOneRequest, + z.ZodTypeDef, + unknown +> = z.object({ + mountId: z.string(), +}); + +/** @internal */ +export type MountsOneRequest$Outbound = { + mountId: string; +}; + +/** @internal */ +export const MountsOneRequest$outboundSchema: z.ZodType< + MountsOneRequest$Outbound, + z.ZodTypeDef, + MountsOneRequest +> = z.object({ + mountId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MountsOneRequest$ { + /** @deprecated use `MountsOneRequest$inboundSchema` instead. */ + export const inboundSchema = MountsOneRequest$inboundSchema; + /** @deprecated use `MountsOneRequest$outboundSchema` instead. */ + export const outboundSchema = MountsOneRequest$outboundSchema; + /** @deprecated use `MountsOneRequest$Outbound` instead. */ + export type Outbound = MountsOneRequest$Outbound; +} + +export function mountsOneRequestToJSON( + mountsOneRequest: MountsOneRequest, +): string { + return JSON.stringify( + MountsOneRequest$outboundSchema.parse(mountsOneRequest), + ); +} + +export function mountsOneRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MountsOneRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MountsOneRequest' from JSON`, + ); +} diff --git a/src/models/operations/mountsremove.ts b/src/models/operations/mountsremove.ts new file mode 100644 index 0000000..b0ef607 --- /dev/null +++ b/src/models/operations/mountsremove.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type MountsRemoveRequest = { + mountId: string; +}; + +/** @internal */ +export const MountsRemoveRequest$inboundSchema: z.ZodType< + MountsRemoveRequest, + z.ZodTypeDef, + unknown +> = z.object({ + mountId: z.string(), +}); + +/** @internal */ +export type MountsRemoveRequest$Outbound = { + mountId: string; +}; + +/** @internal */ +export const MountsRemoveRequest$outboundSchema: z.ZodType< + MountsRemoveRequest$Outbound, + z.ZodTypeDef, + MountsRemoveRequest +> = z.object({ + mountId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MountsRemoveRequest$ { + /** @deprecated use `MountsRemoveRequest$inboundSchema` instead. */ + export const inboundSchema = MountsRemoveRequest$inboundSchema; + /** @deprecated use `MountsRemoveRequest$outboundSchema` instead. */ + export const outboundSchema = MountsRemoveRequest$outboundSchema; + /** @deprecated use `MountsRemoveRequest$Outbound` instead. */ + export type Outbound = MountsRemoveRequest$Outbound; +} + +export function mountsRemoveRequestToJSON( + mountsRemoveRequest: MountsRemoveRequest, +): string { + return JSON.stringify( + MountsRemoveRequest$outboundSchema.parse(mountsRemoveRequest), + ); +} + +export function mountsRemoveRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MountsRemoveRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MountsRemoveRequest' from JSON`, + ); +} diff --git a/src/models/operations/mountsupdate.ts b/src/models/operations/mountsupdate.ts new file mode 100644 index 0000000..7624ac9 --- /dev/null +++ b/src/models/operations/mountsupdate.ts @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const MountsUpdateType = { + Bind: "bind", + Volume: "volume", + File: "file", +} as const; +export type MountsUpdateType = ClosedEnum; + +export const MountsUpdateServiceType = { + Application: "application", + Postgres: "postgres", + Mysql: "mysql", + Mariadb: "mariadb", + Mongo: "mongo", + Redis: "redis", + Compose: "compose", +} as const; +export type MountsUpdateServiceType = ClosedEnum< + typeof MountsUpdateServiceType +>; + +export type MountsUpdateRequest = { + mountId: string; + type?: MountsUpdateType | undefined; + hostPath?: string | null | undefined; + volumeName?: string | null | undefined; + filePath?: string | null | undefined; + content?: string | null | undefined; + serviceType?: MountsUpdateServiceType | undefined; + mountPath?: string | undefined; + applicationId?: string | null | undefined; + postgresId?: string | null | undefined; + mariadbId?: string | null | undefined; + mongoId?: string | null | undefined; + mysqlId?: string | null | undefined; + redisId?: string | null | undefined; + composeId?: string | null | undefined; +}; + +/** @internal */ +export const MountsUpdateType$inboundSchema: z.ZodNativeEnum< + typeof MountsUpdateType +> = z.nativeEnum(MountsUpdateType); + +/** @internal */ +export const MountsUpdateType$outboundSchema: z.ZodNativeEnum< + typeof MountsUpdateType +> = MountsUpdateType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MountsUpdateType$ { + /** @deprecated use `MountsUpdateType$inboundSchema` instead. */ + export const inboundSchema = MountsUpdateType$inboundSchema; + /** @deprecated use `MountsUpdateType$outboundSchema` instead. */ + export const outboundSchema = MountsUpdateType$outboundSchema; +} + +/** @internal */ +export const MountsUpdateServiceType$inboundSchema: z.ZodNativeEnum< + typeof MountsUpdateServiceType +> = z.nativeEnum(MountsUpdateServiceType); + +/** @internal */ +export const MountsUpdateServiceType$outboundSchema: z.ZodNativeEnum< + typeof MountsUpdateServiceType +> = MountsUpdateServiceType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MountsUpdateServiceType$ { + /** @deprecated use `MountsUpdateServiceType$inboundSchema` instead. */ + export const inboundSchema = MountsUpdateServiceType$inboundSchema; + /** @deprecated use `MountsUpdateServiceType$outboundSchema` instead. */ + export const outboundSchema = MountsUpdateServiceType$outboundSchema; +} + +/** @internal */ +export const MountsUpdateRequest$inboundSchema: z.ZodType< + MountsUpdateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + mountId: z.string(), + type: MountsUpdateType$inboundSchema.optional(), + hostPath: z.nullable(z.string()).optional(), + volumeName: z.nullable(z.string()).optional(), + filePath: z.nullable(z.string()).optional(), + content: z.nullable(z.string()).optional(), + serviceType: MountsUpdateServiceType$inboundSchema.default("application"), + mountPath: z.string().optional(), + applicationId: z.nullable(z.string()).optional(), + postgresId: z.nullable(z.string()).optional(), + mariadbId: z.nullable(z.string()).optional(), + mongoId: z.nullable(z.string()).optional(), + mysqlId: z.nullable(z.string()).optional(), + redisId: z.nullable(z.string()).optional(), + composeId: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type MountsUpdateRequest$Outbound = { + mountId: string; + type?: string | undefined; + hostPath?: string | null | undefined; + volumeName?: string | null | undefined; + filePath?: string | null | undefined; + content?: string | null | undefined; + serviceType: string; + mountPath?: string | undefined; + applicationId?: string | null | undefined; + postgresId?: string | null | undefined; + mariadbId?: string | null | undefined; + mongoId?: string | null | undefined; + mysqlId?: string | null | undefined; + redisId?: string | null | undefined; + composeId?: string | null | undefined; +}; + +/** @internal */ +export const MountsUpdateRequest$outboundSchema: z.ZodType< + MountsUpdateRequest$Outbound, + z.ZodTypeDef, + MountsUpdateRequest +> = z.object({ + mountId: z.string(), + type: MountsUpdateType$outboundSchema.optional(), + hostPath: z.nullable(z.string()).optional(), + volumeName: z.nullable(z.string()).optional(), + filePath: z.nullable(z.string()).optional(), + content: z.nullable(z.string()).optional(), + serviceType: MountsUpdateServiceType$outboundSchema.default("application"), + mountPath: z.string().optional(), + applicationId: z.nullable(z.string()).optional(), + postgresId: z.nullable(z.string()).optional(), + mariadbId: z.nullable(z.string()).optional(), + mongoId: z.nullable(z.string()).optional(), + mysqlId: z.nullable(z.string()).optional(), + redisId: z.nullable(z.string()).optional(), + composeId: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MountsUpdateRequest$ { + /** @deprecated use `MountsUpdateRequest$inboundSchema` instead. */ + export const inboundSchema = MountsUpdateRequest$inboundSchema; + /** @deprecated use `MountsUpdateRequest$outboundSchema` instead. */ + export const outboundSchema = MountsUpdateRequest$outboundSchema; + /** @deprecated use `MountsUpdateRequest$Outbound` instead. */ + export type Outbound = MountsUpdateRequest$Outbound; +} + +export function mountsUpdateRequestToJSON( + mountsUpdateRequest: MountsUpdateRequest, +): string { + return JSON.stringify( + MountsUpdateRequest$outboundSchema.parse(mountsUpdateRequest), + ); +} + +export function mountsUpdateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MountsUpdateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MountsUpdateRequest' from JSON`, + ); +} diff --git a/src/models/operations/mysqlchangestatus.ts b/src/models/operations/mysqlchangestatus.ts new file mode 100644 index 0000000..b2fdc9b --- /dev/null +++ b/src/models/operations/mysqlchangestatus.ts @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const MysqlChangeStatusApplicationStatus = { + Idle: "idle", + Running: "running", + Done: "done", + Error: "error", +} as const; +export type MysqlChangeStatusApplicationStatus = ClosedEnum< + typeof MysqlChangeStatusApplicationStatus +>; + +export type MysqlChangeStatusRequest = { + mysqlId: string; + applicationStatus: MysqlChangeStatusApplicationStatus; +}; + +/** @internal */ +export const MysqlChangeStatusApplicationStatus$inboundSchema: z.ZodNativeEnum< + typeof MysqlChangeStatusApplicationStatus +> = z.nativeEnum(MysqlChangeStatusApplicationStatus); + +/** @internal */ +export const MysqlChangeStatusApplicationStatus$outboundSchema: z.ZodNativeEnum< + typeof MysqlChangeStatusApplicationStatus +> = MysqlChangeStatusApplicationStatus$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MysqlChangeStatusApplicationStatus$ { + /** @deprecated use `MysqlChangeStatusApplicationStatus$inboundSchema` instead. */ + export const inboundSchema = MysqlChangeStatusApplicationStatus$inboundSchema; + /** @deprecated use `MysqlChangeStatusApplicationStatus$outboundSchema` instead. */ + export const outboundSchema = + MysqlChangeStatusApplicationStatus$outboundSchema; +} + +/** @internal */ +export const MysqlChangeStatusRequest$inboundSchema: z.ZodType< + MysqlChangeStatusRequest, + z.ZodTypeDef, + unknown +> = z.object({ + mysqlId: z.string(), + applicationStatus: MysqlChangeStatusApplicationStatus$inboundSchema, +}); + +/** @internal */ +export type MysqlChangeStatusRequest$Outbound = { + mysqlId: string; + applicationStatus: string; +}; + +/** @internal */ +export const MysqlChangeStatusRequest$outboundSchema: z.ZodType< + MysqlChangeStatusRequest$Outbound, + z.ZodTypeDef, + MysqlChangeStatusRequest +> = z.object({ + mysqlId: z.string(), + applicationStatus: MysqlChangeStatusApplicationStatus$outboundSchema, +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MysqlChangeStatusRequest$ { + /** @deprecated use `MysqlChangeStatusRequest$inboundSchema` instead. */ + export const inboundSchema = MysqlChangeStatusRequest$inboundSchema; + /** @deprecated use `MysqlChangeStatusRequest$outboundSchema` instead. */ + export const outboundSchema = MysqlChangeStatusRequest$outboundSchema; + /** @deprecated use `MysqlChangeStatusRequest$Outbound` instead. */ + export type Outbound = MysqlChangeStatusRequest$Outbound; +} + +export function mysqlChangeStatusRequestToJSON( + mysqlChangeStatusRequest: MysqlChangeStatusRequest, +): string { + return JSON.stringify( + MysqlChangeStatusRequest$outboundSchema.parse(mysqlChangeStatusRequest), + ); +} + +export function mysqlChangeStatusRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MysqlChangeStatusRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MysqlChangeStatusRequest' from JSON`, + ); +} diff --git a/src/models/operations/mysqlcreate.ts b/src/models/operations/mysqlcreate.ts new file mode 100644 index 0000000..56a7a7c --- /dev/null +++ b/src/models/operations/mysqlcreate.ts @@ -0,0 +1,102 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type MysqlCreateRequest = { + name: string; + appName: string; + dockerImage?: string | undefined; + projectId: string; + description?: string | null | undefined; + databaseName: string; + databaseUser: string; + databasePassword: string; + databaseRootPassword: string; + serverId?: string | null | undefined; +}; + +/** @internal */ +export const MysqlCreateRequest$inboundSchema: z.ZodType< + MysqlCreateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + appName: z.string(), + dockerImage: z.string().default("mysql:8"), + projectId: z.string(), + description: z.nullable(z.string()).optional(), + databaseName: z.string(), + databaseUser: z.string(), + databasePassword: z.string(), + databaseRootPassword: z.string(), + serverId: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type MysqlCreateRequest$Outbound = { + name: string; + appName: string; + dockerImage: string; + projectId: string; + description?: string | null | undefined; + databaseName: string; + databaseUser: string; + databasePassword: string; + databaseRootPassword: string; + serverId?: string | null | undefined; +}; + +/** @internal */ +export const MysqlCreateRequest$outboundSchema: z.ZodType< + MysqlCreateRequest$Outbound, + z.ZodTypeDef, + MysqlCreateRequest +> = z.object({ + name: z.string(), + appName: z.string(), + dockerImage: z.string().default("mysql:8"), + projectId: z.string(), + description: z.nullable(z.string()).optional(), + databaseName: z.string(), + databaseUser: z.string(), + databasePassword: z.string(), + databaseRootPassword: z.string(), + serverId: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MysqlCreateRequest$ { + /** @deprecated use `MysqlCreateRequest$inboundSchema` instead. */ + export const inboundSchema = MysqlCreateRequest$inboundSchema; + /** @deprecated use `MysqlCreateRequest$outboundSchema` instead. */ + export const outboundSchema = MysqlCreateRequest$outboundSchema; + /** @deprecated use `MysqlCreateRequest$Outbound` instead. */ + export type Outbound = MysqlCreateRequest$Outbound; +} + +export function mysqlCreateRequestToJSON( + mysqlCreateRequest: MysqlCreateRequest, +): string { + return JSON.stringify( + MysqlCreateRequest$outboundSchema.parse(mysqlCreateRequest), + ); +} + +export function mysqlCreateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MysqlCreateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MysqlCreateRequest' from JSON`, + ); +} diff --git a/src/models/operations/mysqldeploy.ts b/src/models/operations/mysqldeploy.ts new file mode 100644 index 0000000..707a18f --- /dev/null +++ b/src/models/operations/mysqldeploy.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type MysqlDeployRequest = { + mysqlId: string; +}; + +/** @internal */ +export const MysqlDeployRequest$inboundSchema: z.ZodType< + MysqlDeployRequest, + z.ZodTypeDef, + unknown +> = z.object({ + mysqlId: z.string(), +}); + +/** @internal */ +export type MysqlDeployRequest$Outbound = { + mysqlId: string; +}; + +/** @internal */ +export const MysqlDeployRequest$outboundSchema: z.ZodType< + MysqlDeployRequest$Outbound, + z.ZodTypeDef, + MysqlDeployRequest +> = z.object({ + mysqlId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MysqlDeployRequest$ { + /** @deprecated use `MysqlDeployRequest$inboundSchema` instead. */ + export const inboundSchema = MysqlDeployRequest$inboundSchema; + /** @deprecated use `MysqlDeployRequest$outboundSchema` instead. */ + export const outboundSchema = MysqlDeployRequest$outboundSchema; + /** @deprecated use `MysqlDeployRequest$Outbound` instead. */ + export type Outbound = MysqlDeployRequest$Outbound; +} + +export function mysqlDeployRequestToJSON( + mysqlDeployRequest: MysqlDeployRequest, +): string { + return JSON.stringify( + MysqlDeployRequest$outboundSchema.parse(mysqlDeployRequest), + ); +} + +export function mysqlDeployRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MysqlDeployRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MysqlDeployRequest' from JSON`, + ); +} diff --git a/src/models/operations/mysqlone.ts b/src/models/operations/mysqlone.ts new file mode 100644 index 0000000..1fc866b --- /dev/null +++ b/src/models/operations/mysqlone.ts @@ -0,0 +1,64 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type MysqlOneRequest = { + mysqlId: string; +}; + +/** @internal */ +export const MysqlOneRequest$inboundSchema: z.ZodType< + MysqlOneRequest, + z.ZodTypeDef, + unknown +> = z.object({ + mysqlId: z.string(), +}); + +/** @internal */ +export type MysqlOneRequest$Outbound = { + mysqlId: string; +}; + +/** @internal */ +export const MysqlOneRequest$outboundSchema: z.ZodType< + MysqlOneRequest$Outbound, + z.ZodTypeDef, + MysqlOneRequest +> = z.object({ + mysqlId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MysqlOneRequest$ { + /** @deprecated use `MysqlOneRequest$inboundSchema` instead. */ + export const inboundSchema = MysqlOneRequest$inboundSchema; + /** @deprecated use `MysqlOneRequest$outboundSchema` instead. */ + export const outboundSchema = MysqlOneRequest$outboundSchema; + /** @deprecated use `MysqlOneRequest$Outbound` instead. */ + export type Outbound = MysqlOneRequest$Outbound; +} + +export function mysqlOneRequestToJSON( + mysqlOneRequest: MysqlOneRequest, +): string { + return JSON.stringify(MysqlOneRequest$outboundSchema.parse(mysqlOneRequest)); +} + +export function mysqlOneRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MysqlOneRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MysqlOneRequest' from JSON`, + ); +} diff --git a/src/models/operations/mysqlreload.ts b/src/models/operations/mysqlreload.ts new file mode 100644 index 0000000..e2a789d --- /dev/null +++ b/src/models/operations/mysqlreload.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type MysqlReloadRequest = { + mysqlId: string; + appName: string; +}; + +/** @internal */ +export const MysqlReloadRequest$inboundSchema: z.ZodType< + MysqlReloadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + mysqlId: z.string(), + appName: z.string(), +}); + +/** @internal */ +export type MysqlReloadRequest$Outbound = { + mysqlId: string; + appName: string; +}; + +/** @internal */ +export const MysqlReloadRequest$outboundSchema: z.ZodType< + MysqlReloadRequest$Outbound, + z.ZodTypeDef, + MysqlReloadRequest +> = z.object({ + mysqlId: z.string(), + appName: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MysqlReloadRequest$ { + /** @deprecated use `MysqlReloadRequest$inboundSchema` instead. */ + export const inboundSchema = MysqlReloadRequest$inboundSchema; + /** @deprecated use `MysqlReloadRequest$outboundSchema` instead. */ + export const outboundSchema = MysqlReloadRequest$outboundSchema; + /** @deprecated use `MysqlReloadRequest$Outbound` instead. */ + export type Outbound = MysqlReloadRequest$Outbound; +} + +export function mysqlReloadRequestToJSON( + mysqlReloadRequest: MysqlReloadRequest, +): string { + return JSON.stringify( + MysqlReloadRequest$outboundSchema.parse(mysqlReloadRequest), + ); +} + +export function mysqlReloadRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MysqlReloadRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MysqlReloadRequest' from JSON`, + ); +} diff --git a/src/models/operations/mysqlremove.ts b/src/models/operations/mysqlremove.ts new file mode 100644 index 0000000..e4fda6c --- /dev/null +++ b/src/models/operations/mysqlremove.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type MysqlRemoveRequest = { + mysqlId: string; +}; + +/** @internal */ +export const MysqlRemoveRequest$inboundSchema: z.ZodType< + MysqlRemoveRequest, + z.ZodTypeDef, + unknown +> = z.object({ + mysqlId: z.string(), +}); + +/** @internal */ +export type MysqlRemoveRequest$Outbound = { + mysqlId: string; +}; + +/** @internal */ +export const MysqlRemoveRequest$outboundSchema: z.ZodType< + MysqlRemoveRequest$Outbound, + z.ZodTypeDef, + MysqlRemoveRequest +> = z.object({ + mysqlId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MysqlRemoveRequest$ { + /** @deprecated use `MysqlRemoveRequest$inboundSchema` instead. */ + export const inboundSchema = MysqlRemoveRequest$inboundSchema; + /** @deprecated use `MysqlRemoveRequest$outboundSchema` instead. */ + export const outboundSchema = MysqlRemoveRequest$outboundSchema; + /** @deprecated use `MysqlRemoveRequest$Outbound` instead. */ + export type Outbound = MysqlRemoveRequest$Outbound; +} + +export function mysqlRemoveRequestToJSON( + mysqlRemoveRequest: MysqlRemoveRequest, +): string { + return JSON.stringify( + MysqlRemoveRequest$outboundSchema.parse(mysqlRemoveRequest), + ); +} + +export function mysqlRemoveRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MysqlRemoveRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MysqlRemoveRequest' from JSON`, + ); +} diff --git a/src/models/operations/mysqlsaveenvironment.ts b/src/models/operations/mysqlsaveenvironment.ts new file mode 100644 index 0000000..958d646 --- /dev/null +++ b/src/models/operations/mysqlsaveenvironment.ts @@ -0,0 +1,72 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type MysqlSaveEnvironmentRequest = { + mysqlId: string; + env?: string | null | undefined; +}; + +/** @internal */ +export const MysqlSaveEnvironmentRequest$inboundSchema: z.ZodType< + MysqlSaveEnvironmentRequest, + z.ZodTypeDef, + unknown +> = z.object({ + mysqlId: z.string(), + env: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type MysqlSaveEnvironmentRequest$Outbound = { + mysqlId: string; + env?: string | null | undefined; +}; + +/** @internal */ +export const MysqlSaveEnvironmentRequest$outboundSchema: z.ZodType< + MysqlSaveEnvironmentRequest$Outbound, + z.ZodTypeDef, + MysqlSaveEnvironmentRequest +> = z.object({ + mysqlId: z.string(), + env: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MysqlSaveEnvironmentRequest$ { + /** @deprecated use `MysqlSaveEnvironmentRequest$inboundSchema` instead. */ + export const inboundSchema = MysqlSaveEnvironmentRequest$inboundSchema; + /** @deprecated use `MysqlSaveEnvironmentRequest$outboundSchema` instead. */ + export const outboundSchema = MysqlSaveEnvironmentRequest$outboundSchema; + /** @deprecated use `MysqlSaveEnvironmentRequest$Outbound` instead. */ + export type Outbound = MysqlSaveEnvironmentRequest$Outbound; +} + +export function mysqlSaveEnvironmentRequestToJSON( + mysqlSaveEnvironmentRequest: MysqlSaveEnvironmentRequest, +): string { + return JSON.stringify( + MysqlSaveEnvironmentRequest$outboundSchema.parse( + mysqlSaveEnvironmentRequest, + ), + ); +} + +export function mysqlSaveEnvironmentRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MysqlSaveEnvironmentRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MysqlSaveEnvironmentRequest' from JSON`, + ); +} diff --git a/src/models/operations/mysqlsaveexternalport.ts b/src/models/operations/mysqlsaveexternalport.ts new file mode 100644 index 0000000..675b40e --- /dev/null +++ b/src/models/operations/mysqlsaveexternalport.ts @@ -0,0 +1,72 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type MysqlSaveExternalPortRequest = { + mysqlId: string; + externalPort: number | null; +}; + +/** @internal */ +export const MysqlSaveExternalPortRequest$inboundSchema: z.ZodType< + MysqlSaveExternalPortRequest, + z.ZodTypeDef, + unknown +> = z.object({ + mysqlId: z.string(), + externalPort: z.nullable(z.number()), +}); + +/** @internal */ +export type MysqlSaveExternalPortRequest$Outbound = { + mysqlId: string; + externalPort: number | null; +}; + +/** @internal */ +export const MysqlSaveExternalPortRequest$outboundSchema: z.ZodType< + MysqlSaveExternalPortRequest$Outbound, + z.ZodTypeDef, + MysqlSaveExternalPortRequest +> = z.object({ + mysqlId: z.string(), + externalPort: z.nullable(z.number()), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MysqlSaveExternalPortRequest$ { + /** @deprecated use `MysqlSaveExternalPortRequest$inboundSchema` instead. */ + export const inboundSchema = MysqlSaveExternalPortRequest$inboundSchema; + /** @deprecated use `MysqlSaveExternalPortRequest$outboundSchema` instead. */ + export const outboundSchema = MysqlSaveExternalPortRequest$outboundSchema; + /** @deprecated use `MysqlSaveExternalPortRequest$Outbound` instead. */ + export type Outbound = MysqlSaveExternalPortRequest$Outbound; +} + +export function mysqlSaveExternalPortRequestToJSON( + mysqlSaveExternalPortRequest: MysqlSaveExternalPortRequest, +): string { + return JSON.stringify( + MysqlSaveExternalPortRequest$outboundSchema.parse( + mysqlSaveExternalPortRequest, + ), + ); +} + +export function mysqlSaveExternalPortRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MysqlSaveExternalPortRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MysqlSaveExternalPortRequest' from JSON`, + ); +} diff --git a/src/models/operations/mysqlstart.ts b/src/models/operations/mysqlstart.ts new file mode 100644 index 0000000..03dd60f --- /dev/null +++ b/src/models/operations/mysqlstart.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type MysqlStartRequest = { + mysqlId: string; +}; + +/** @internal */ +export const MysqlStartRequest$inboundSchema: z.ZodType< + MysqlStartRequest, + z.ZodTypeDef, + unknown +> = z.object({ + mysqlId: z.string(), +}); + +/** @internal */ +export type MysqlStartRequest$Outbound = { + mysqlId: string; +}; + +/** @internal */ +export const MysqlStartRequest$outboundSchema: z.ZodType< + MysqlStartRequest$Outbound, + z.ZodTypeDef, + MysqlStartRequest +> = z.object({ + mysqlId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MysqlStartRequest$ { + /** @deprecated use `MysqlStartRequest$inboundSchema` instead. */ + export const inboundSchema = MysqlStartRequest$inboundSchema; + /** @deprecated use `MysqlStartRequest$outboundSchema` instead. */ + export const outboundSchema = MysqlStartRequest$outboundSchema; + /** @deprecated use `MysqlStartRequest$Outbound` instead. */ + export type Outbound = MysqlStartRequest$Outbound; +} + +export function mysqlStartRequestToJSON( + mysqlStartRequest: MysqlStartRequest, +): string { + return JSON.stringify( + MysqlStartRequest$outboundSchema.parse(mysqlStartRequest), + ); +} + +export function mysqlStartRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MysqlStartRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MysqlStartRequest' from JSON`, + ); +} diff --git a/src/models/operations/mysqlstop.ts b/src/models/operations/mysqlstop.ts new file mode 100644 index 0000000..b64beff --- /dev/null +++ b/src/models/operations/mysqlstop.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type MysqlStopRequest = { + mysqlId: string; +}; + +/** @internal */ +export const MysqlStopRequest$inboundSchema: z.ZodType< + MysqlStopRequest, + z.ZodTypeDef, + unknown +> = z.object({ + mysqlId: z.string(), +}); + +/** @internal */ +export type MysqlStopRequest$Outbound = { + mysqlId: string; +}; + +/** @internal */ +export const MysqlStopRequest$outboundSchema: z.ZodType< + MysqlStopRequest$Outbound, + z.ZodTypeDef, + MysqlStopRequest +> = z.object({ + mysqlId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MysqlStopRequest$ { + /** @deprecated use `MysqlStopRequest$inboundSchema` instead. */ + export const inboundSchema = MysqlStopRequest$inboundSchema; + /** @deprecated use `MysqlStopRequest$outboundSchema` instead. */ + export const outboundSchema = MysqlStopRequest$outboundSchema; + /** @deprecated use `MysqlStopRequest$Outbound` instead. */ + export type Outbound = MysqlStopRequest$Outbound; +} + +export function mysqlStopRequestToJSON( + mysqlStopRequest: MysqlStopRequest, +): string { + return JSON.stringify( + MysqlStopRequest$outboundSchema.parse(mysqlStopRequest), + ); +} + +export function mysqlStopRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MysqlStopRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MysqlStopRequest' from JSON`, + ); +} diff --git a/src/models/operations/mysqlupdate.ts b/src/models/operations/mysqlupdate.ts new file mode 100644 index 0000000..446f5d6 --- /dev/null +++ b/src/models/operations/mysqlupdate.ts @@ -0,0 +1,170 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const MysqlUpdateApplicationStatus = { + Idle: "idle", + Running: "running", + Done: "done", + Error: "error", +} as const; +export type MysqlUpdateApplicationStatus = ClosedEnum< + typeof MysqlUpdateApplicationStatus +>; + +export type MysqlUpdateRequest = { + mysqlId: string; + name?: string | undefined; + appName?: string | undefined; + description?: string | null | undefined; + databaseName?: string | undefined; + databaseUser?: string | undefined; + databasePassword?: string | undefined; + databaseRootPassword?: string | undefined; + dockerImage?: string | undefined; + command?: string | null | undefined; + env?: string | null | undefined; + memoryReservation?: number | null | undefined; + memoryLimit?: number | null | undefined; + cpuReservation?: number | null | undefined; + cpuLimit?: number | null | undefined; + externalPort?: number | null | undefined; + applicationStatus?: MysqlUpdateApplicationStatus | undefined; + createdAt?: string | undefined; + projectId?: string | undefined; +}; + +/** @internal */ +export const MysqlUpdateApplicationStatus$inboundSchema: z.ZodNativeEnum< + typeof MysqlUpdateApplicationStatus +> = z.nativeEnum(MysqlUpdateApplicationStatus); + +/** @internal */ +export const MysqlUpdateApplicationStatus$outboundSchema: z.ZodNativeEnum< + typeof MysqlUpdateApplicationStatus +> = MysqlUpdateApplicationStatus$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MysqlUpdateApplicationStatus$ { + /** @deprecated use `MysqlUpdateApplicationStatus$inboundSchema` instead. */ + export const inboundSchema = MysqlUpdateApplicationStatus$inboundSchema; + /** @deprecated use `MysqlUpdateApplicationStatus$outboundSchema` instead. */ + export const outboundSchema = MysqlUpdateApplicationStatus$outboundSchema; +} + +/** @internal */ +export const MysqlUpdateRequest$inboundSchema: z.ZodType< + MysqlUpdateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + mysqlId: z.string(), + name: z.string().optional(), + appName: z.string().optional(), + description: z.nullable(z.string()).optional(), + databaseName: z.string().optional(), + databaseUser: z.string().optional(), + databasePassword: z.string().optional(), + databaseRootPassword: z.string().optional(), + dockerImage: z.string().default("mysql:8"), + command: z.nullable(z.string()).optional(), + env: z.nullable(z.string()).optional(), + memoryReservation: z.nullable(z.number()).optional(), + memoryLimit: z.nullable(z.number()).optional(), + cpuReservation: z.nullable(z.number()).optional(), + cpuLimit: z.nullable(z.number()).optional(), + externalPort: z.nullable(z.number()).optional(), + applicationStatus: MysqlUpdateApplicationStatus$inboundSchema.optional(), + createdAt: z.string().optional(), + projectId: z.string().optional(), +}); + +/** @internal */ +export type MysqlUpdateRequest$Outbound = { + mysqlId: string; + name?: string | undefined; + appName?: string | undefined; + description?: string | null | undefined; + databaseName?: string | undefined; + databaseUser?: string | undefined; + databasePassword?: string | undefined; + databaseRootPassword?: string | undefined; + dockerImage: string; + command?: string | null | undefined; + env?: string | null | undefined; + memoryReservation?: number | null | undefined; + memoryLimit?: number | null | undefined; + cpuReservation?: number | null | undefined; + cpuLimit?: number | null | undefined; + externalPort?: number | null | undefined; + applicationStatus?: string | undefined; + createdAt?: string | undefined; + projectId?: string | undefined; +}; + +/** @internal */ +export const MysqlUpdateRequest$outboundSchema: z.ZodType< + MysqlUpdateRequest$Outbound, + z.ZodTypeDef, + MysqlUpdateRequest +> = z.object({ + mysqlId: z.string(), + name: z.string().optional(), + appName: z.string().optional(), + description: z.nullable(z.string()).optional(), + databaseName: z.string().optional(), + databaseUser: z.string().optional(), + databasePassword: z.string().optional(), + databaseRootPassword: z.string().optional(), + dockerImage: z.string().default("mysql:8"), + command: z.nullable(z.string()).optional(), + env: z.nullable(z.string()).optional(), + memoryReservation: z.nullable(z.number()).optional(), + memoryLimit: z.nullable(z.number()).optional(), + cpuReservation: z.nullable(z.number()).optional(), + cpuLimit: z.nullable(z.number()).optional(), + externalPort: z.nullable(z.number()).optional(), + applicationStatus: MysqlUpdateApplicationStatus$outboundSchema.optional(), + createdAt: z.string().optional(), + projectId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MysqlUpdateRequest$ { + /** @deprecated use `MysqlUpdateRequest$inboundSchema` instead. */ + export const inboundSchema = MysqlUpdateRequest$inboundSchema; + /** @deprecated use `MysqlUpdateRequest$outboundSchema` instead. */ + export const outboundSchema = MysqlUpdateRequest$outboundSchema; + /** @deprecated use `MysqlUpdateRequest$Outbound` instead. */ + export type Outbound = MysqlUpdateRequest$Outbound; +} + +export function mysqlUpdateRequestToJSON( + mysqlUpdateRequest: MysqlUpdateRequest, +): string { + return JSON.stringify( + MysqlUpdateRequest$outboundSchema.parse(mysqlUpdateRequest), + ); +} + +export function mysqlUpdateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MysqlUpdateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MysqlUpdateRequest' from JSON`, + ); +} diff --git a/src/models/operations/notificationcreatediscord.ts b/src/models/operations/notificationcreatediscord.ts new file mode 100644 index 0000000..fa4d452 --- /dev/null +++ b/src/models/operations/notificationcreatediscord.ts @@ -0,0 +1,92 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NotificationCreateDiscordRequest = { + appBuildError: boolean; + databaseBackup: boolean; + dokployRestart: boolean; + name: string; + appDeploy: boolean; + dockerCleanup: boolean; + webhookUrl: string; +}; + +/** @internal */ +export const NotificationCreateDiscordRequest$inboundSchema: z.ZodType< + NotificationCreateDiscordRequest, + z.ZodTypeDef, + unknown +> = z.object({ + appBuildError: z.boolean(), + databaseBackup: z.boolean(), + dokployRestart: z.boolean(), + name: z.string(), + appDeploy: z.boolean(), + dockerCleanup: z.boolean(), + webhookUrl: z.string(), +}); + +/** @internal */ +export type NotificationCreateDiscordRequest$Outbound = { + appBuildError: boolean; + databaseBackup: boolean; + dokployRestart: boolean; + name: string; + appDeploy: boolean; + dockerCleanup: boolean; + webhookUrl: string; +}; + +/** @internal */ +export const NotificationCreateDiscordRequest$outboundSchema: z.ZodType< + NotificationCreateDiscordRequest$Outbound, + z.ZodTypeDef, + NotificationCreateDiscordRequest +> = z.object({ + appBuildError: z.boolean(), + databaseBackup: z.boolean(), + dokployRestart: z.boolean(), + name: z.string(), + appDeploy: z.boolean(), + dockerCleanup: z.boolean(), + webhookUrl: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NotificationCreateDiscordRequest$ { + /** @deprecated use `NotificationCreateDiscordRequest$inboundSchema` instead. */ + export const inboundSchema = NotificationCreateDiscordRequest$inboundSchema; + /** @deprecated use `NotificationCreateDiscordRequest$outboundSchema` instead. */ + export const outboundSchema = NotificationCreateDiscordRequest$outboundSchema; + /** @deprecated use `NotificationCreateDiscordRequest$Outbound` instead. */ + export type Outbound = NotificationCreateDiscordRequest$Outbound; +} + +export function notificationCreateDiscordRequestToJSON( + notificationCreateDiscordRequest: NotificationCreateDiscordRequest, +): string { + return JSON.stringify( + NotificationCreateDiscordRequest$outboundSchema.parse( + notificationCreateDiscordRequest, + ), + ); +} + +export function notificationCreateDiscordRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NotificationCreateDiscordRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NotificationCreateDiscordRequest' from JSON`, + ); +} diff --git a/src/models/operations/notificationcreateemail.ts b/src/models/operations/notificationcreateemail.ts new file mode 100644 index 0000000..0088ca4 --- /dev/null +++ b/src/models/operations/notificationcreateemail.ts @@ -0,0 +1,112 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NotificationCreateEmailRequest = { + appBuildError: boolean; + databaseBackup: boolean; + dokployRestart: boolean; + name: string; + appDeploy: boolean; + dockerCleanup: boolean; + smtpServer: string; + smtpPort: number; + username: string; + password: string; + fromAddress: string; + toAddresses: Array; +}; + +/** @internal */ +export const NotificationCreateEmailRequest$inboundSchema: z.ZodType< + NotificationCreateEmailRequest, + z.ZodTypeDef, + unknown +> = z.object({ + appBuildError: z.boolean(), + databaseBackup: z.boolean(), + dokployRestart: z.boolean(), + name: z.string(), + appDeploy: z.boolean(), + dockerCleanup: z.boolean(), + smtpServer: z.string(), + smtpPort: z.number(), + username: z.string(), + password: z.string(), + fromAddress: z.string(), + toAddresses: z.array(z.string()), +}); + +/** @internal */ +export type NotificationCreateEmailRequest$Outbound = { + appBuildError: boolean; + databaseBackup: boolean; + dokployRestart: boolean; + name: string; + appDeploy: boolean; + dockerCleanup: boolean; + smtpServer: string; + smtpPort: number; + username: string; + password: string; + fromAddress: string; + toAddresses: Array; +}; + +/** @internal */ +export const NotificationCreateEmailRequest$outboundSchema: z.ZodType< + NotificationCreateEmailRequest$Outbound, + z.ZodTypeDef, + NotificationCreateEmailRequest +> = z.object({ + appBuildError: z.boolean(), + databaseBackup: z.boolean(), + dokployRestart: z.boolean(), + name: z.string(), + appDeploy: z.boolean(), + dockerCleanup: z.boolean(), + smtpServer: z.string(), + smtpPort: z.number(), + username: z.string(), + password: z.string(), + fromAddress: z.string(), + toAddresses: z.array(z.string()), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NotificationCreateEmailRequest$ { + /** @deprecated use `NotificationCreateEmailRequest$inboundSchema` instead. */ + export const inboundSchema = NotificationCreateEmailRequest$inboundSchema; + /** @deprecated use `NotificationCreateEmailRequest$outboundSchema` instead. */ + export const outboundSchema = NotificationCreateEmailRequest$outboundSchema; + /** @deprecated use `NotificationCreateEmailRequest$Outbound` instead. */ + export type Outbound = NotificationCreateEmailRequest$Outbound; +} + +export function notificationCreateEmailRequestToJSON( + notificationCreateEmailRequest: NotificationCreateEmailRequest, +): string { + return JSON.stringify( + NotificationCreateEmailRequest$outboundSchema.parse( + notificationCreateEmailRequest, + ), + ); +} + +export function notificationCreateEmailRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NotificationCreateEmailRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NotificationCreateEmailRequest' from JSON`, + ); +} diff --git a/src/models/operations/notificationcreateslack.ts b/src/models/operations/notificationcreateslack.ts new file mode 100644 index 0000000..153c8ed --- /dev/null +++ b/src/models/operations/notificationcreateslack.ts @@ -0,0 +1,96 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NotificationCreateSlackRequest = { + appBuildError: boolean; + databaseBackup: boolean; + dokployRestart: boolean; + name: string; + appDeploy: boolean; + dockerCleanup: boolean; + webhookUrl: string; + channel: string; +}; + +/** @internal */ +export const NotificationCreateSlackRequest$inboundSchema: z.ZodType< + NotificationCreateSlackRequest, + z.ZodTypeDef, + unknown +> = z.object({ + appBuildError: z.boolean(), + databaseBackup: z.boolean(), + dokployRestart: z.boolean(), + name: z.string(), + appDeploy: z.boolean(), + dockerCleanup: z.boolean(), + webhookUrl: z.string(), + channel: z.string(), +}); + +/** @internal */ +export type NotificationCreateSlackRequest$Outbound = { + appBuildError: boolean; + databaseBackup: boolean; + dokployRestart: boolean; + name: string; + appDeploy: boolean; + dockerCleanup: boolean; + webhookUrl: string; + channel: string; +}; + +/** @internal */ +export const NotificationCreateSlackRequest$outboundSchema: z.ZodType< + NotificationCreateSlackRequest$Outbound, + z.ZodTypeDef, + NotificationCreateSlackRequest +> = z.object({ + appBuildError: z.boolean(), + databaseBackup: z.boolean(), + dokployRestart: z.boolean(), + name: z.string(), + appDeploy: z.boolean(), + dockerCleanup: z.boolean(), + webhookUrl: z.string(), + channel: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NotificationCreateSlackRequest$ { + /** @deprecated use `NotificationCreateSlackRequest$inboundSchema` instead. */ + export const inboundSchema = NotificationCreateSlackRequest$inboundSchema; + /** @deprecated use `NotificationCreateSlackRequest$outboundSchema` instead. */ + export const outboundSchema = NotificationCreateSlackRequest$outboundSchema; + /** @deprecated use `NotificationCreateSlackRequest$Outbound` instead. */ + export type Outbound = NotificationCreateSlackRequest$Outbound; +} + +export function notificationCreateSlackRequestToJSON( + notificationCreateSlackRequest: NotificationCreateSlackRequest, +): string { + return JSON.stringify( + NotificationCreateSlackRequest$outboundSchema.parse( + notificationCreateSlackRequest, + ), + ); +} + +export function notificationCreateSlackRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NotificationCreateSlackRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NotificationCreateSlackRequest' from JSON`, + ); +} diff --git a/src/models/operations/notificationcreatetelegram.ts b/src/models/operations/notificationcreatetelegram.ts new file mode 100644 index 0000000..1b7a650 --- /dev/null +++ b/src/models/operations/notificationcreatetelegram.ts @@ -0,0 +1,97 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NotificationCreateTelegramRequest = { + appBuildError: boolean; + databaseBackup: boolean; + dokployRestart: boolean; + name: string; + appDeploy: boolean; + dockerCleanup: boolean; + botToken: string; + chatId: string; +}; + +/** @internal */ +export const NotificationCreateTelegramRequest$inboundSchema: z.ZodType< + NotificationCreateTelegramRequest, + z.ZodTypeDef, + unknown +> = z.object({ + appBuildError: z.boolean(), + databaseBackup: z.boolean(), + dokployRestart: z.boolean(), + name: z.string(), + appDeploy: z.boolean(), + dockerCleanup: z.boolean(), + botToken: z.string(), + chatId: z.string(), +}); + +/** @internal */ +export type NotificationCreateTelegramRequest$Outbound = { + appBuildError: boolean; + databaseBackup: boolean; + dokployRestart: boolean; + name: string; + appDeploy: boolean; + dockerCleanup: boolean; + botToken: string; + chatId: string; +}; + +/** @internal */ +export const NotificationCreateTelegramRequest$outboundSchema: z.ZodType< + NotificationCreateTelegramRequest$Outbound, + z.ZodTypeDef, + NotificationCreateTelegramRequest +> = z.object({ + appBuildError: z.boolean(), + databaseBackup: z.boolean(), + dokployRestart: z.boolean(), + name: z.string(), + appDeploy: z.boolean(), + dockerCleanup: z.boolean(), + botToken: z.string(), + chatId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NotificationCreateTelegramRequest$ { + /** @deprecated use `NotificationCreateTelegramRequest$inboundSchema` instead. */ + export const inboundSchema = NotificationCreateTelegramRequest$inboundSchema; + /** @deprecated use `NotificationCreateTelegramRequest$outboundSchema` instead. */ + export const outboundSchema = + NotificationCreateTelegramRequest$outboundSchema; + /** @deprecated use `NotificationCreateTelegramRequest$Outbound` instead. */ + export type Outbound = NotificationCreateTelegramRequest$Outbound; +} + +export function notificationCreateTelegramRequestToJSON( + notificationCreateTelegramRequest: NotificationCreateTelegramRequest, +): string { + return JSON.stringify( + NotificationCreateTelegramRequest$outboundSchema.parse( + notificationCreateTelegramRequest, + ), + ); +} + +export function notificationCreateTelegramRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NotificationCreateTelegramRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NotificationCreateTelegramRequest' from JSON`, + ); +} diff --git a/src/models/operations/notificationone.ts b/src/models/operations/notificationone.ts new file mode 100644 index 0000000..f6c52c1 --- /dev/null +++ b/src/models/operations/notificationone.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NotificationOneRequest = { + notificationId: string; +}; + +/** @internal */ +export const NotificationOneRequest$inboundSchema: z.ZodType< + NotificationOneRequest, + z.ZodTypeDef, + unknown +> = z.object({ + notificationId: z.string(), +}); + +/** @internal */ +export type NotificationOneRequest$Outbound = { + notificationId: string; +}; + +/** @internal */ +export const NotificationOneRequest$outboundSchema: z.ZodType< + NotificationOneRequest$Outbound, + z.ZodTypeDef, + NotificationOneRequest +> = z.object({ + notificationId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NotificationOneRequest$ { + /** @deprecated use `NotificationOneRequest$inboundSchema` instead. */ + export const inboundSchema = NotificationOneRequest$inboundSchema; + /** @deprecated use `NotificationOneRequest$outboundSchema` instead. */ + export const outboundSchema = NotificationOneRequest$outboundSchema; + /** @deprecated use `NotificationOneRequest$Outbound` instead. */ + export type Outbound = NotificationOneRequest$Outbound; +} + +export function notificationOneRequestToJSON( + notificationOneRequest: NotificationOneRequest, +): string { + return JSON.stringify( + NotificationOneRequest$outboundSchema.parse(notificationOneRequest), + ); +} + +export function notificationOneRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NotificationOneRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NotificationOneRequest' from JSON`, + ); +} diff --git a/src/models/operations/notificationremove.ts b/src/models/operations/notificationremove.ts new file mode 100644 index 0000000..4aa3746 --- /dev/null +++ b/src/models/operations/notificationremove.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NotificationRemoveRequest = { + notificationId: string; +}; + +/** @internal */ +export const NotificationRemoveRequest$inboundSchema: z.ZodType< + NotificationRemoveRequest, + z.ZodTypeDef, + unknown +> = z.object({ + notificationId: z.string(), +}); + +/** @internal */ +export type NotificationRemoveRequest$Outbound = { + notificationId: string; +}; + +/** @internal */ +export const NotificationRemoveRequest$outboundSchema: z.ZodType< + NotificationRemoveRequest$Outbound, + z.ZodTypeDef, + NotificationRemoveRequest +> = z.object({ + notificationId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NotificationRemoveRequest$ { + /** @deprecated use `NotificationRemoveRequest$inboundSchema` instead. */ + export const inboundSchema = NotificationRemoveRequest$inboundSchema; + /** @deprecated use `NotificationRemoveRequest$outboundSchema` instead. */ + export const outboundSchema = NotificationRemoveRequest$outboundSchema; + /** @deprecated use `NotificationRemoveRequest$Outbound` instead. */ + export type Outbound = NotificationRemoveRequest$Outbound; +} + +export function notificationRemoveRequestToJSON( + notificationRemoveRequest: NotificationRemoveRequest, +): string { + return JSON.stringify( + NotificationRemoveRequest$outboundSchema.parse(notificationRemoveRequest), + ); +} + +export function notificationRemoveRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NotificationRemoveRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NotificationRemoveRequest' from JSON`, + ); +} diff --git a/src/models/operations/notificationtestdiscordconnection.ts b/src/models/operations/notificationtestdiscordconnection.ts new file mode 100644 index 0000000..35a26a2 --- /dev/null +++ b/src/models/operations/notificationtestdiscordconnection.ts @@ -0,0 +1,77 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NotificationTestDiscordConnectionRequest = { + webhookUrl: string; +}; + +/** @internal */ +export const NotificationTestDiscordConnectionRequest$inboundSchema: z.ZodType< + NotificationTestDiscordConnectionRequest, + z.ZodTypeDef, + unknown +> = z.object({ + webhookUrl: z.string(), +}); + +/** @internal */ +export type NotificationTestDiscordConnectionRequest$Outbound = { + webhookUrl: string; +}; + +/** @internal */ +export const NotificationTestDiscordConnectionRequest$outboundSchema: z.ZodType< + NotificationTestDiscordConnectionRequest$Outbound, + z.ZodTypeDef, + NotificationTestDiscordConnectionRequest +> = z.object({ + webhookUrl: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NotificationTestDiscordConnectionRequest$ { + /** @deprecated use `NotificationTestDiscordConnectionRequest$inboundSchema` instead. */ + export const inboundSchema = + NotificationTestDiscordConnectionRequest$inboundSchema; + /** @deprecated use `NotificationTestDiscordConnectionRequest$outboundSchema` instead. */ + export const outboundSchema = + NotificationTestDiscordConnectionRequest$outboundSchema; + /** @deprecated use `NotificationTestDiscordConnectionRequest$Outbound` instead. */ + export type Outbound = NotificationTestDiscordConnectionRequest$Outbound; +} + +export function notificationTestDiscordConnectionRequestToJSON( + notificationTestDiscordConnectionRequest: + NotificationTestDiscordConnectionRequest, +): string { + return JSON.stringify( + NotificationTestDiscordConnectionRequest$outboundSchema.parse( + notificationTestDiscordConnectionRequest, + ), + ); +} + +export function notificationTestDiscordConnectionRequestFromJSON( + jsonString: string, +): SafeParseResult< + NotificationTestDiscordConnectionRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NotificationTestDiscordConnectionRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'NotificationTestDiscordConnectionRequest' from JSON`, + ); +} diff --git a/src/models/operations/notificationtestemailconnection.ts b/src/models/operations/notificationtestemailconnection.ts new file mode 100644 index 0000000..b644d26 --- /dev/null +++ b/src/models/operations/notificationtestemailconnection.ts @@ -0,0 +1,92 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NotificationTestEmailConnectionRequest = { + smtpServer: string; + smtpPort: number; + username: string; + password: string; + toAddresses: Array; + fromAddress: string; +}; + +/** @internal */ +export const NotificationTestEmailConnectionRequest$inboundSchema: z.ZodType< + NotificationTestEmailConnectionRequest, + z.ZodTypeDef, + unknown +> = z.object({ + smtpServer: z.string(), + smtpPort: z.number(), + username: z.string(), + password: z.string(), + toAddresses: z.array(z.string()), + fromAddress: z.string(), +}); + +/** @internal */ +export type NotificationTestEmailConnectionRequest$Outbound = { + smtpServer: string; + smtpPort: number; + username: string; + password: string; + toAddresses: Array; + fromAddress: string; +}; + +/** @internal */ +export const NotificationTestEmailConnectionRequest$outboundSchema: z.ZodType< + NotificationTestEmailConnectionRequest$Outbound, + z.ZodTypeDef, + NotificationTestEmailConnectionRequest +> = z.object({ + smtpServer: z.string(), + smtpPort: z.number(), + username: z.string(), + password: z.string(), + toAddresses: z.array(z.string()), + fromAddress: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NotificationTestEmailConnectionRequest$ { + /** @deprecated use `NotificationTestEmailConnectionRequest$inboundSchema` instead. */ + export const inboundSchema = + NotificationTestEmailConnectionRequest$inboundSchema; + /** @deprecated use `NotificationTestEmailConnectionRequest$outboundSchema` instead. */ + export const outboundSchema = + NotificationTestEmailConnectionRequest$outboundSchema; + /** @deprecated use `NotificationTestEmailConnectionRequest$Outbound` instead. */ + export type Outbound = NotificationTestEmailConnectionRequest$Outbound; +} + +export function notificationTestEmailConnectionRequestToJSON( + notificationTestEmailConnectionRequest: + NotificationTestEmailConnectionRequest, +): string { + return JSON.stringify( + NotificationTestEmailConnectionRequest$outboundSchema.parse( + notificationTestEmailConnectionRequest, + ), + ); +} + +export function notificationTestEmailConnectionRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + NotificationTestEmailConnectionRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NotificationTestEmailConnectionRequest' from JSON`, + ); +} diff --git a/src/models/operations/notificationtestslackconnection.ts b/src/models/operations/notificationtestslackconnection.ts new file mode 100644 index 0000000..cf7faa8 --- /dev/null +++ b/src/models/operations/notificationtestslackconnection.ts @@ -0,0 +1,76 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NotificationTestSlackConnectionRequest = { + webhookUrl: string; + channel: string; +}; + +/** @internal */ +export const NotificationTestSlackConnectionRequest$inboundSchema: z.ZodType< + NotificationTestSlackConnectionRequest, + z.ZodTypeDef, + unknown +> = z.object({ + webhookUrl: z.string(), + channel: z.string(), +}); + +/** @internal */ +export type NotificationTestSlackConnectionRequest$Outbound = { + webhookUrl: string; + channel: string; +}; + +/** @internal */ +export const NotificationTestSlackConnectionRequest$outboundSchema: z.ZodType< + NotificationTestSlackConnectionRequest$Outbound, + z.ZodTypeDef, + NotificationTestSlackConnectionRequest +> = z.object({ + webhookUrl: z.string(), + channel: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NotificationTestSlackConnectionRequest$ { + /** @deprecated use `NotificationTestSlackConnectionRequest$inboundSchema` instead. */ + export const inboundSchema = + NotificationTestSlackConnectionRequest$inboundSchema; + /** @deprecated use `NotificationTestSlackConnectionRequest$outboundSchema` instead. */ + export const outboundSchema = + NotificationTestSlackConnectionRequest$outboundSchema; + /** @deprecated use `NotificationTestSlackConnectionRequest$Outbound` instead. */ + export type Outbound = NotificationTestSlackConnectionRequest$Outbound; +} + +export function notificationTestSlackConnectionRequestToJSON( + notificationTestSlackConnectionRequest: + NotificationTestSlackConnectionRequest, +): string { + return JSON.stringify( + NotificationTestSlackConnectionRequest$outboundSchema.parse( + notificationTestSlackConnectionRequest, + ), + ); +} + +export function notificationTestSlackConnectionRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + NotificationTestSlackConnectionRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NotificationTestSlackConnectionRequest' from JSON`, + ); +} diff --git a/src/models/operations/notificationtesttelegramconnection.ts b/src/models/operations/notificationtesttelegramconnection.ts new file mode 100644 index 0000000..917a771 --- /dev/null +++ b/src/models/operations/notificationtesttelegramconnection.ts @@ -0,0 +1,82 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NotificationTestTelegramConnectionRequest = { + botToken: string; + chatId: string; +}; + +/** @internal */ +export const NotificationTestTelegramConnectionRequest$inboundSchema: z.ZodType< + NotificationTestTelegramConnectionRequest, + z.ZodTypeDef, + unknown +> = z.object({ + botToken: z.string(), + chatId: z.string(), +}); + +/** @internal */ +export type NotificationTestTelegramConnectionRequest$Outbound = { + botToken: string; + chatId: string; +}; + +/** @internal */ +export const NotificationTestTelegramConnectionRequest$outboundSchema: + z.ZodType< + NotificationTestTelegramConnectionRequest$Outbound, + z.ZodTypeDef, + NotificationTestTelegramConnectionRequest + > = z.object({ + botToken: z.string(), + chatId: z.string(), + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NotificationTestTelegramConnectionRequest$ { + /** @deprecated use `NotificationTestTelegramConnectionRequest$inboundSchema` instead. */ + export const inboundSchema = + NotificationTestTelegramConnectionRequest$inboundSchema; + /** @deprecated use `NotificationTestTelegramConnectionRequest$outboundSchema` instead. */ + export const outboundSchema = + NotificationTestTelegramConnectionRequest$outboundSchema; + /** @deprecated use `NotificationTestTelegramConnectionRequest$Outbound` instead. */ + export type Outbound = NotificationTestTelegramConnectionRequest$Outbound; +} + +export function notificationTestTelegramConnectionRequestToJSON( + notificationTestTelegramConnectionRequest: + NotificationTestTelegramConnectionRequest, +): string { + return JSON.stringify( + NotificationTestTelegramConnectionRequest$outboundSchema.parse( + notificationTestTelegramConnectionRequest, + ), + ); +} + +export function notificationTestTelegramConnectionRequestFromJSON( + jsonString: string, +): SafeParseResult< + NotificationTestTelegramConnectionRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NotificationTestTelegramConnectionRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'NotificationTestTelegramConnectionRequest' from JSON`, + ); +} diff --git a/src/models/operations/notificationupdatediscord.ts b/src/models/operations/notificationupdatediscord.ts new file mode 100644 index 0000000..f64656b --- /dev/null +++ b/src/models/operations/notificationupdatediscord.ts @@ -0,0 +1,104 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NotificationUpdateDiscordRequest = { + appBuildError?: boolean | undefined; + databaseBackup?: boolean | undefined; + dokployRestart?: boolean | undefined; + name?: string | undefined; + appDeploy?: boolean | undefined; + dockerCleanup?: boolean | undefined; + webhookUrl?: string | undefined; + notificationId: string; + discordId: string; + adminId?: string | undefined; +}; + +/** @internal */ +export const NotificationUpdateDiscordRequest$inboundSchema: z.ZodType< + NotificationUpdateDiscordRequest, + z.ZodTypeDef, + unknown +> = z.object({ + appBuildError: z.boolean().optional(), + databaseBackup: z.boolean().optional(), + dokployRestart: z.boolean().optional(), + name: z.string().optional(), + appDeploy: z.boolean().optional(), + dockerCleanup: z.boolean().optional(), + webhookUrl: z.string().optional(), + notificationId: z.string(), + discordId: z.string(), + adminId: z.string().optional(), +}); + +/** @internal */ +export type NotificationUpdateDiscordRequest$Outbound = { + appBuildError?: boolean | undefined; + databaseBackup?: boolean | undefined; + dokployRestart?: boolean | undefined; + name?: string | undefined; + appDeploy?: boolean | undefined; + dockerCleanup?: boolean | undefined; + webhookUrl?: string | undefined; + notificationId: string; + discordId: string; + adminId?: string | undefined; +}; + +/** @internal */ +export const NotificationUpdateDiscordRequest$outboundSchema: z.ZodType< + NotificationUpdateDiscordRequest$Outbound, + z.ZodTypeDef, + NotificationUpdateDiscordRequest +> = z.object({ + appBuildError: z.boolean().optional(), + databaseBackup: z.boolean().optional(), + dokployRestart: z.boolean().optional(), + name: z.string().optional(), + appDeploy: z.boolean().optional(), + dockerCleanup: z.boolean().optional(), + webhookUrl: z.string().optional(), + notificationId: z.string(), + discordId: z.string(), + adminId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NotificationUpdateDiscordRequest$ { + /** @deprecated use `NotificationUpdateDiscordRequest$inboundSchema` instead. */ + export const inboundSchema = NotificationUpdateDiscordRequest$inboundSchema; + /** @deprecated use `NotificationUpdateDiscordRequest$outboundSchema` instead. */ + export const outboundSchema = NotificationUpdateDiscordRequest$outboundSchema; + /** @deprecated use `NotificationUpdateDiscordRequest$Outbound` instead. */ + export type Outbound = NotificationUpdateDiscordRequest$Outbound; +} + +export function notificationUpdateDiscordRequestToJSON( + notificationUpdateDiscordRequest: NotificationUpdateDiscordRequest, +): string { + return JSON.stringify( + NotificationUpdateDiscordRequest$outboundSchema.parse( + notificationUpdateDiscordRequest, + ), + ); +} + +export function notificationUpdateDiscordRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NotificationUpdateDiscordRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NotificationUpdateDiscordRequest' from JSON`, + ); +} diff --git a/src/models/operations/notificationupdateemail.ts b/src/models/operations/notificationupdateemail.ts new file mode 100644 index 0000000..c1aa077 --- /dev/null +++ b/src/models/operations/notificationupdateemail.ts @@ -0,0 +1,124 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NotificationUpdateEmailRequest = { + appBuildError?: boolean | undefined; + databaseBackup?: boolean | undefined; + dokployRestart?: boolean | undefined; + name?: string | undefined; + appDeploy?: boolean | undefined; + dockerCleanup?: boolean | undefined; + smtpServer?: string | undefined; + smtpPort?: number | undefined; + username?: string | undefined; + password?: string | undefined; + fromAddress?: string | undefined; + toAddresses?: Array | undefined; + notificationId: string; + emailId: string; + adminId?: string | undefined; +}; + +/** @internal */ +export const NotificationUpdateEmailRequest$inboundSchema: z.ZodType< + NotificationUpdateEmailRequest, + z.ZodTypeDef, + unknown +> = z.object({ + appBuildError: z.boolean().optional(), + databaseBackup: z.boolean().optional(), + dokployRestart: z.boolean().optional(), + name: z.string().optional(), + appDeploy: z.boolean().optional(), + dockerCleanup: z.boolean().optional(), + smtpServer: z.string().optional(), + smtpPort: z.number().optional(), + username: z.string().optional(), + password: z.string().optional(), + fromAddress: z.string().optional(), + toAddresses: z.array(z.string()).optional(), + notificationId: z.string(), + emailId: z.string(), + adminId: z.string().optional(), +}); + +/** @internal */ +export type NotificationUpdateEmailRequest$Outbound = { + appBuildError?: boolean | undefined; + databaseBackup?: boolean | undefined; + dokployRestart?: boolean | undefined; + name?: string | undefined; + appDeploy?: boolean | undefined; + dockerCleanup?: boolean | undefined; + smtpServer?: string | undefined; + smtpPort?: number | undefined; + username?: string | undefined; + password?: string | undefined; + fromAddress?: string | undefined; + toAddresses?: Array | undefined; + notificationId: string; + emailId: string; + adminId?: string | undefined; +}; + +/** @internal */ +export const NotificationUpdateEmailRequest$outboundSchema: z.ZodType< + NotificationUpdateEmailRequest$Outbound, + z.ZodTypeDef, + NotificationUpdateEmailRequest +> = z.object({ + appBuildError: z.boolean().optional(), + databaseBackup: z.boolean().optional(), + dokployRestart: z.boolean().optional(), + name: z.string().optional(), + appDeploy: z.boolean().optional(), + dockerCleanup: z.boolean().optional(), + smtpServer: z.string().optional(), + smtpPort: z.number().optional(), + username: z.string().optional(), + password: z.string().optional(), + fromAddress: z.string().optional(), + toAddresses: z.array(z.string()).optional(), + notificationId: z.string(), + emailId: z.string(), + adminId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NotificationUpdateEmailRequest$ { + /** @deprecated use `NotificationUpdateEmailRequest$inboundSchema` instead. */ + export const inboundSchema = NotificationUpdateEmailRequest$inboundSchema; + /** @deprecated use `NotificationUpdateEmailRequest$outboundSchema` instead. */ + export const outboundSchema = NotificationUpdateEmailRequest$outboundSchema; + /** @deprecated use `NotificationUpdateEmailRequest$Outbound` instead. */ + export type Outbound = NotificationUpdateEmailRequest$Outbound; +} + +export function notificationUpdateEmailRequestToJSON( + notificationUpdateEmailRequest: NotificationUpdateEmailRequest, +): string { + return JSON.stringify( + NotificationUpdateEmailRequest$outboundSchema.parse( + notificationUpdateEmailRequest, + ), + ); +} + +export function notificationUpdateEmailRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NotificationUpdateEmailRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NotificationUpdateEmailRequest' from JSON`, + ); +} diff --git a/src/models/operations/notificationupdateslack.ts b/src/models/operations/notificationupdateslack.ts new file mode 100644 index 0000000..b295025 --- /dev/null +++ b/src/models/operations/notificationupdateslack.ts @@ -0,0 +1,108 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NotificationUpdateSlackRequest = { + appBuildError?: boolean | undefined; + databaseBackup?: boolean | undefined; + dokployRestart?: boolean | undefined; + name?: string | undefined; + appDeploy?: boolean | undefined; + dockerCleanup?: boolean | undefined; + webhookUrl?: string | undefined; + channel?: string | undefined; + notificationId: string; + slackId: string; + adminId?: string | undefined; +}; + +/** @internal */ +export const NotificationUpdateSlackRequest$inboundSchema: z.ZodType< + NotificationUpdateSlackRequest, + z.ZodTypeDef, + unknown +> = z.object({ + appBuildError: z.boolean().optional(), + databaseBackup: z.boolean().optional(), + dokployRestart: z.boolean().optional(), + name: z.string().optional(), + appDeploy: z.boolean().optional(), + dockerCleanup: z.boolean().optional(), + webhookUrl: z.string().optional(), + channel: z.string().optional(), + notificationId: z.string(), + slackId: z.string(), + adminId: z.string().optional(), +}); + +/** @internal */ +export type NotificationUpdateSlackRequest$Outbound = { + appBuildError?: boolean | undefined; + databaseBackup?: boolean | undefined; + dokployRestart?: boolean | undefined; + name?: string | undefined; + appDeploy?: boolean | undefined; + dockerCleanup?: boolean | undefined; + webhookUrl?: string | undefined; + channel?: string | undefined; + notificationId: string; + slackId: string; + adminId?: string | undefined; +}; + +/** @internal */ +export const NotificationUpdateSlackRequest$outboundSchema: z.ZodType< + NotificationUpdateSlackRequest$Outbound, + z.ZodTypeDef, + NotificationUpdateSlackRequest +> = z.object({ + appBuildError: z.boolean().optional(), + databaseBackup: z.boolean().optional(), + dokployRestart: z.boolean().optional(), + name: z.string().optional(), + appDeploy: z.boolean().optional(), + dockerCleanup: z.boolean().optional(), + webhookUrl: z.string().optional(), + channel: z.string().optional(), + notificationId: z.string(), + slackId: z.string(), + adminId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NotificationUpdateSlackRequest$ { + /** @deprecated use `NotificationUpdateSlackRequest$inboundSchema` instead. */ + export const inboundSchema = NotificationUpdateSlackRequest$inboundSchema; + /** @deprecated use `NotificationUpdateSlackRequest$outboundSchema` instead. */ + export const outboundSchema = NotificationUpdateSlackRequest$outboundSchema; + /** @deprecated use `NotificationUpdateSlackRequest$Outbound` instead. */ + export type Outbound = NotificationUpdateSlackRequest$Outbound; +} + +export function notificationUpdateSlackRequestToJSON( + notificationUpdateSlackRequest: NotificationUpdateSlackRequest, +): string { + return JSON.stringify( + NotificationUpdateSlackRequest$outboundSchema.parse( + notificationUpdateSlackRequest, + ), + ); +} + +export function notificationUpdateSlackRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NotificationUpdateSlackRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NotificationUpdateSlackRequest' from JSON`, + ); +} diff --git a/src/models/operations/notificationupdatetelegram.ts b/src/models/operations/notificationupdatetelegram.ts new file mode 100644 index 0000000..f6d1ea9 --- /dev/null +++ b/src/models/operations/notificationupdatetelegram.ts @@ -0,0 +1,109 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NotificationUpdateTelegramRequest = { + appBuildError?: boolean | undefined; + databaseBackup?: boolean | undefined; + dokployRestart?: boolean | undefined; + name?: string | undefined; + appDeploy?: boolean | undefined; + dockerCleanup?: boolean | undefined; + botToken?: string | undefined; + chatId?: string | undefined; + notificationId: string; + telegramId: string; + adminId?: string | undefined; +}; + +/** @internal */ +export const NotificationUpdateTelegramRequest$inboundSchema: z.ZodType< + NotificationUpdateTelegramRequest, + z.ZodTypeDef, + unknown +> = z.object({ + appBuildError: z.boolean().optional(), + databaseBackup: z.boolean().optional(), + dokployRestart: z.boolean().optional(), + name: z.string().optional(), + appDeploy: z.boolean().optional(), + dockerCleanup: z.boolean().optional(), + botToken: z.string().optional(), + chatId: z.string().optional(), + notificationId: z.string(), + telegramId: z.string(), + adminId: z.string().optional(), +}); + +/** @internal */ +export type NotificationUpdateTelegramRequest$Outbound = { + appBuildError?: boolean | undefined; + databaseBackup?: boolean | undefined; + dokployRestart?: boolean | undefined; + name?: string | undefined; + appDeploy?: boolean | undefined; + dockerCleanup?: boolean | undefined; + botToken?: string | undefined; + chatId?: string | undefined; + notificationId: string; + telegramId: string; + adminId?: string | undefined; +}; + +/** @internal */ +export const NotificationUpdateTelegramRequest$outboundSchema: z.ZodType< + NotificationUpdateTelegramRequest$Outbound, + z.ZodTypeDef, + NotificationUpdateTelegramRequest +> = z.object({ + appBuildError: z.boolean().optional(), + databaseBackup: z.boolean().optional(), + dokployRestart: z.boolean().optional(), + name: z.string().optional(), + appDeploy: z.boolean().optional(), + dockerCleanup: z.boolean().optional(), + botToken: z.string().optional(), + chatId: z.string().optional(), + notificationId: z.string(), + telegramId: z.string(), + adminId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NotificationUpdateTelegramRequest$ { + /** @deprecated use `NotificationUpdateTelegramRequest$inboundSchema` instead. */ + export const inboundSchema = NotificationUpdateTelegramRequest$inboundSchema; + /** @deprecated use `NotificationUpdateTelegramRequest$outboundSchema` instead. */ + export const outboundSchema = + NotificationUpdateTelegramRequest$outboundSchema; + /** @deprecated use `NotificationUpdateTelegramRequest$Outbound` instead. */ + export type Outbound = NotificationUpdateTelegramRequest$Outbound; +} + +export function notificationUpdateTelegramRequestToJSON( + notificationUpdateTelegramRequest: NotificationUpdateTelegramRequest, +): string { + return JSON.stringify( + NotificationUpdateTelegramRequest$outboundSchema.parse( + notificationUpdateTelegramRequest, + ), + ); +} + +export function notificationUpdateTelegramRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NotificationUpdateTelegramRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NotificationUpdateTelegramRequest' from JSON`, + ); +} diff --git a/src/models/operations/portcreate.ts b/src/models/operations/portcreate.ts new file mode 100644 index 0000000..619cc42 --- /dev/null +++ b/src/models/operations/portcreate.ts @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const PortCreateProtocol = { + Tcp: "tcp", + Udp: "udp", +} as const; +export type PortCreateProtocol = ClosedEnum; + +export type PortCreateRequest = { + publishedPort: number; + targetPort: number; + protocol?: PortCreateProtocol | undefined; + applicationId: string; +}; + +/** @internal */ +export const PortCreateProtocol$inboundSchema: z.ZodNativeEnum< + typeof PortCreateProtocol +> = z.nativeEnum(PortCreateProtocol); + +/** @internal */ +export const PortCreateProtocol$outboundSchema: z.ZodNativeEnum< + typeof PortCreateProtocol +> = PortCreateProtocol$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PortCreateProtocol$ { + /** @deprecated use `PortCreateProtocol$inboundSchema` instead. */ + export const inboundSchema = PortCreateProtocol$inboundSchema; + /** @deprecated use `PortCreateProtocol$outboundSchema` instead. */ + export const outboundSchema = PortCreateProtocol$outboundSchema; +} + +/** @internal */ +export const PortCreateRequest$inboundSchema: z.ZodType< + PortCreateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + publishedPort: z.number(), + targetPort: z.number(), + protocol: PortCreateProtocol$inboundSchema.default("tcp"), + applicationId: z.string(), +}); + +/** @internal */ +export type PortCreateRequest$Outbound = { + publishedPort: number; + targetPort: number; + protocol: string; + applicationId: string; +}; + +/** @internal */ +export const PortCreateRequest$outboundSchema: z.ZodType< + PortCreateRequest$Outbound, + z.ZodTypeDef, + PortCreateRequest +> = z.object({ + publishedPort: z.number(), + targetPort: z.number(), + protocol: PortCreateProtocol$outboundSchema.default("tcp"), + applicationId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PortCreateRequest$ { + /** @deprecated use `PortCreateRequest$inboundSchema` instead. */ + export const inboundSchema = PortCreateRequest$inboundSchema; + /** @deprecated use `PortCreateRequest$outboundSchema` instead. */ + export const outboundSchema = PortCreateRequest$outboundSchema; + /** @deprecated use `PortCreateRequest$Outbound` instead. */ + export type Outbound = PortCreateRequest$Outbound; +} + +export function portCreateRequestToJSON( + portCreateRequest: PortCreateRequest, +): string { + return JSON.stringify( + PortCreateRequest$outboundSchema.parse(portCreateRequest), + ); +} + +export function portCreateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PortCreateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PortCreateRequest' from JSON`, + ); +} diff --git a/src/models/operations/portdelete.ts b/src/models/operations/portdelete.ts new file mode 100644 index 0000000..63387e1 --- /dev/null +++ b/src/models/operations/portdelete.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type PortDeleteRequest = { + portId: string; +}; + +/** @internal */ +export const PortDeleteRequest$inboundSchema: z.ZodType< + PortDeleteRequest, + z.ZodTypeDef, + unknown +> = z.object({ + portId: z.string(), +}); + +/** @internal */ +export type PortDeleteRequest$Outbound = { + portId: string; +}; + +/** @internal */ +export const PortDeleteRequest$outboundSchema: z.ZodType< + PortDeleteRequest$Outbound, + z.ZodTypeDef, + PortDeleteRequest +> = z.object({ + portId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PortDeleteRequest$ { + /** @deprecated use `PortDeleteRequest$inboundSchema` instead. */ + export const inboundSchema = PortDeleteRequest$inboundSchema; + /** @deprecated use `PortDeleteRequest$outboundSchema` instead. */ + export const outboundSchema = PortDeleteRequest$outboundSchema; + /** @deprecated use `PortDeleteRequest$Outbound` instead. */ + export type Outbound = PortDeleteRequest$Outbound; +} + +export function portDeleteRequestToJSON( + portDeleteRequest: PortDeleteRequest, +): string { + return JSON.stringify( + PortDeleteRequest$outboundSchema.parse(portDeleteRequest), + ); +} + +export function portDeleteRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PortDeleteRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PortDeleteRequest' from JSON`, + ); +} diff --git a/src/models/operations/portone.ts b/src/models/operations/portone.ts new file mode 100644 index 0000000..a4c4160 --- /dev/null +++ b/src/models/operations/portone.ts @@ -0,0 +1,62 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type PortOneRequest = { + portId: string; +}; + +/** @internal */ +export const PortOneRequest$inboundSchema: z.ZodType< + PortOneRequest, + z.ZodTypeDef, + unknown +> = z.object({ + portId: z.string(), +}); + +/** @internal */ +export type PortOneRequest$Outbound = { + portId: string; +}; + +/** @internal */ +export const PortOneRequest$outboundSchema: z.ZodType< + PortOneRequest$Outbound, + z.ZodTypeDef, + PortOneRequest +> = z.object({ + portId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PortOneRequest$ { + /** @deprecated use `PortOneRequest$inboundSchema` instead. */ + export const inboundSchema = PortOneRequest$inboundSchema; + /** @deprecated use `PortOneRequest$outboundSchema` instead. */ + export const outboundSchema = PortOneRequest$outboundSchema; + /** @deprecated use `PortOneRequest$Outbound` instead. */ + export type Outbound = PortOneRequest$Outbound; +} + +export function portOneRequestToJSON(portOneRequest: PortOneRequest): string { + return JSON.stringify(PortOneRequest$outboundSchema.parse(portOneRequest)); +} + +export function portOneRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PortOneRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PortOneRequest' from JSON`, + ); +} diff --git a/src/models/operations/portupdate.ts b/src/models/operations/portupdate.ts new file mode 100644 index 0000000..8bca0f3 --- /dev/null +++ b/src/models/operations/portupdate.ts @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const PortUpdateProtocol = { + Tcp: "tcp", + Udp: "udp", +} as const; +export type PortUpdateProtocol = ClosedEnum; + +export type PortUpdateRequest = { + portId: string; + publishedPort: number; + targetPort: number; + protocol?: PortUpdateProtocol | undefined; +}; + +/** @internal */ +export const PortUpdateProtocol$inboundSchema: z.ZodNativeEnum< + typeof PortUpdateProtocol +> = z.nativeEnum(PortUpdateProtocol); + +/** @internal */ +export const PortUpdateProtocol$outboundSchema: z.ZodNativeEnum< + typeof PortUpdateProtocol +> = PortUpdateProtocol$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PortUpdateProtocol$ { + /** @deprecated use `PortUpdateProtocol$inboundSchema` instead. */ + export const inboundSchema = PortUpdateProtocol$inboundSchema; + /** @deprecated use `PortUpdateProtocol$outboundSchema` instead. */ + export const outboundSchema = PortUpdateProtocol$outboundSchema; +} + +/** @internal */ +export const PortUpdateRequest$inboundSchema: z.ZodType< + PortUpdateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + portId: z.string(), + publishedPort: z.number(), + targetPort: z.number(), + protocol: PortUpdateProtocol$inboundSchema.default("tcp"), +}); + +/** @internal */ +export type PortUpdateRequest$Outbound = { + portId: string; + publishedPort: number; + targetPort: number; + protocol: string; +}; + +/** @internal */ +export const PortUpdateRequest$outboundSchema: z.ZodType< + PortUpdateRequest$Outbound, + z.ZodTypeDef, + PortUpdateRequest +> = z.object({ + portId: z.string(), + publishedPort: z.number(), + targetPort: z.number(), + protocol: PortUpdateProtocol$outboundSchema.default("tcp"), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PortUpdateRequest$ { + /** @deprecated use `PortUpdateRequest$inboundSchema` instead. */ + export const inboundSchema = PortUpdateRequest$inboundSchema; + /** @deprecated use `PortUpdateRequest$outboundSchema` instead. */ + export const outboundSchema = PortUpdateRequest$outboundSchema; + /** @deprecated use `PortUpdateRequest$Outbound` instead. */ + export type Outbound = PortUpdateRequest$Outbound; +} + +export function portUpdateRequestToJSON( + portUpdateRequest: PortUpdateRequest, +): string { + return JSON.stringify( + PortUpdateRequest$outboundSchema.parse(portUpdateRequest), + ); +} + +export function portUpdateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PortUpdateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PortUpdateRequest' from JSON`, + ); +} diff --git a/src/models/operations/postgreschangestatus.ts b/src/models/operations/postgreschangestatus.ts new file mode 100644 index 0000000..65ce45b --- /dev/null +++ b/src/models/operations/postgreschangestatus.ts @@ -0,0 +1,107 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const PostgresChangeStatusApplicationStatus = { + Idle: "idle", + Running: "running", + Done: "done", + Error: "error", +} as const; +export type PostgresChangeStatusApplicationStatus = ClosedEnum< + typeof PostgresChangeStatusApplicationStatus +>; + +export type PostgresChangeStatusRequest = { + postgresId: string; + applicationStatus: PostgresChangeStatusApplicationStatus; +}; + +/** @internal */ +export const PostgresChangeStatusApplicationStatus$inboundSchema: + z.ZodNativeEnum = z.nativeEnum( + PostgresChangeStatusApplicationStatus, + ); + +/** @internal */ +export const PostgresChangeStatusApplicationStatus$outboundSchema: + z.ZodNativeEnum = + PostgresChangeStatusApplicationStatus$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PostgresChangeStatusApplicationStatus$ { + /** @deprecated use `PostgresChangeStatusApplicationStatus$inboundSchema` instead. */ + export const inboundSchema = + PostgresChangeStatusApplicationStatus$inboundSchema; + /** @deprecated use `PostgresChangeStatusApplicationStatus$outboundSchema` instead. */ + export const outboundSchema = + PostgresChangeStatusApplicationStatus$outboundSchema; +} + +/** @internal */ +export const PostgresChangeStatusRequest$inboundSchema: z.ZodType< + PostgresChangeStatusRequest, + z.ZodTypeDef, + unknown +> = z.object({ + postgresId: z.string(), + applicationStatus: PostgresChangeStatusApplicationStatus$inboundSchema, +}); + +/** @internal */ +export type PostgresChangeStatusRequest$Outbound = { + postgresId: string; + applicationStatus: string; +}; + +/** @internal */ +export const PostgresChangeStatusRequest$outboundSchema: z.ZodType< + PostgresChangeStatusRequest$Outbound, + z.ZodTypeDef, + PostgresChangeStatusRequest +> = z.object({ + postgresId: z.string(), + applicationStatus: PostgresChangeStatusApplicationStatus$outboundSchema, +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PostgresChangeStatusRequest$ { + /** @deprecated use `PostgresChangeStatusRequest$inboundSchema` instead. */ + export const inboundSchema = PostgresChangeStatusRequest$inboundSchema; + /** @deprecated use `PostgresChangeStatusRequest$outboundSchema` instead. */ + export const outboundSchema = PostgresChangeStatusRequest$outboundSchema; + /** @deprecated use `PostgresChangeStatusRequest$Outbound` instead. */ + export type Outbound = PostgresChangeStatusRequest$Outbound; +} + +export function postgresChangeStatusRequestToJSON( + postgresChangeStatusRequest: PostgresChangeStatusRequest, +): string { + return JSON.stringify( + PostgresChangeStatusRequest$outboundSchema.parse( + postgresChangeStatusRequest, + ), + ); +} + +export function postgresChangeStatusRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PostgresChangeStatusRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PostgresChangeStatusRequest' from JSON`, + ); +} diff --git a/src/models/operations/postgrescreate.ts b/src/models/operations/postgrescreate.ts new file mode 100644 index 0000000..d6cd415 --- /dev/null +++ b/src/models/operations/postgrescreate.ts @@ -0,0 +1,98 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type PostgresCreateRequest = { + name: string; + appName: string; + databaseName: string; + databaseUser: string; + databasePassword: string; + dockerImage?: string | undefined; + projectId: string; + description?: string | null | undefined; + serverId?: string | null | undefined; +}; + +/** @internal */ +export const PostgresCreateRequest$inboundSchema: z.ZodType< + PostgresCreateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + appName: z.string(), + databaseName: z.string(), + databaseUser: z.string(), + databasePassword: z.string(), + dockerImage: z.string().default("postgres:15"), + projectId: z.string(), + description: z.nullable(z.string()).optional(), + serverId: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type PostgresCreateRequest$Outbound = { + name: string; + appName: string; + databaseName: string; + databaseUser: string; + databasePassword: string; + dockerImage: string; + projectId: string; + description?: string | null | undefined; + serverId?: string | null | undefined; +}; + +/** @internal */ +export const PostgresCreateRequest$outboundSchema: z.ZodType< + PostgresCreateRequest$Outbound, + z.ZodTypeDef, + PostgresCreateRequest +> = z.object({ + name: z.string(), + appName: z.string(), + databaseName: z.string(), + databaseUser: z.string(), + databasePassword: z.string(), + dockerImage: z.string().default("postgres:15"), + projectId: z.string(), + description: z.nullable(z.string()).optional(), + serverId: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PostgresCreateRequest$ { + /** @deprecated use `PostgresCreateRequest$inboundSchema` instead. */ + export const inboundSchema = PostgresCreateRequest$inboundSchema; + /** @deprecated use `PostgresCreateRequest$outboundSchema` instead. */ + export const outboundSchema = PostgresCreateRequest$outboundSchema; + /** @deprecated use `PostgresCreateRequest$Outbound` instead. */ + export type Outbound = PostgresCreateRequest$Outbound; +} + +export function postgresCreateRequestToJSON( + postgresCreateRequest: PostgresCreateRequest, +): string { + return JSON.stringify( + PostgresCreateRequest$outboundSchema.parse(postgresCreateRequest), + ); +} + +export function postgresCreateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PostgresCreateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PostgresCreateRequest' from JSON`, + ); +} diff --git a/src/models/operations/postgresdeploy.ts b/src/models/operations/postgresdeploy.ts new file mode 100644 index 0000000..2772e25 --- /dev/null +++ b/src/models/operations/postgresdeploy.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type PostgresDeployRequest = { + postgresId: string; +}; + +/** @internal */ +export const PostgresDeployRequest$inboundSchema: z.ZodType< + PostgresDeployRequest, + z.ZodTypeDef, + unknown +> = z.object({ + postgresId: z.string(), +}); + +/** @internal */ +export type PostgresDeployRequest$Outbound = { + postgresId: string; +}; + +/** @internal */ +export const PostgresDeployRequest$outboundSchema: z.ZodType< + PostgresDeployRequest$Outbound, + z.ZodTypeDef, + PostgresDeployRequest +> = z.object({ + postgresId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PostgresDeployRequest$ { + /** @deprecated use `PostgresDeployRequest$inboundSchema` instead. */ + export const inboundSchema = PostgresDeployRequest$inboundSchema; + /** @deprecated use `PostgresDeployRequest$outboundSchema` instead. */ + export const outboundSchema = PostgresDeployRequest$outboundSchema; + /** @deprecated use `PostgresDeployRequest$Outbound` instead. */ + export type Outbound = PostgresDeployRequest$Outbound; +} + +export function postgresDeployRequestToJSON( + postgresDeployRequest: PostgresDeployRequest, +): string { + return JSON.stringify( + PostgresDeployRequest$outboundSchema.parse(postgresDeployRequest), + ); +} + +export function postgresDeployRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PostgresDeployRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PostgresDeployRequest' from JSON`, + ); +} diff --git a/src/models/operations/postgresone.ts b/src/models/operations/postgresone.ts new file mode 100644 index 0000000..8d49ac8 --- /dev/null +++ b/src/models/operations/postgresone.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type PostgresOneRequest = { + postgresId: string; +}; + +/** @internal */ +export const PostgresOneRequest$inboundSchema: z.ZodType< + PostgresOneRequest, + z.ZodTypeDef, + unknown +> = z.object({ + postgresId: z.string(), +}); + +/** @internal */ +export type PostgresOneRequest$Outbound = { + postgresId: string; +}; + +/** @internal */ +export const PostgresOneRequest$outboundSchema: z.ZodType< + PostgresOneRequest$Outbound, + z.ZodTypeDef, + PostgresOneRequest +> = z.object({ + postgresId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PostgresOneRequest$ { + /** @deprecated use `PostgresOneRequest$inboundSchema` instead. */ + export const inboundSchema = PostgresOneRequest$inboundSchema; + /** @deprecated use `PostgresOneRequest$outboundSchema` instead. */ + export const outboundSchema = PostgresOneRequest$outboundSchema; + /** @deprecated use `PostgresOneRequest$Outbound` instead. */ + export type Outbound = PostgresOneRequest$Outbound; +} + +export function postgresOneRequestToJSON( + postgresOneRequest: PostgresOneRequest, +): string { + return JSON.stringify( + PostgresOneRequest$outboundSchema.parse(postgresOneRequest), + ); +} + +export function postgresOneRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PostgresOneRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PostgresOneRequest' from JSON`, + ); +} diff --git a/src/models/operations/postgresreload.ts b/src/models/operations/postgresreload.ts new file mode 100644 index 0000000..94f9dd8 --- /dev/null +++ b/src/models/operations/postgresreload.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type PostgresReloadRequest = { + postgresId: string; + appName: string; +}; + +/** @internal */ +export const PostgresReloadRequest$inboundSchema: z.ZodType< + PostgresReloadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + postgresId: z.string(), + appName: z.string(), +}); + +/** @internal */ +export type PostgresReloadRequest$Outbound = { + postgresId: string; + appName: string; +}; + +/** @internal */ +export const PostgresReloadRequest$outboundSchema: z.ZodType< + PostgresReloadRequest$Outbound, + z.ZodTypeDef, + PostgresReloadRequest +> = z.object({ + postgresId: z.string(), + appName: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PostgresReloadRequest$ { + /** @deprecated use `PostgresReloadRequest$inboundSchema` instead. */ + export const inboundSchema = PostgresReloadRequest$inboundSchema; + /** @deprecated use `PostgresReloadRequest$outboundSchema` instead. */ + export const outboundSchema = PostgresReloadRequest$outboundSchema; + /** @deprecated use `PostgresReloadRequest$Outbound` instead. */ + export type Outbound = PostgresReloadRequest$Outbound; +} + +export function postgresReloadRequestToJSON( + postgresReloadRequest: PostgresReloadRequest, +): string { + return JSON.stringify( + PostgresReloadRequest$outboundSchema.parse(postgresReloadRequest), + ); +} + +export function postgresReloadRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PostgresReloadRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PostgresReloadRequest' from JSON`, + ); +} diff --git a/src/models/operations/postgresremove.ts b/src/models/operations/postgresremove.ts new file mode 100644 index 0000000..1c2627e --- /dev/null +++ b/src/models/operations/postgresremove.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type PostgresRemoveRequest = { + postgresId: string; +}; + +/** @internal */ +export const PostgresRemoveRequest$inboundSchema: z.ZodType< + PostgresRemoveRequest, + z.ZodTypeDef, + unknown +> = z.object({ + postgresId: z.string(), +}); + +/** @internal */ +export type PostgresRemoveRequest$Outbound = { + postgresId: string; +}; + +/** @internal */ +export const PostgresRemoveRequest$outboundSchema: z.ZodType< + PostgresRemoveRequest$Outbound, + z.ZodTypeDef, + PostgresRemoveRequest +> = z.object({ + postgresId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PostgresRemoveRequest$ { + /** @deprecated use `PostgresRemoveRequest$inboundSchema` instead. */ + export const inboundSchema = PostgresRemoveRequest$inboundSchema; + /** @deprecated use `PostgresRemoveRequest$outboundSchema` instead. */ + export const outboundSchema = PostgresRemoveRequest$outboundSchema; + /** @deprecated use `PostgresRemoveRequest$Outbound` instead. */ + export type Outbound = PostgresRemoveRequest$Outbound; +} + +export function postgresRemoveRequestToJSON( + postgresRemoveRequest: PostgresRemoveRequest, +): string { + return JSON.stringify( + PostgresRemoveRequest$outboundSchema.parse(postgresRemoveRequest), + ); +} + +export function postgresRemoveRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PostgresRemoveRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PostgresRemoveRequest' from JSON`, + ); +} diff --git a/src/models/operations/postgressaveenvironment.ts b/src/models/operations/postgressaveenvironment.ts new file mode 100644 index 0000000..af24014 --- /dev/null +++ b/src/models/operations/postgressaveenvironment.ts @@ -0,0 +1,72 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type PostgresSaveEnvironmentRequest = { + postgresId: string; + env?: string | null | undefined; +}; + +/** @internal */ +export const PostgresSaveEnvironmentRequest$inboundSchema: z.ZodType< + PostgresSaveEnvironmentRequest, + z.ZodTypeDef, + unknown +> = z.object({ + postgresId: z.string(), + env: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type PostgresSaveEnvironmentRequest$Outbound = { + postgresId: string; + env?: string | null | undefined; +}; + +/** @internal */ +export const PostgresSaveEnvironmentRequest$outboundSchema: z.ZodType< + PostgresSaveEnvironmentRequest$Outbound, + z.ZodTypeDef, + PostgresSaveEnvironmentRequest +> = z.object({ + postgresId: z.string(), + env: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PostgresSaveEnvironmentRequest$ { + /** @deprecated use `PostgresSaveEnvironmentRequest$inboundSchema` instead. */ + export const inboundSchema = PostgresSaveEnvironmentRequest$inboundSchema; + /** @deprecated use `PostgresSaveEnvironmentRequest$outboundSchema` instead. */ + export const outboundSchema = PostgresSaveEnvironmentRequest$outboundSchema; + /** @deprecated use `PostgresSaveEnvironmentRequest$Outbound` instead. */ + export type Outbound = PostgresSaveEnvironmentRequest$Outbound; +} + +export function postgresSaveEnvironmentRequestToJSON( + postgresSaveEnvironmentRequest: PostgresSaveEnvironmentRequest, +): string { + return JSON.stringify( + PostgresSaveEnvironmentRequest$outboundSchema.parse( + postgresSaveEnvironmentRequest, + ), + ); +} + +export function postgresSaveEnvironmentRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PostgresSaveEnvironmentRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PostgresSaveEnvironmentRequest' from JSON`, + ); +} diff --git a/src/models/operations/postgressaveexternalport.ts b/src/models/operations/postgressaveexternalport.ts new file mode 100644 index 0000000..72b527a --- /dev/null +++ b/src/models/operations/postgressaveexternalport.ts @@ -0,0 +1,72 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type PostgresSaveExternalPortRequest = { + postgresId: string; + externalPort: number | null; +}; + +/** @internal */ +export const PostgresSaveExternalPortRequest$inboundSchema: z.ZodType< + PostgresSaveExternalPortRequest, + z.ZodTypeDef, + unknown +> = z.object({ + postgresId: z.string(), + externalPort: z.nullable(z.number()), +}); + +/** @internal */ +export type PostgresSaveExternalPortRequest$Outbound = { + postgresId: string; + externalPort: number | null; +}; + +/** @internal */ +export const PostgresSaveExternalPortRequest$outboundSchema: z.ZodType< + PostgresSaveExternalPortRequest$Outbound, + z.ZodTypeDef, + PostgresSaveExternalPortRequest +> = z.object({ + postgresId: z.string(), + externalPort: z.nullable(z.number()), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PostgresSaveExternalPortRequest$ { + /** @deprecated use `PostgresSaveExternalPortRequest$inboundSchema` instead. */ + export const inboundSchema = PostgresSaveExternalPortRequest$inboundSchema; + /** @deprecated use `PostgresSaveExternalPortRequest$outboundSchema` instead. */ + export const outboundSchema = PostgresSaveExternalPortRequest$outboundSchema; + /** @deprecated use `PostgresSaveExternalPortRequest$Outbound` instead. */ + export type Outbound = PostgresSaveExternalPortRequest$Outbound; +} + +export function postgresSaveExternalPortRequestToJSON( + postgresSaveExternalPortRequest: PostgresSaveExternalPortRequest, +): string { + return JSON.stringify( + PostgresSaveExternalPortRequest$outboundSchema.parse( + postgresSaveExternalPortRequest, + ), + ); +} + +export function postgresSaveExternalPortRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PostgresSaveExternalPortRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PostgresSaveExternalPortRequest' from JSON`, + ); +} diff --git a/src/models/operations/postgresstart.ts b/src/models/operations/postgresstart.ts new file mode 100644 index 0000000..f83b38e --- /dev/null +++ b/src/models/operations/postgresstart.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type PostgresStartRequest = { + postgresId: string; +}; + +/** @internal */ +export const PostgresStartRequest$inboundSchema: z.ZodType< + PostgresStartRequest, + z.ZodTypeDef, + unknown +> = z.object({ + postgresId: z.string(), +}); + +/** @internal */ +export type PostgresStartRequest$Outbound = { + postgresId: string; +}; + +/** @internal */ +export const PostgresStartRequest$outboundSchema: z.ZodType< + PostgresStartRequest$Outbound, + z.ZodTypeDef, + PostgresStartRequest +> = z.object({ + postgresId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PostgresStartRequest$ { + /** @deprecated use `PostgresStartRequest$inboundSchema` instead. */ + export const inboundSchema = PostgresStartRequest$inboundSchema; + /** @deprecated use `PostgresStartRequest$outboundSchema` instead. */ + export const outboundSchema = PostgresStartRequest$outboundSchema; + /** @deprecated use `PostgresStartRequest$Outbound` instead. */ + export type Outbound = PostgresStartRequest$Outbound; +} + +export function postgresStartRequestToJSON( + postgresStartRequest: PostgresStartRequest, +): string { + return JSON.stringify( + PostgresStartRequest$outboundSchema.parse(postgresStartRequest), + ); +} + +export function postgresStartRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PostgresStartRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PostgresStartRequest' from JSON`, + ); +} diff --git a/src/models/operations/postgresstop.ts b/src/models/operations/postgresstop.ts new file mode 100644 index 0000000..bd70f9b --- /dev/null +++ b/src/models/operations/postgresstop.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type PostgresStopRequest = { + postgresId: string; +}; + +/** @internal */ +export const PostgresStopRequest$inboundSchema: z.ZodType< + PostgresStopRequest, + z.ZodTypeDef, + unknown +> = z.object({ + postgresId: z.string(), +}); + +/** @internal */ +export type PostgresStopRequest$Outbound = { + postgresId: string; +}; + +/** @internal */ +export const PostgresStopRequest$outboundSchema: z.ZodType< + PostgresStopRequest$Outbound, + z.ZodTypeDef, + PostgresStopRequest +> = z.object({ + postgresId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PostgresStopRequest$ { + /** @deprecated use `PostgresStopRequest$inboundSchema` instead. */ + export const inboundSchema = PostgresStopRequest$inboundSchema; + /** @deprecated use `PostgresStopRequest$outboundSchema` instead. */ + export const outboundSchema = PostgresStopRequest$outboundSchema; + /** @deprecated use `PostgresStopRequest$Outbound` instead. */ + export type Outbound = PostgresStopRequest$Outbound; +} + +export function postgresStopRequestToJSON( + postgresStopRequest: PostgresStopRequest, +): string { + return JSON.stringify( + PostgresStopRequest$outboundSchema.parse(postgresStopRequest), + ); +} + +export function postgresStopRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PostgresStopRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PostgresStopRequest' from JSON`, + ); +} diff --git a/src/models/operations/postgresupdate.ts b/src/models/operations/postgresupdate.ts new file mode 100644 index 0000000..4a936fd --- /dev/null +++ b/src/models/operations/postgresupdate.ts @@ -0,0 +1,166 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const PostgresUpdateApplicationStatus = { + Idle: "idle", + Running: "running", + Done: "done", + Error: "error", +} as const; +export type PostgresUpdateApplicationStatus = ClosedEnum< + typeof PostgresUpdateApplicationStatus +>; + +export type PostgresUpdateRequest = { + postgresId: string; + name?: string | undefined; + appName?: string | undefined; + databaseName?: string | undefined; + databaseUser?: string | undefined; + databasePassword?: string | undefined; + description?: string | null | undefined; + dockerImage?: string | undefined; + command?: string | null | undefined; + env?: string | null | undefined; + memoryReservation?: number | null | undefined; + externalPort?: number | null | undefined; + memoryLimit?: number | null | undefined; + cpuReservation?: number | null | undefined; + cpuLimit?: number | null | undefined; + applicationStatus?: PostgresUpdateApplicationStatus | undefined; + createdAt?: string | undefined; + projectId?: string | undefined; +}; + +/** @internal */ +export const PostgresUpdateApplicationStatus$inboundSchema: z.ZodNativeEnum< + typeof PostgresUpdateApplicationStatus +> = z.nativeEnum(PostgresUpdateApplicationStatus); + +/** @internal */ +export const PostgresUpdateApplicationStatus$outboundSchema: z.ZodNativeEnum< + typeof PostgresUpdateApplicationStatus +> = PostgresUpdateApplicationStatus$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PostgresUpdateApplicationStatus$ { + /** @deprecated use `PostgresUpdateApplicationStatus$inboundSchema` instead. */ + export const inboundSchema = PostgresUpdateApplicationStatus$inboundSchema; + /** @deprecated use `PostgresUpdateApplicationStatus$outboundSchema` instead. */ + export const outboundSchema = PostgresUpdateApplicationStatus$outboundSchema; +} + +/** @internal */ +export const PostgresUpdateRequest$inboundSchema: z.ZodType< + PostgresUpdateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + postgresId: z.string(), + name: z.string().optional(), + appName: z.string().optional(), + databaseName: z.string().optional(), + databaseUser: z.string().optional(), + databasePassword: z.string().optional(), + description: z.nullable(z.string()).optional(), + dockerImage: z.string().default("postgres:15"), + command: z.nullable(z.string()).optional(), + env: z.nullable(z.string()).optional(), + memoryReservation: z.nullable(z.number()).optional(), + externalPort: z.nullable(z.number()).optional(), + memoryLimit: z.nullable(z.number()).optional(), + cpuReservation: z.nullable(z.number()).optional(), + cpuLimit: z.nullable(z.number()).optional(), + applicationStatus: PostgresUpdateApplicationStatus$inboundSchema.optional(), + createdAt: z.string().optional(), + projectId: z.string().optional(), +}); + +/** @internal */ +export type PostgresUpdateRequest$Outbound = { + postgresId: string; + name?: string | undefined; + appName?: string | undefined; + databaseName?: string | undefined; + databaseUser?: string | undefined; + databasePassword?: string | undefined; + description?: string | null | undefined; + dockerImage: string; + command?: string | null | undefined; + env?: string | null | undefined; + memoryReservation?: number | null | undefined; + externalPort?: number | null | undefined; + memoryLimit?: number | null | undefined; + cpuReservation?: number | null | undefined; + cpuLimit?: number | null | undefined; + applicationStatus?: string | undefined; + createdAt?: string | undefined; + projectId?: string | undefined; +}; + +/** @internal */ +export const PostgresUpdateRequest$outboundSchema: z.ZodType< + PostgresUpdateRequest$Outbound, + z.ZodTypeDef, + PostgresUpdateRequest +> = z.object({ + postgresId: z.string(), + name: z.string().optional(), + appName: z.string().optional(), + databaseName: z.string().optional(), + databaseUser: z.string().optional(), + databasePassword: z.string().optional(), + description: z.nullable(z.string()).optional(), + dockerImage: z.string().default("postgres:15"), + command: z.nullable(z.string()).optional(), + env: z.nullable(z.string()).optional(), + memoryReservation: z.nullable(z.number()).optional(), + externalPort: z.nullable(z.number()).optional(), + memoryLimit: z.nullable(z.number()).optional(), + cpuReservation: z.nullable(z.number()).optional(), + cpuLimit: z.nullable(z.number()).optional(), + applicationStatus: PostgresUpdateApplicationStatus$outboundSchema.optional(), + createdAt: z.string().optional(), + projectId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PostgresUpdateRequest$ { + /** @deprecated use `PostgresUpdateRequest$inboundSchema` instead. */ + export const inboundSchema = PostgresUpdateRequest$inboundSchema; + /** @deprecated use `PostgresUpdateRequest$outboundSchema` instead. */ + export const outboundSchema = PostgresUpdateRequest$outboundSchema; + /** @deprecated use `PostgresUpdateRequest$Outbound` instead. */ + export type Outbound = PostgresUpdateRequest$Outbound; +} + +export function postgresUpdateRequestToJSON( + postgresUpdateRequest: PostgresUpdateRequest, +): string { + return JSON.stringify( + PostgresUpdateRequest$outboundSchema.parse(postgresUpdateRequest), + ); +} + +export function postgresUpdateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PostgresUpdateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PostgresUpdateRequest' from JSON`, + ); +} diff --git a/src/models/operations/projectcreate.ts b/src/models/operations/projectcreate.ts new file mode 100644 index 0000000..f22cde2 --- /dev/null +++ b/src/models/operations/projectcreate.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ProjectCreateRequest = { + name: string; + description?: string | null | undefined; +}; + +/** @internal */ +export const ProjectCreateRequest$inboundSchema: z.ZodType< + ProjectCreateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + description: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type ProjectCreateRequest$Outbound = { + name: string; + description?: string | null | undefined; +}; + +/** @internal */ +export const ProjectCreateRequest$outboundSchema: z.ZodType< + ProjectCreateRequest$Outbound, + z.ZodTypeDef, + ProjectCreateRequest +> = z.object({ + name: z.string(), + description: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ProjectCreateRequest$ { + /** @deprecated use `ProjectCreateRequest$inboundSchema` instead. */ + export const inboundSchema = ProjectCreateRequest$inboundSchema; + /** @deprecated use `ProjectCreateRequest$outboundSchema` instead. */ + export const outboundSchema = ProjectCreateRequest$outboundSchema; + /** @deprecated use `ProjectCreateRequest$Outbound` instead. */ + export type Outbound = ProjectCreateRequest$Outbound; +} + +export function projectCreateRequestToJSON( + projectCreateRequest: ProjectCreateRequest, +): string { + return JSON.stringify( + ProjectCreateRequest$outboundSchema.parse(projectCreateRequest), + ); +} + +export function projectCreateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ProjectCreateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ProjectCreateRequest' from JSON`, + ); +} diff --git a/src/models/operations/projectone.ts b/src/models/operations/projectone.ts new file mode 100644 index 0000000..a83b451 --- /dev/null +++ b/src/models/operations/projectone.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ProjectOneRequest = { + projectId: string; +}; + +/** @internal */ +export const ProjectOneRequest$inboundSchema: z.ZodType< + ProjectOneRequest, + z.ZodTypeDef, + unknown +> = z.object({ + projectId: z.string(), +}); + +/** @internal */ +export type ProjectOneRequest$Outbound = { + projectId: string; +}; + +/** @internal */ +export const ProjectOneRequest$outboundSchema: z.ZodType< + ProjectOneRequest$Outbound, + z.ZodTypeDef, + ProjectOneRequest +> = z.object({ + projectId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ProjectOneRequest$ { + /** @deprecated use `ProjectOneRequest$inboundSchema` instead. */ + export const inboundSchema = ProjectOneRequest$inboundSchema; + /** @deprecated use `ProjectOneRequest$outboundSchema` instead. */ + export const outboundSchema = ProjectOneRequest$outboundSchema; + /** @deprecated use `ProjectOneRequest$Outbound` instead. */ + export type Outbound = ProjectOneRequest$Outbound; +} + +export function projectOneRequestToJSON( + projectOneRequest: ProjectOneRequest, +): string { + return JSON.stringify( + ProjectOneRequest$outboundSchema.parse(projectOneRequest), + ); +} + +export function projectOneRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ProjectOneRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ProjectOneRequest' from JSON`, + ); +} diff --git a/src/models/operations/projectremove.ts b/src/models/operations/projectremove.ts new file mode 100644 index 0000000..cb2fd3d --- /dev/null +++ b/src/models/operations/projectremove.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ProjectRemoveRequest = { + projectId: string; +}; + +/** @internal */ +export const ProjectRemoveRequest$inboundSchema: z.ZodType< + ProjectRemoveRequest, + z.ZodTypeDef, + unknown +> = z.object({ + projectId: z.string(), +}); + +/** @internal */ +export type ProjectRemoveRequest$Outbound = { + projectId: string; +}; + +/** @internal */ +export const ProjectRemoveRequest$outboundSchema: z.ZodType< + ProjectRemoveRequest$Outbound, + z.ZodTypeDef, + ProjectRemoveRequest +> = z.object({ + projectId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ProjectRemoveRequest$ { + /** @deprecated use `ProjectRemoveRequest$inboundSchema` instead. */ + export const inboundSchema = ProjectRemoveRequest$inboundSchema; + /** @deprecated use `ProjectRemoveRequest$outboundSchema` instead. */ + export const outboundSchema = ProjectRemoveRequest$outboundSchema; + /** @deprecated use `ProjectRemoveRequest$Outbound` instead. */ + export type Outbound = ProjectRemoveRequest$Outbound; +} + +export function projectRemoveRequestToJSON( + projectRemoveRequest: ProjectRemoveRequest, +): string { + return JSON.stringify( + ProjectRemoveRequest$outboundSchema.parse(projectRemoveRequest), + ); +} + +export function projectRemoveRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ProjectRemoveRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ProjectRemoveRequest' from JSON`, + ); +} diff --git a/src/models/operations/projectupdate.ts b/src/models/operations/projectupdate.ts new file mode 100644 index 0000000..278058d --- /dev/null +++ b/src/models/operations/projectupdate.ts @@ -0,0 +1,74 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ProjectUpdateRequest = { + name: string; + description?: string | null | undefined; + projectId: string; +}; + +/** @internal */ +export const ProjectUpdateRequest$inboundSchema: z.ZodType< + ProjectUpdateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + description: z.nullable(z.string()).optional(), + projectId: z.string(), +}); + +/** @internal */ +export type ProjectUpdateRequest$Outbound = { + name: string; + description?: string | null | undefined; + projectId: string; +}; + +/** @internal */ +export const ProjectUpdateRequest$outboundSchema: z.ZodType< + ProjectUpdateRequest$Outbound, + z.ZodTypeDef, + ProjectUpdateRequest +> = z.object({ + name: z.string(), + description: z.nullable(z.string()).optional(), + projectId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ProjectUpdateRequest$ { + /** @deprecated use `ProjectUpdateRequest$inboundSchema` instead. */ + export const inboundSchema = ProjectUpdateRequest$inboundSchema; + /** @deprecated use `ProjectUpdateRequest$outboundSchema` instead. */ + export const outboundSchema = ProjectUpdateRequest$outboundSchema; + /** @deprecated use `ProjectUpdateRequest$Outbound` instead. */ + export type Outbound = ProjectUpdateRequest$Outbound; +} + +export function projectUpdateRequestToJSON( + projectUpdateRequest: ProjectUpdateRequest, +): string { + return JSON.stringify( + ProjectUpdateRequest$outboundSchema.parse(projectUpdateRequest), + ); +} + +export function projectUpdateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ProjectUpdateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ProjectUpdateRequest' from JSON`, + ); +} diff --git a/src/models/operations/redirectscreate.ts b/src/models/operations/redirectscreate.ts new file mode 100644 index 0000000..de9dcc7 --- /dev/null +++ b/src/models/operations/redirectscreate.ts @@ -0,0 +1,78 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type RedirectsCreateRequest = { + regex: string; + replacement: string; + permanent: boolean; + applicationId: string; +}; + +/** @internal */ +export const RedirectsCreateRequest$inboundSchema: z.ZodType< + RedirectsCreateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + regex: z.string(), + replacement: z.string(), + permanent: z.boolean(), + applicationId: z.string(), +}); + +/** @internal */ +export type RedirectsCreateRequest$Outbound = { + regex: string; + replacement: string; + permanent: boolean; + applicationId: string; +}; + +/** @internal */ +export const RedirectsCreateRequest$outboundSchema: z.ZodType< + RedirectsCreateRequest$Outbound, + z.ZodTypeDef, + RedirectsCreateRequest +> = z.object({ + regex: z.string(), + replacement: z.string(), + permanent: z.boolean(), + applicationId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RedirectsCreateRequest$ { + /** @deprecated use `RedirectsCreateRequest$inboundSchema` instead. */ + export const inboundSchema = RedirectsCreateRequest$inboundSchema; + /** @deprecated use `RedirectsCreateRequest$outboundSchema` instead. */ + export const outboundSchema = RedirectsCreateRequest$outboundSchema; + /** @deprecated use `RedirectsCreateRequest$Outbound` instead. */ + export type Outbound = RedirectsCreateRequest$Outbound; +} + +export function redirectsCreateRequestToJSON( + redirectsCreateRequest: RedirectsCreateRequest, +): string { + return JSON.stringify( + RedirectsCreateRequest$outboundSchema.parse(redirectsCreateRequest), + ); +} + +export function redirectsCreateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RedirectsCreateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RedirectsCreateRequest' from JSON`, + ); +} diff --git a/src/models/operations/redirectsdelete.ts b/src/models/operations/redirectsdelete.ts new file mode 100644 index 0000000..cbc05ea --- /dev/null +++ b/src/models/operations/redirectsdelete.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type RedirectsDeleteRequest = { + redirectId: string; +}; + +/** @internal */ +export const RedirectsDeleteRequest$inboundSchema: z.ZodType< + RedirectsDeleteRequest, + z.ZodTypeDef, + unknown +> = z.object({ + redirectId: z.string(), +}); + +/** @internal */ +export type RedirectsDeleteRequest$Outbound = { + redirectId: string; +}; + +/** @internal */ +export const RedirectsDeleteRequest$outboundSchema: z.ZodType< + RedirectsDeleteRequest$Outbound, + z.ZodTypeDef, + RedirectsDeleteRequest +> = z.object({ + redirectId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RedirectsDeleteRequest$ { + /** @deprecated use `RedirectsDeleteRequest$inboundSchema` instead. */ + export const inboundSchema = RedirectsDeleteRequest$inboundSchema; + /** @deprecated use `RedirectsDeleteRequest$outboundSchema` instead. */ + export const outboundSchema = RedirectsDeleteRequest$outboundSchema; + /** @deprecated use `RedirectsDeleteRequest$Outbound` instead. */ + export type Outbound = RedirectsDeleteRequest$Outbound; +} + +export function redirectsDeleteRequestToJSON( + redirectsDeleteRequest: RedirectsDeleteRequest, +): string { + return JSON.stringify( + RedirectsDeleteRequest$outboundSchema.parse(redirectsDeleteRequest), + ); +} + +export function redirectsDeleteRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RedirectsDeleteRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RedirectsDeleteRequest' from JSON`, + ); +} diff --git a/src/models/operations/redirectsone.ts b/src/models/operations/redirectsone.ts new file mode 100644 index 0000000..7505a47 --- /dev/null +++ b/src/models/operations/redirectsone.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type RedirectsOneRequest = { + redirectId: string; +}; + +/** @internal */ +export const RedirectsOneRequest$inboundSchema: z.ZodType< + RedirectsOneRequest, + z.ZodTypeDef, + unknown +> = z.object({ + redirectId: z.string(), +}); + +/** @internal */ +export type RedirectsOneRequest$Outbound = { + redirectId: string; +}; + +/** @internal */ +export const RedirectsOneRequest$outboundSchema: z.ZodType< + RedirectsOneRequest$Outbound, + z.ZodTypeDef, + RedirectsOneRequest +> = z.object({ + redirectId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RedirectsOneRequest$ { + /** @deprecated use `RedirectsOneRequest$inboundSchema` instead. */ + export const inboundSchema = RedirectsOneRequest$inboundSchema; + /** @deprecated use `RedirectsOneRequest$outboundSchema` instead. */ + export const outboundSchema = RedirectsOneRequest$outboundSchema; + /** @deprecated use `RedirectsOneRequest$Outbound` instead. */ + export type Outbound = RedirectsOneRequest$Outbound; +} + +export function redirectsOneRequestToJSON( + redirectsOneRequest: RedirectsOneRequest, +): string { + return JSON.stringify( + RedirectsOneRequest$outboundSchema.parse(redirectsOneRequest), + ); +} + +export function redirectsOneRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RedirectsOneRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RedirectsOneRequest' from JSON`, + ); +} diff --git a/src/models/operations/redirectsupdate.ts b/src/models/operations/redirectsupdate.ts new file mode 100644 index 0000000..4d46296 --- /dev/null +++ b/src/models/operations/redirectsupdate.ts @@ -0,0 +1,78 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type RedirectsUpdateRequest = { + redirectId: string; + regex: string; + replacement: string; + permanent: boolean; +}; + +/** @internal */ +export const RedirectsUpdateRequest$inboundSchema: z.ZodType< + RedirectsUpdateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + redirectId: z.string(), + regex: z.string(), + replacement: z.string(), + permanent: z.boolean(), +}); + +/** @internal */ +export type RedirectsUpdateRequest$Outbound = { + redirectId: string; + regex: string; + replacement: string; + permanent: boolean; +}; + +/** @internal */ +export const RedirectsUpdateRequest$outboundSchema: z.ZodType< + RedirectsUpdateRequest$Outbound, + z.ZodTypeDef, + RedirectsUpdateRequest +> = z.object({ + redirectId: z.string(), + regex: z.string(), + replacement: z.string(), + permanent: z.boolean(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RedirectsUpdateRequest$ { + /** @deprecated use `RedirectsUpdateRequest$inboundSchema` instead. */ + export const inboundSchema = RedirectsUpdateRequest$inboundSchema; + /** @deprecated use `RedirectsUpdateRequest$outboundSchema` instead. */ + export const outboundSchema = RedirectsUpdateRequest$outboundSchema; + /** @deprecated use `RedirectsUpdateRequest$Outbound` instead. */ + export type Outbound = RedirectsUpdateRequest$Outbound; +} + +export function redirectsUpdateRequestToJSON( + redirectsUpdateRequest: RedirectsUpdateRequest, +): string { + return JSON.stringify( + RedirectsUpdateRequest$outboundSchema.parse(redirectsUpdateRequest), + ); +} + +export function redirectsUpdateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RedirectsUpdateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RedirectsUpdateRequest' from JSON`, + ); +} diff --git a/src/models/operations/redischangestatus.ts b/src/models/operations/redischangestatus.ts new file mode 100644 index 0000000..fd7c565 --- /dev/null +++ b/src/models/operations/redischangestatus.ts @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const RedisChangeStatusApplicationStatus = { + Idle: "idle", + Running: "running", + Done: "done", + Error: "error", +} as const; +export type RedisChangeStatusApplicationStatus = ClosedEnum< + typeof RedisChangeStatusApplicationStatus +>; + +export type RedisChangeStatusRequest = { + redisId: string; + applicationStatus: RedisChangeStatusApplicationStatus; +}; + +/** @internal */ +export const RedisChangeStatusApplicationStatus$inboundSchema: z.ZodNativeEnum< + typeof RedisChangeStatusApplicationStatus +> = z.nativeEnum(RedisChangeStatusApplicationStatus); + +/** @internal */ +export const RedisChangeStatusApplicationStatus$outboundSchema: z.ZodNativeEnum< + typeof RedisChangeStatusApplicationStatus +> = RedisChangeStatusApplicationStatus$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RedisChangeStatusApplicationStatus$ { + /** @deprecated use `RedisChangeStatusApplicationStatus$inboundSchema` instead. */ + export const inboundSchema = RedisChangeStatusApplicationStatus$inboundSchema; + /** @deprecated use `RedisChangeStatusApplicationStatus$outboundSchema` instead. */ + export const outboundSchema = + RedisChangeStatusApplicationStatus$outboundSchema; +} + +/** @internal */ +export const RedisChangeStatusRequest$inboundSchema: z.ZodType< + RedisChangeStatusRequest, + z.ZodTypeDef, + unknown +> = z.object({ + redisId: z.string(), + applicationStatus: RedisChangeStatusApplicationStatus$inboundSchema, +}); + +/** @internal */ +export type RedisChangeStatusRequest$Outbound = { + redisId: string; + applicationStatus: string; +}; + +/** @internal */ +export const RedisChangeStatusRequest$outboundSchema: z.ZodType< + RedisChangeStatusRequest$Outbound, + z.ZodTypeDef, + RedisChangeStatusRequest +> = z.object({ + redisId: z.string(), + applicationStatus: RedisChangeStatusApplicationStatus$outboundSchema, +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RedisChangeStatusRequest$ { + /** @deprecated use `RedisChangeStatusRequest$inboundSchema` instead. */ + export const inboundSchema = RedisChangeStatusRequest$inboundSchema; + /** @deprecated use `RedisChangeStatusRequest$outboundSchema` instead. */ + export const outboundSchema = RedisChangeStatusRequest$outboundSchema; + /** @deprecated use `RedisChangeStatusRequest$Outbound` instead. */ + export type Outbound = RedisChangeStatusRequest$Outbound; +} + +export function redisChangeStatusRequestToJSON( + redisChangeStatusRequest: RedisChangeStatusRequest, +): string { + return JSON.stringify( + RedisChangeStatusRequest$outboundSchema.parse(redisChangeStatusRequest), + ); +} + +export function redisChangeStatusRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RedisChangeStatusRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RedisChangeStatusRequest' from JSON`, + ); +} diff --git a/src/models/operations/rediscreate.ts b/src/models/operations/rediscreate.ts new file mode 100644 index 0000000..5971191 --- /dev/null +++ b/src/models/operations/rediscreate.ts @@ -0,0 +1,90 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type RedisCreateRequest = { + name: string; + appName: string; + databasePassword: string; + dockerImage?: string | undefined; + projectId: string; + description?: string | null | undefined; + serverId?: string | null | undefined; +}; + +/** @internal */ +export const RedisCreateRequest$inboundSchema: z.ZodType< + RedisCreateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + appName: z.string(), + databasePassword: z.string(), + dockerImage: z.string().default("redis:8"), + projectId: z.string(), + description: z.nullable(z.string()).optional(), + serverId: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type RedisCreateRequest$Outbound = { + name: string; + appName: string; + databasePassword: string; + dockerImage: string; + projectId: string; + description?: string | null | undefined; + serverId?: string | null | undefined; +}; + +/** @internal */ +export const RedisCreateRequest$outboundSchema: z.ZodType< + RedisCreateRequest$Outbound, + z.ZodTypeDef, + RedisCreateRequest +> = z.object({ + name: z.string(), + appName: z.string(), + databasePassword: z.string(), + dockerImage: z.string().default("redis:8"), + projectId: z.string(), + description: z.nullable(z.string()).optional(), + serverId: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RedisCreateRequest$ { + /** @deprecated use `RedisCreateRequest$inboundSchema` instead. */ + export const inboundSchema = RedisCreateRequest$inboundSchema; + /** @deprecated use `RedisCreateRequest$outboundSchema` instead. */ + export const outboundSchema = RedisCreateRequest$outboundSchema; + /** @deprecated use `RedisCreateRequest$Outbound` instead. */ + export type Outbound = RedisCreateRequest$Outbound; +} + +export function redisCreateRequestToJSON( + redisCreateRequest: RedisCreateRequest, +): string { + return JSON.stringify( + RedisCreateRequest$outboundSchema.parse(redisCreateRequest), + ); +} + +export function redisCreateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RedisCreateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RedisCreateRequest' from JSON`, + ); +} diff --git a/src/models/operations/redisdeploy.ts b/src/models/operations/redisdeploy.ts new file mode 100644 index 0000000..bf0608d --- /dev/null +++ b/src/models/operations/redisdeploy.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type RedisDeployRequest = { + redisId: string; +}; + +/** @internal */ +export const RedisDeployRequest$inboundSchema: z.ZodType< + RedisDeployRequest, + z.ZodTypeDef, + unknown +> = z.object({ + redisId: z.string(), +}); + +/** @internal */ +export type RedisDeployRequest$Outbound = { + redisId: string; +}; + +/** @internal */ +export const RedisDeployRequest$outboundSchema: z.ZodType< + RedisDeployRequest$Outbound, + z.ZodTypeDef, + RedisDeployRequest +> = z.object({ + redisId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RedisDeployRequest$ { + /** @deprecated use `RedisDeployRequest$inboundSchema` instead. */ + export const inboundSchema = RedisDeployRequest$inboundSchema; + /** @deprecated use `RedisDeployRequest$outboundSchema` instead. */ + export const outboundSchema = RedisDeployRequest$outboundSchema; + /** @deprecated use `RedisDeployRequest$Outbound` instead. */ + export type Outbound = RedisDeployRequest$Outbound; +} + +export function redisDeployRequestToJSON( + redisDeployRequest: RedisDeployRequest, +): string { + return JSON.stringify( + RedisDeployRequest$outboundSchema.parse(redisDeployRequest), + ); +} + +export function redisDeployRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RedisDeployRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RedisDeployRequest' from JSON`, + ); +} diff --git a/src/models/operations/redisone.ts b/src/models/operations/redisone.ts new file mode 100644 index 0000000..9951e05 --- /dev/null +++ b/src/models/operations/redisone.ts @@ -0,0 +1,64 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type RedisOneRequest = { + redisId: string; +}; + +/** @internal */ +export const RedisOneRequest$inboundSchema: z.ZodType< + RedisOneRequest, + z.ZodTypeDef, + unknown +> = z.object({ + redisId: z.string(), +}); + +/** @internal */ +export type RedisOneRequest$Outbound = { + redisId: string; +}; + +/** @internal */ +export const RedisOneRequest$outboundSchema: z.ZodType< + RedisOneRequest$Outbound, + z.ZodTypeDef, + RedisOneRequest +> = z.object({ + redisId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RedisOneRequest$ { + /** @deprecated use `RedisOneRequest$inboundSchema` instead. */ + export const inboundSchema = RedisOneRequest$inboundSchema; + /** @deprecated use `RedisOneRequest$outboundSchema` instead. */ + export const outboundSchema = RedisOneRequest$outboundSchema; + /** @deprecated use `RedisOneRequest$Outbound` instead. */ + export type Outbound = RedisOneRequest$Outbound; +} + +export function redisOneRequestToJSON( + redisOneRequest: RedisOneRequest, +): string { + return JSON.stringify(RedisOneRequest$outboundSchema.parse(redisOneRequest)); +} + +export function redisOneRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RedisOneRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RedisOneRequest' from JSON`, + ); +} diff --git a/src/models/operations/redisreload.ts b/src/models/operations/redisreload.ts new file mode 100644 index 0000000..0f95cf3 --- /dev/null +++ b/src/models/operations/redisreload.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type RedisReloadRequest = { + redisId: string; + appName: string; +}; + +/** @internal */ +export const RedisReloadRequest$inboundSchema: z.ZodType< + RedisReloadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + redisId: z.string(), + appName: z.string(), +}); + +/** @internal */ +export type RedisReloadRequest$Outbound = { + redisId: string; + appName: string; +}; + +/** @internal */ +export const RedisReloadRequest$outboundSchema: z.ZodType< + RedisReloadRequest$Outbound, + z.ZodTypeDef, + RedisReloadRequest +> = z.object({ + redisId: z.string(), + appName: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RedisReloadRequest$ { + /** @deprecated use `RedisReloadRequest$inboundSchema` instead. */ + export const inboundSchema = RedisReloadRequest$inboundSchema; + /** @deprecated use `RedisReloadRequest$outboundSchema` instead. */ + export const outboundSchema = RedisReloadRequest$outboundSchema; + /** @deprecated use `RedisReloadRequest$Outbound` instead. */ + export type Outbound = RedisReloadRequest$Outbound; +} + +export function redisReloadRequestToJSON( + redisReloadRequest: RedisReloadRequest, +): string { + return JSON.stringify( + RedisReloadRequest$outboundSchema.parse(redisReloadRequest), + ); +} + +export function redisReloadRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RedisReloadRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RedisReloadRequest' from JSON`, + ); +} diff --git a/src/models/operations/redisremove.ts b/src/models/operations/redisremove.ts new file mode 100644 index 0000000..acfb5df --- /dev/null +++ b/src/models/operations/redisremove.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type RedisRemoveRequest = { + redisId: string; +}; + +/** @internal */ +export const RedisRemoveRequest$inboundSchema: z.ZodType< + RedisRemoveRequest, + z.ZodTypeDef, + unknown +> = z.object({ + redisId: z.string(), +}); + +/** @internal */ +export type RedisRemoveRequest$Outbound = { + redisId: string; +}; + +/** @internal */ +export const RedisRemoveRequest$outboundSchema: z.ZodType< + RedisRemoveRequest$Outbound, + z.ZodTypeDef, + RedisRemoveRequest +> = z.object({ + redisId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RedisRemoveRequest$ { + /** @deprecated use `RedisRemoveRequest$inboundSchema` instead. */ + export const inboundSchema = RedisRemoveRequest$inboundSchema; + /** @deprecated use `RedisRemoveRequest$outboundSchema` instead. */ + export const outboundSchema = RedisRemoveRequest$outboundSchema; + /** @deprecated use `RedisRemoveRequest$Outbound` instead. */ + export type Outbound = RedisRemoveRequest$Outbound; +} + +export function redisRemoveRequestToJSON( + redisRemoveRequest: RedisRemoveRequest, +): string { + return JSON.stringify( + RedisRemoveRequest$outboundSchema.parse(redisRemoveRequest), + ); +} + +export function redisRemoveRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RedisRemoveRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RedisRemoveRequest' from JSON`, + ); +} diff --git a/src/models/operations/redissaveenvironment.ts b/src/models/operations/redissaveenvironment.ts new file mode 100644 index 0000000..c0a6e85 --- /dev/null +++ b/src/models/operations/redissaveenvironment.ts @@ -0,0 +1,72 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type RedisSaveEnvironmentRequest = { + redisId: string; + env?: string | null | undefined; +}; + +/** @internal */ +export const RedisSaveEnvironmentRequest$inboundSchema: z.ZodType< + RedisSaveEnvironmentRequest, + z.ZodTypeDef, + unknown +> = z.object({ + redisId: z.string(), + env: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type RedisSaveEnvironmentRequest$Outbound = { + redisId: string; + env?: string | null | undefined; +}; + +/** @internal */ +export const RedisSaveEnvironmentRequest$outboundSchema: z.ZodType< + RedisSaveEnvironmentRequest$Outbound, + z.ZodTypeDef, + RedisSaveEnvironmentRequest +> = z.object({ + redisId: z.string(), + env: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RedisSaveEnvironmentRequest$ { + /** @deprecated use `RedisSaveEnvironmentRequest$inboundSchema` instead. */ + export const inboundSchema = RedisSaveEnvironmentRequest$inboundSchema; + /** @deprecated use `RedisSaveEnvironmentRequest$outboundSchema` instead. */ + export const outboundSchema = RedisSaveEnvironmentRequest$outboundSchema; + /** @deprecated use `RedisSaveEnvironmentRequest$Outbound` instead. */ + export type Outbound = RedisSaveEnvironmentRequest$Outbound; +} + +export function redisSaveEnvironmentRequestToJSON( + redisSaveEnvironmentRequest: RedisSaveEnvironmentRequest, +): string { + return JSON.stringify( + RedisSaveEnvironmentRequest$outboundSchema.parse( + redisSaveEnvironmentRequest, + ), + ); +} + +export function redisSaveEnvironmentRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RedisSaveEnvironmentRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RedisSaveEnvironmentRequest' from JSON`, + ); +} diff --git a/src/models/operations/redissaveexternalport.ts b/src/models/operations/redissaveexternalport.ts new file mode 100644 index 0000000..22d57a9 --- /dev/null +++ b/src/models/operations/redissaveexternalport.ts @@ -0,0 +1,72 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type RedisSaveExternalPortRequest = { + redisId: string; + externalPort: number | null; +}; + +/** @internal */ +export const RedisSaveExternalPortRequest$inboundSchema: z.ZodType< + RedisSaveExternalPortRequest, + z.ZodTypeDef, + unknown +> = z.object({ + redisId: z.string(), + externalPort: z.nullable(z.number()), +}); + +/** @internal */ +export type RedisSaveExternalPortRequest$Outbound = { + redisId: string; + externalPort: number | null; +}; + +/** @internal */ +export const RedisSaveExternalPortRequest$outboundSchema: z.ZodType< + RedisSaveExternalPortRequest$Outbound, + z.ZodTypeDef, + RedisSaveExternalPortRequest +> = z.object({ + redisId: z.string(), + externalPort: z.nullable(z.number()), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RedisSaveExternalPortRequest$ { + /** @deprecated use `RedisSaveExternalPortRequest$inboundSchema` instead. */ + export const inboundSchema = RedisSaveExternalPortRequest$inboundSchema; + /** @deprecated use `RedisSaveExternalPortRequest$outboundSchema` instead. */ + export const outboundSchema = RedisSaveExternalPortRequest$outboundSchema; + /** @deprecated use `RedisSaveExternalPortRequest$Outbound` instead. */ + export type Outbound = RedisSaveExternalPortRequest$Outbound; +} + +export function redisSaveExternalPortRequestToJSON( + redisSaveExternalPortRequest: RedisSaveExternalPortRequest, +): string { + return JSON.stringify( + RedisSaveExternalPortRequest$outboundSchema.parse( + redisSaveExternalPortRequest, + ), + ); +} + +export function redisSaveExternalPortRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RedisSaveExternalPortRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RedisSaveExternalPortRequest' from JSON`, + ); +} diff --git a/src/models/operations/redisstart.ts b/src/models/operations/redisstart.ts new file mode 100644 index 0000000..aecf0e1 --- /dev/null +++ b/src/models/operations/redisstart.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type RedisStartRequest = { + redisId: string; +}; + +/** @internal */ +export const RedisStartRequest$inboundSchema: z.ZodType< + RedisStartRequest, + z.ZodTypeDef, + unknown +> = z.object({ + redisId: z.string(), +}); + +/** @internal */ +export type RedisStartRequest$Outbound = { + redisId: string; +}; + +/** @internal */ +export const RedisStartRequest$outboundSchema: z.ZodType< + RedisStartRequest$Outbound, + z.ZodTypeDef, + RedisStartRequest +> = z.object({ + redisId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RedisStartRequest$ { + /** @deprecated use `RedisStartRequest$inboundSchema` instead. */ + export const inboundSchema = RedisStartRequest$inboundSchema; + /** @deprecated use `RedisStartRequest$outboundSchema` instead. */ + export const outboundSchema = RedisStartRequest$outboundSchema; + /** @deprecated use `RedisStartRequest$Outbound` instead. */ + export type Outbound = RedisStartRequest$Outbound; +} + +export function redisStartRequestToJSON( + redisStartRequest: RedisStartRequest, +): string { + return JSON.stringify( + RedisStartRequest$outboundSchema.parse(redisStartRequest), + ); +} + +export function redisStartRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RedisStartRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RedisStartRequest' from JSON`, + ); +} diff --git a/src/models/operations/redisstop.ts b/src/models/operations/redisstop.ts new file mode 100644 index 0000000..e4f7af8 --- /dev/null +++ b/src/models/operations/redisstop.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type RedisStopRequest = { + redisId: string; +}; + +/** @internal */ +export const RedisStopRequest$inboundSchema: z.ZodType< + RedisStopRequest, + z.ZodTypeDef, + unknown +> = z.object({ + redisId: z.string(), +}); + +/** @internal */ +export type RedisStopRequest$Outbound = { + redisId: string; +}; + +/** @internal */ +export const RedisStopRequest$outboundSchema: z.ZodType< + RedisStopRequest$Outbound, + z.ZodTypeDef, + RedisStopRequest +> = z.object({ + redisId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RedisStopRequest$ { + /** @deprecated use `RedisStopRequest$inboundSchema` instead. */ + export const inboundSchema = RedisStopRequest$inboundSchema; + /** @deprecated use `RedisStopRequest$outboundSchema` instead. */ + export const outboundSchema = RedisStopRequest$outboundSchema; + /** @deprecated use `RedisStopRequest$Outbound` instead. */ + export type Outbound = RedisStopRequest$Outbound; +} + +export function redisStopRequestToJSON( + redisStopRequest: RedisStopRequest, +): string { + return JSON.stringify( + RedisStopRequest$outboundSchema.parse(redisStopRequest), + ); +} + +export function redisStopRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RedisStopRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RedisStopRequest' from JSON`, + ); +} diff --git a/src/models/operations/redisupdate.ts b/src/models/operations/redisupdate.ts new file mode 100644 index 0000000..b949eb1 --- /dev/null +++ b/src/models/operations/redisupdate.ts @@ -0,0 +1,158 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const RedisUpdateApplicationStatus = { + Idle: "idle", + Running: "running", + Done: "done", + Error: "error", +} as const; +export type RedisUpdateApplicationStatus = ClosedEnum< + typeof RedisUpdateApplicationStatus +>; + +export type RedisUpdateRequest = { + redisId: string; + name?: string | undefined; + appName?: string | undefined; + description?: string | null | undefined; + databasePassword?: string | undefined; + dockerImage?: string | undefined; + command?: string | null | undefined; + env?: string | null | undefined; + memoryReservation?: number | null | undefined; + memoryLimit?: number | null | undefined; + cpuReservation?: number | null | undefined; + cpuLimit?: number | null | undefined; + externalPort?: number | null | undefined; + createdAt?: string | undefined; + applicationStatus?: RedisUpdateApplicationStatus | undefined; + projectId?: string | undefined; +}; + +/** @internal */ +export const RedisUpdateApplicationStatus$inboundSchema: z.ZodNativeEnum< + typeof RedisUpdateApplicationStatus +> = z.nativeEnum(RedisUpdateApplicationStatus); + +/** @internal */ +export const RedisUpdateApplicationStatus$outboundSchema: z.ZodNativeEnum< + typeof RedisUpdateApplicationStatus +> = RedisUpdateApplicationStatus$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RedisUpdateApplicationStatus$ { + /** @deprecated use `RedisUpdateApplicationStatus$inboundSchema` instead. */ + export const inboundSchema = RedisUpdateApplicationStatus$inboundSchema; + /** @deprecated use `RedisUpdateApplicationStatus$outboundSchema` instead. */ + export const outboundSchema = RedisUpdateApplicationStatus$outboundSchema; +} + +/** @internal */ +export const RedisUpdateRequest$inboundSchema: z.ZodType< + RedisUpdateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + redisId: z.string(), + name: z.string().optional(), + appName: z.string().optional(), + description: z.nullable(z.string()).optional(), + databasePassword: z.string().optional(), + dockerImage: z.string().default("redis:8"), + command: z.nullable(z.string()).optional(), + env: z.nullable(z.string()).optional(), + memoryReservation: z.nullable(z.number()).optional(), + memoryLimit: z.nullable(z.number()).optional(), + cpuReservation: z.nullable(z.number()).optional(), + cpuLimit: z.nullable(z.number()).optional(), + externalPort: z.nullable(z.number()).optional(), + createdAt: z.string().optional(), + applicationStatus: RedisUpdateApplicationStatus$inboundSchema.optional(), + projectId: z.string().optional(), +}); + +/** @internal */ +export type RedisUpdateRequest$Outbound = { + redisId: string; + name?: string | undefined; + appName?: string | undefined; + description?: string | null | undefined; + databasePassword?: string | undefined; + dockerImage: string; + command?: string | null | undefined; + env?: string | null | undefined; + memoryReservation?: number | null | undefined; + memoryLimit?: number | null | undefined; + cpuReservation?: number | null | undefined; + cpuLimit?: number | null | undefined; + externalPort?: number | null | undefined; + createdAt?: string | undefined; + applicationStatus?: string | undefined; + projectId?: string | undefined; +}; + +/** @internal */ +export const RedisUpdateRequest$outboundSchema: z.ZodType< + RedisUpdateRequest$Outbound, + z.ZodTypeDef, + RedisUpdateRequest +> = z.object({ + redisId: z.string(), + name: z.string().optional(), + appName: z.string().optional(), + description: z.nullable(z.string()).optional(), + databasePassword: z.string().optional(), + dockerImage: z.string().default("redis:8"), + command: z.nullable(z.string()).optional(), + env: z.nullable(z.string()).optional(), + memoryReservation: z.nullable(z.number()).optional(), + memoryLimit: z.nullable(z.number()).optional(), + cpuReservation: z.nullable(z.number()).optional(), + cpuLimit: z.nullable(z.number()).optional(), + externalPort: z.nullable(z.number()).optional(), + createdAt: z.string().optional(), + applicationStatus: RedisUpdateApplicationStatus$outboundSchema.optional(), + projectId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RedisUpdateRequest$ { + /** @deprecated use `RedisUpdateRequest$inboundSchema` instead. */ + export const inboundSchema = RedisUpdateRequest$inboundSchema; + /** @deprecated use `RedisUpdateRequest$outboundSchema` instead. */ + export const outboundSchema = RedisUpdateRequest$outboundSchema; + /** @deprecated use `RedisUpdateRequest$Outbound` instead. */ + export type Outbound = RedisUpdateRequest$Outbound; +} + +export function redisUpdateRequestToJSON( + redisUpdateRequest: RedisUpdateRequest, +): string { + return JSON.stringify( + RedisUpdateRequest$outboundSchema.parse(redisUpdateRequest), + ); +} + +export function redisUpdateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RedisUpdateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RedisUpdateRequest' from JSON`, + ); +} diff --git a/src/models/operations/registrycreate.ts b/src/models/operations/registrycreate.ts new file mode 100644 index 0000000..43685be --- /dev/null +++ b/src/models/operations/registrycreate.ts @@ -0,0 +1,119 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const RegistryCreateRegistryType = { + Cloud: "cloud", +} as const; +export type RegistryCreateRegistryType = ClosedEnum< + typeof RegistryCreateRegistryType +>; + +export type RegistryCreateRequest = { + registryName: string; + username: string; + password: string; + registryUrl: string; + registryType: RegistryCreateRegistryType; + imagePrefix: string | null; + serverId?: string | undefined; +}; + +/** @internal */ +export const RegistryCreateRegistryType$inboundSchema: z.ZodNativeEnum< + typeof RegistryCreateRegistryType +> = z.nativeEnum(RegistryCreateRegistryType); + +/** @internal */ +export const RegistryCreateRegistryType$outboundSchema: z.ZodNativeEnum< + typeof RegistryCreateRegistryType +> = RegistryCreateRegistryType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RegistryCreateRegistryType$ { + /** @deprecated use `RegistryCreateRegistryType$inboundSchema` instead. */ + export const inboundSchema = RegistryCreateRegistryType$inboundSchema; + /** @deprecated use `RegistryCreateRegistryType$outboundSchema` instead. */ + export const outboundSchema = RegistryCreateRegistryType$outboundSchema; +} + +/** @internal */ +export const RegistryCreateRequest$inboundSchema: z.ZodType< + RegistryCreateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + registryName: z.string(), + username: z.string(), + password: z.string(), + registryUrl: z.string(), + registryType: RegistryCreateRegistryType$inboundSchema, + imagePrefix: z.nullable(z.string()), + serverId: z.string().optional(), +}); + +/** @internal */ +export type RegistryCreateRequest$Outbound = { + registryName: string; + username: string; + password: string; + registryUrl: string; + registryType: string; + imagePrefix: string | null; + serverId?: string | undefined; +}; + +/** @internal */ +export const RegistryCreateRequest$outboundSchema: z.ZodType< + RegistryCreateRequest$Outbound, + z.ZodTypeDef, + RegistryCreateRequest +> = z.object({ + registryName: z.string(), + username: z.string(), + password: z.string(), + registryUrl: z.string(), + registryType: RegistryCreateRegistryType$outboundSchema, + imagePrefix: z.nullable(z.string()), + serverId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RegistryCreateRequest$ { + /** @deprecated use `RegistryCreateRequest$inboundSchema` instead. */ + export const inboundSchema = RegistryCreateRequest$inboundSchema; + /** @deprecated use `RegistryCreateRequest$outboundSchema` instead. */ + export const outboundSchema = RegistryCreateRequest$outboundSchema; + /** @deprecated use `RegistryCreateRequest$Outbound` instead. */ + export type Outbound = RegistryCreateRequest$Outbound; +} + +export function registryCreateRequestToJSON( + registryCreateRequest: RegistryCreateRequest, +): string { + return JSON.stringify( + RegistryCreateRequest$outboundSchema.parse(registryCreateRequest), + ); +} + +export function registryCreateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RegistryCreateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RegistryCreateRequest' from JSON`, + ); +} diff --git a/src/models/operations/registryone.ts b/src/models/operations/registryone.ts new file mode 100644 index 0000000..ff63a2e --- /dev/null +++ b/src/models/operations/registryone.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type RegistryOneRequest = { + registryId: string; +}; + +/** @internal */ +export const RegistryOneRequest$inboundSchema: z.ZodType< + RegistryOneRequest, + z.ZodTypeDef, + unknown +> = z.object({ + registryId: z.string(), +}); + +/** @internal */ +export type RegistryOneRequest$Outbound = { + registryId: string; +}; + +/** @internal */ +export const RegistryOneRequest$outboundSchema: z.ZodType< + RegistryOneRequest$Outbound, + z.ZodTypeDef, + RegistryOneRequest +> = z.object({ + registryId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RegistryOneRequest$ { + /** @deprecated use `RegistryOneRequest$inboundSchema` instead. */ + export const inboundSchema = RegistryOneRequest$inboundSchema; + /** @deprecated use `RegistryOneRequest$outboundSchema` instead. */ + export const outboundSchema = RegistryOneRequest$outboundSchema; + /** @deprecated use `RegistryOneRequest$Outbound` instead. */ + export type Outbound = RegistryOneRequest$Outbound; +} + +export function registryOneRequestToJSON( + registryOneRequest: RegistryOneRequest, +): string { + return JSON.stringify( + RegistryOneRequest$outboundSchema.parse(registryOneRequest), + ); +} + +export function registryOneRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RegistryOneRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RegistryOneRequest' from JSON`, + ); +} diff --git a/src/models/operations/registryremove.ts b/src/models/operations/registryremove.ts new file mode 100644 index 0000000..7bb8a4f --- /dev/null +++ b/src/models/operations/registryremove.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type RegistryRemoveRequest = { + registryId: string; +}; + +/** @internal */ +export const RegistryRemoveRequest$inboundSchema: z.ZodType< + RegistryRemoveRequest, + z.ZodTypeDef, + unknown +> = z.object({ + registryId: z.string(), +}); + +/** @internal */ +export type RegistryRemoveRequest$Outbound = { + registryId: string; +}; + +/** @internal */ +export const RegistryRemoveRequest$outboundSchema: z.ZodType< + RegistryRemoveRequest$Outbound, + z.ZodTypeDef, + RegistryRemoveRequest +> = z.object({ + registryId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RegistryRemoveRequest$ { + /** @deprecated use `RegistryRemoveRequest$inboundSchema` instead. */ + export const inboundSchema = RegistryRemoveRequest$inboundSchema; + /** @deprecated use `RegistryRemoveRequest$outboundSchema` instead. */ + export const outboundSchema = RegistryRemoveRequest$outboundSchema; + /** @deprecated use `RegistryRemoveRequest$Outbound` instead. */ + export type Outbound = RegistryRemoveRequest$Outbound; +} + +export function registryRemoveRequestToJSON( + registryRemoveRequest: RegistryRemoveRequest, +): string { + return JSON.stringify( + RegistryRemoveRequest$outboundSchema.parse(registryRemoveRequest), + ); +} + +export function registryRemoveRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RegistryRemoveRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RegistryRemoveRequest' from JSON`, + ); +} diff --git a/src/models/operations/registrytestregistry.ts b/src/models/operations/registrytestregistry.ts new file mode 100644 index 0000000..29e9917 --- /dev/null +++ b/src/models/operations/registrytestregistry.ts @@ -0,0 +1,121 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const RegistryTestRegistryRegistryType = { + Cloud: "cloud", +} as const; +export type RegistryTestRegistryRegistryType = ClosedEnum< + typeof RegistryTestRegistryRegistryType +>; + +export type RegistryTestRegistryRequest = { + registryName: string; + username: string; + password: string; + registryUrl: string; + registryType: RegistryTestRegistryRegistryType; + imagePrefix?: string | null | undefined; + serverId?: string | undefined; +}; + +/** @internal */ +export const RegistryTestRegistryRegistryType$inboundSchema: z.ZodNativeEnum< + typeof RegistryTestRegistryRegistryType +> = z.nativeEnum(RegistryTestRegistryRegistryType); + +/** @internal */ +export const RegistryTestRegistryRegistryType$outboundSchema: z.ZodNativeEnum< + typeof RegistryTestRegistryRegistryType +> = RegistryTestRegistryRegistryType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RegistryTestRegistryRegistryType$ { + /** @deprecated use `RegistryTestRegistryRegistryType$inboundSchema` instead. */ + export const inboundSchema = RegistryTestRegistryRegistryType$inboundSchema; + /** @deprecated use `RegistryTestRegistryRegistryType$outboundSchema` instead. */ + export const outboundSchema = RegistryTestRegistryRegistryType$outboundSchema; +} + +/** @internal */ +export const RegistryTestRegistryRequest$inboundSchema: z.ZodType< + RegistryTestRegistryRequest, + z.ZodTypeDef, + unknown +> = z.object({ + registryName: z.string(), + username: z.string(), + password: z.string(), + registryUrl: z.string(), + registryType: RegistryTestRegistryRegistryType$inboundSchema, + imagePrefix: z.nullable(z.string()).optional(), + serverId: z.string().optional(), +}); + +/** @internal */ +export type RegistryTestRegistryRequest$Outbound = { + registryName: string; + username: string; + password: string; + registryUrl: string; + registryType: string; + imagePrefix?: string | null | undefined; + serverId?: string | undefined; +}; + +/** @internal */ +export const RegistryTestRegistryRequest$outboundSchema: z.ZodType< + RegistryTestRegistryRequest$Outbound, + z.ZodTypeDef, + RegistryTestRegistryRequest +> = z.object({ + registryName: z.string(), + username: z.string(), + password: z.string(), + registryUrl: z.string(), + registryType: RegistryTestRegistryRegistryType$outboundSchema, + imagePrefix: z.nullable(z.string()).optional(), + serverId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RegistryTestRegistryRequest$ { + /** @deprecated use `RegistryTestRegistryRequest$inboundSchema` instead. */ + export const inboundSchema = RegistryTestRegistryRequest$inboundSchema; + /** @deprecated use `RegistryTestRegistryRequest$outboundSchema` instead. */ + export const outboundSchema = RegistryTestRegistryRequest$outboundSchema; + /** @deprecated use `RegistryTestRegistryRequest$Outbound` instead. */ + export type Outbound = RegistryTestRegistryRequest$Outbound; +} + +export function registryTestRegistryRequestToJSON( + registryTestRegistryRequest: RegistryTestRegistryRequest, +): string { + return JSON.stringify( + RegistryTestRegistryRequest$outboundSchema.parse( + registryTestRegistryRequest, + ), + ); +} + +export function registryTestRegistryRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RegistryTestRegistryRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RegistryTestRegistryRequest' from JSON`, + ); +} diff --git a/src/models/operations/registryupdate.ts b/src/models/operations/registryupdate.ts new file mode 100644 index 0000000..c9c304d --- /dev/null +++ b/src/models/operations/registryupdate.ts @@ -0,0 +1,131 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const RegistryUpdateRegistryType = { + Cloud: "cloud", +} as const; +export type RegistryUpdateRegistryType = ClosedEnum< + typeof RegistryUpdateRegistryType +>; + +export type RegistryUpdateRequest = { + registryId: string; + registryName?: string | undefined; + imagePrefix?: string | null | undefined; + username?: string | undefined; + password?: string | undefined; + registryUrl?: string | undefined; + createdAt?: string | undefined; + registryType?: RegistryUpdateRegistryType | undefined; + adminId?: string | undefined; + serverId?: string | undefined; +}; + +/** @internal */ +export const RegistryUpdateRegistryType$inboundSchema: z.ZodNativeEnum< + typeof RegistryUpdateRegistryType +> = z.nativeEnum(RegistryUpdateRegistryType); + +/** @internal */ +export const RegistryUpdateRegistryType$outboundSchema: z.ZodNativeEnum< + typeof RegistryUpdateRegistryType +> = RegistryUpdateRegistryType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RegistryUpdateRegistryType$ { + /** @deprecated use `RegistryUpdateRegistryType$inboundSchema` instead. */ + export const inboundSchema = RegistryUpdateRegistryType$inboundSchema; + /** @deprecated use `RegistryUpdateRegistryType$outboundSchema` instead. */ + export const outboundSchema = RegistryUpdateRegistryType$outboundSchema; +} + +/** @internal */ +export const RegistryUpdateRequest$inboundSchema: z.ZodType< + RegistryUpdateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + registryId: z.string(), + registryName: z.string().optional(), + imagePrefix: z.nullable(z.string()).optional(), + username: z.string().optional(), + password: z.string().optional(), + registryUrl: z.string().optional(), + createdAt: z.string().optional(), + registryType: RegistryUpdateRegistryType$inboundSchema.optional(), + adminId: z.string().optional(), + serverId: z.string().optional(), +}); + +/** @internal */ +export type RegistryUpdateRequest$Outbound = { + registryId: string; + registryName?: string | undefined; + imagePrefix?: string | null | undefined; + username?: string | undefined; + password?: string | undefined; + registryUrl?: string | undefined; + createdAt?: string | undefined; + registryType?: string | undefined; + adminId?: string | undefined; + serverId?: string | undefined; +}; + +/** @internal */ +export const RegistryUpdateRequest$outboundSchema: z.ZodType< + RegistryUpdateRequest$Outbound, + z.ZodTypeDef, + RegistryUpdateRequest +> = z.object({ + registryId: z.string(), + registryName: z.string().optional(), + imagePrefix: z.nullable(z.string()).optional(), + username: z.string().optional(), + password: z.string().optional(), + registryUrl: z.string().optional(), + createdAt: z.string().optional(), + registryType: RegistryUpdateRegistryType$outboundSchema.optional(), + adminId: z.string().optional(), + serverId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RegistryUpdateRequest$ { + /** @deprecated use `RegistryUpdateRequest$inboundSchema` instead. */ + export const inboundSchema = RegistryUpdateRequest$inboundSchema; + /** @deprecated use `RegistryUpdateRequest$outboundSchema` instead. */ + export const outboundSchema = RegistryUpdateRequest$outboundSchema; + /** @deprecated use `RegistryUpdateRequest$Outbound` instead. */ + export type Outbound = RegistryUpdateRequest$Outbound; +} + +export function registryUpdateRequestToJSON( + registryUpdateRequest: RegistryUpdateRequest, +): string { + return JSON.stringify( + RegistryUpdateRequest$outboundSchema.parse(registryUpdateRequest), + ); +} + +export function registryUpdateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RegistryUpdateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RegistryUpdateRequest' from JSON`, + ); +} diff --git a/src/models/operations/securitycreate.ts b/src/models/operations/securitycreate.ts new file mode 100644 index 0000000..972b0f2 --- /dev/null +++ b/src/models/operations/securitycreate.ts @@ -0,0 +1,74 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type SecurityCreateRequest = { + applicationId: string; + username: string; + password: string; +}; + +/** @internal */ +export const SecurityCreateRequest$inboundSchema: z.ZodType< + SecurityCreateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + applicationId: z.string(), + username: z.string(), + password: z.string(), +}); + +/** @internal */ +export type SecurityCreateRequest$Outbound = { + applicationId: string; + username: string; + password: string; +}; + +/** @internal */ +export const SecurityCreateRequest$outboundSchema: z.ZodType< + SecurityCreateRequest$Outbound, + z.ZodTypeDef, + SecurityCreateRequest +> = z.object({ + applicationId: z.string(), + username: z.string(), + password: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SecurityCreateRequest$ { + /** @deprecated use `SecurityCreateRequest$inboundSchema` instead. */ + export const inboundSchema = SecurityCreateRequest$inboundSchema; + /** @deprecated use `SecurityCreateRequest$outboundSchema` instead. */ + export const outboundSchema = SecurityCreateRequest$outboundSchema; + /** @deprecated use `SecurityCreateRequest$Outbound` instead. */ + export type Outbound = SecurityCreateRequest$Outbound; +} + +export function securityCreateRequestToJSON( + securityCreateRequest: SecurityCreateRequest, +): string { + return JSON.stringify( + SecurityCreateRequest$outboundSchema.parse(securityCreateRequest), + ); +} + +export function securityCreateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SecurityCreateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SecurityCreateRequest' from JSON`, + ); +} diff --git a/src/models/operations/securitydelete.ts b/src/models/operations/securitydelete.ts new file mode 100644 index 0000000..bf0505c --- /dev/null +++ b/src/models/operations/securitydelete.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type SecurityDeleteRequest = { + securityId: string; +}; + +/** @internal */ +export const SecurityDeleteRequest$inboundSchema: z.ZodType< + SecurityDeleteRequest, + z.ZodTypeDef, + unknown +> = z.object({ + securityId: z.string(), +}); + +/** @internal */ +export type SecurityDeleteRequest$Outbound = { + securityId: string; +}; + +/** @internal */ +export const SecurityDeleteRequest$outboundSchema: z.ZodType< + SecurityDeleteRequest$Outbound, + z.ZodTypeDef, + SecurityDeleteRequest +> = z.object({ + securityId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SecurityDeleteRequest$ { + /** @deprecated use `SecurityDeleteRequest$inboundSchema` instead. */ + export const inboundSchema = SecurityDeleteRequest$inboundSchema; + /** @deprecated use `SecurityDeleteRequest$outboundSchema` instead. */ + export const outboundSchema = SecurityDeleteRequest$outboundSchema; + /** @deprecated use `SecurityDeleteRequest$Outbound` instead. */ + export type Outbound = SecurityDeleteRequest$Outbound; +} + +export function securityDeleteRequestToJSON( + securityDeleteRequest: SecurityDeleteRequest, +): string { + return JSON.stringify( + SecurityDeleteRequest$outboundSchema.parse(securityDeleteRequest), + ); +} + +export function securityDeleteRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SecurityDeleteRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SecurityDeleteRequest' from JSON`, + ); +} diff --git a/src/models/operations/securityone.ts b/src/models/operations/securityone.ts new file mode 100644 index 0000000..24102e5 --- /dev/null +++ b/src/models/operations/securityone.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type SecurityOneRequest = { + securityId: string; +}; + +/** @internal */ +export const SecurityOneRequest$inboundSchema: z.ZodType< + SecurityOneRequest, + z.ZodTypeDef, + unknown +> = z.object({ + securityId: z.string(), +}); + +/** @internal */ +export type SecurityOneRequest$Outbound = { + securityId: string; +}; + +/** @internal */ +export const SecurityOneRequest$outboundSchema: z.ZodType< + SecurityOneRequest$Outbound, + z.ZodTypeDef, + SecurityOneRequest +> = z.object({ + securityId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SecurityOneRequest$ { + /** @deprecated use `SecurityOneRequest$inboundSchema` instead. */ + export const inboundSchema = SecurityOneRequest$inboundSchema; + /** @deprecated use `SecurityOneRequest$outboundSchema` instead. */ + export const outboundSchema = SecurityOneRequest$outboundSchema; + /** @deprecated use `SecurityOneRequest$Outbound` instead. */ + export type Outbound = SecurityOneRequest$Outbound; +} + +export function securityOneRequestToJSON( + securityOneRequest: SecurityOneRequest, +): string { + return JSON.stringify( + SecurityOneRequest$outboundSchema.parse(securityOneRequest), + ); +} + +export function securityOneRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SecurityOneRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SecurityOneRequest' from JSON`, + ); +} diff --git a/src/models/operations/securityupdate.ts b/src/models/operations/securityupdate.ts new file mode 100644 index 0000000..e31a0a2 --- /dev/null +++ b/src/models/operations/securityupdate.ts @@ -0,0 +1,74 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type SecurityUpdateRequest = { + securityId: string; + username: string; + password: string; +}; + +/** @internal */ +export const SecurityUpdateRequest$inboundSchema: z.ZodType< + SecurityUpdateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + securityId: z.string(), + username: z.string(), + password: z.string(), +}); + +/** @internal */ +export type SecurityUpdateRequest$Outbound = { + securityId: string; + username: string; + password: string; +}; + +/** @internal */ +export const SecurityUpdateRequest$outboundSchema: z.ZodType< + SecurityUpdateRequest$Outbound, + z.ZodTypeDef, + SecurityUpdateRequest +> = z.object({ + securityId: z.string(), + username: z.string(), + password: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SecurityUpdateRequest$ { + /** @deprecated use `SecurityUpdateRequest$inboundSchema` instead. */ + export const inboundSchema = SecurityUpdateRequest$inboundSchema; + /** @deprecated use `SecurityUpdateRequest$outboundSchema` instead. */ + export const outboundSchema = SecurityUpdateRequest$outboundSchema; + /** @deprecated use `SecurityUpdateRequest$Outbound` instead. */ + export type Outbound = SecurityUpdateRequest$Outbound; +} + +export function securityUpdateRequestToJSON( + securityUpdateRequest: SecurityUpdateRequest, +): string { + return JSON.stringify( + SecurityUpdateRequest$outboundSchema.parse(securityUpdateRequest), + ); +} + +export function securityUpdateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SecurityUpdateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SecurityUpdateRequest' from JSON`, + ); +} diff --git a/src/models/operations/servercreate.ts b/src/models/operations/servercreate.ts new file mode 100644 index 0000000..034fca4 --- /dev/null +++ b/src/models/operations/servercreate.ts @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ServerCreateRequest = { + name: string; + description?: string | null | undefined; + ipAddress: string; + port: number; + username: string; + sshKeyId: string | null; +}; + +/** @internal */ +export const ServerCreateRequest$inboundSchema: z.ZodType< + ServerCreateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + description: z.nullable(z.string()).optional(), + ipAddress: z.string(), + port: z.number(), + username: z.string(), + sshKeyId: z.nullable(z.string()), +}); + +/** @internal */ +export type ServerCreateRequest$Outbound = { + name: string; + description?: string | null | undefined; + ipAddress: string; + port: number; + username: string; + sshKeyId: string | null; +}; + +/** @internal */ +export const ServerCreateRequest$outboundSchema: z.ZodType< + ServerCreateRequest$Outbound, + z.ZodTypeDef, + ServerCreateRequest +> = z.object({ + name: z.string(), + description: z.nullable(z.string()).optional(), + ipAddress: z.string(), + port: z.number(), + username: z.string(), + sshKeyId: z.nullable(z.string()), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ServerCreateRequest$ { + /** @deprecated use `ServerCreateRequest$inboundSchema` instead. */ + export const inboundSchema = ServerCreateRequest$inboundSchema; + /** @deprecated use `ServerCreateRequest$outboundSchema` instead. */ + export const outboundSchema = ServerCreateRequest$outboundSchema; + /** @deprecated use `ServerCreateRequest$Outbound` instead. */ + export type Outbound = ServerCreateRequest$Outbound; +} + +export function serverCreateRequestToJSON( + serverCreateRequest: ServerCreateRequest, +): string { + return JSON.stringify( + ServerCreateRequest$outboundSchema.parse(serverCreateRequest), + ); +} + +export function serverCreateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ServerCreateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ServerCreateRequest' from JSON`, + ); +} diff --git a/src/models/operations/serverone.ts b/src/models/operations/serverone.ts new file mode 100644 index 0000000..1d46bd9 --- /dev/null +++ b/src/models/operations/serverone.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ServerOneRequest = { + serverId: string; +}; + +/** @internal */ +export const ServerOneRequest$inboundSchema: z.ZodType< + ServerOneRequest, + z.ZodTypeDef, + unknown +> = z.object({ + serverId: z.string(), +}); + +/** @internal */ +export type ServerOneRequest$Outbound = { + serverId: string; +}; + +/** @internal */ +export const ServerOneRequest$outboundSchema: z.ZodType< + ServerOneRequest$Outbound, + z.ZodTypeDef, + ServerOneRequest +> = z.object({ + serverId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ServerOneRequest$ { + /** @deprecated use `ServerOneRequest$inboundSchema` instead. */ + export const inboundSchema = ServerOneRequest$inboundSchema; + /** @deprecated use `ServerOneRequest$outboundSchema` instead. */ + export const outboundSchema = ServerOneRequest$outboundSchema; + /** @deprecated use `ServerOneRequest$Outbound` instead. */ + export type Outbound = ServerOneRequest$Outbound; +} + +export function serverOneRequestToJSON( + serverOneRequest: ServerOneRequest, +): string { + return JSON.stringify( + ServerOneRequest$outboundSchema.parse(serverOneRequest), + ); +} + +export function serverOneRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ServerOneRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ServerOneRequest' from JSON`, + ); +} diff --git a/src/models/operations/serverremove.ts b/src/models/operations/serverremove.ts new file mode 100644 index 0000000..3feb20f --- /dev/null +++ b/src/models/operations/serverremove.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ServerRemoveRequest = { + serverId: string; +}; + +/** @internal */ +export const ServerRemoveRequest$inboundSchema: z.ZodType< + ServerRemoveRequest, + z.ZodTypeDef, + unknown +> = z.object({ + serverId: z.string(), +}); + +/** @internal */ +export type ServerRemoveRequest$Outbound = { + serverId: string; +}; + +/** @internal */ +export const ServerRemoveRequest$outboundSchema: z.ZodType< + ServerRemoveRequest$Outbound, + z.ZodTypeDef, + ServerRemoveRequest +> = z.object({ + serverId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ServerRemoveRequest$ { + /** @deprecated use `ServerRemoveRequest$inboundSchema` instead. */ + export const inboundSchema = ServerRemoveRequest$inboundSchema; + /** @deprecated use `ServerRemoveRequest$outboundSchema` instead. */ + export const outboundSchema = ServerRemoveRequest$outboundSchema; + /** @deprecated use `ServerRemoveRequest$Outbound` instead. */ + export type Outbound = ServerRemoveRequest$Outbound; +} + +export function serverRemoveRequestToJSON( + serverRemoveRequest: ServerRemoveRequest, +): string { + return JSON.stringify( + ServerRemoveRequest$outboundSchema.parse(serverRemoveRequest), + ); +} + +export function serverRemoveRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ServerRemoveRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ServerRemoveRequest' from JSON`, + ); +} diff --git a/src/models/operations/serversetup.ts b/src/models/operations/serversetup.ts new file mode 100644 index 0000000..f007a10 --- /dev/null +++ b/src/models/operations/serversetup.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ServerSetupRequest = { + serverId: string; +}; + +/** @internal */ +export const ServerSetupRequest$inboundSchema: z.ZodType< + ServerSetupRequest, + z.ZodTypeDef, + unknown +> = z.object({ + serverId: z.string(), +}); + +/** @internal */ +export type ServerSetupRequest$Outbound = { + serverId: string; +}; + +/** @internal */ +export const ServerSetupRequest$outboundSchema: z.ZodType< + ServerSetupRequest$Outbound, + z.ZodTypeDef, + ServerSetupRequest +> = z.object({ + serverId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ServerSetupRequest$ { + /** @deprecated use `ServerSetupRequest$inboundSchema` instead. */ + export const inboundSchema = ServerSetupRequest$inboundSchema; + /** @deprecated use `ServerSetupRequest$outboundSchema` instead. */ + export const outboundSchema = ServerSetupRequest$outboundSchema; + /** @deprecated use `ServerSetupRequest$Outbound` instead. */ + export type Outbound = ServerSetupRequest$Outbound; +} + +export function serverSetupRequestToJSON( + serverSetupRequest: ServerSetupRequest, +): string { + return JSON.stringify( + ServerSetupRequest$outboundSchema.parse(serverSetupRequest), + ); +} + +export function serverSetupRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ServerSetupRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ServerSetupRequest' from JSON`, + ); +} diff --git a/src/models/operations/serverupdate.ts b/src/models/operations/serverupdate.ts new file mode 100644 index 0000000..c8f8eb1 --- /dev/null +++ b/src/models/operations/serverupdate.ts @@ -0,0 +1,90 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ServerUpdateRequest = { + name: string; + description?: string | null | undefined; + serverId: string; + ipAddress: string; + port: number; + username: string; + sshKeyId: string | null; +}; + +/** @internal */ +export const ServerUpdateRequest$inboundSchema: z.ZodType< + ServerUpdateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + description: z.nullable(z.string()).optional(), + serverId: z.string(), + ipAddress: z.string(), + port: z.number(), + username: z.string(), + sshKeyId: z.nullable(z.string()), +}); + +/** @internal */ +export type ServerUpdateRequest$Outbound = { + name: string; + description?: string | null | undefined; + serverId: string; + ipAddress: string; + port: number; + username: string; + sshKeyId: string | null; +}; + +/** @internal */ +export const ServerUpdateRequest$outboundSchema: z.ZodType< + ServerUpdateRequest$Outbound, + z.ZodTypeDef, + ServerUpdateRequest +> = z.object({ + name: z.string(), + description: z.nullable(z.string()).optional(), + serverId: z.string(), + ipAddress: z.string(), + port: z.number(), + username: z.string(), + sshKeyId: z.nullable(z.string()), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ServerUpdateRequest$ { + /** @deprecated use `ServerUpdateRequest$inboundSchema` instead. */ + export const inboundSchema = ServerUpdateRequest$inboundSchema; + /** @deprecated use `ServerUpdateRequest$outboundSchema` instead. */ + export const outboundSchema = ServerUpdateRequest$outboundSchema; + /** @deprecated use `ServerUpdateRequest$Outbound` instead. */ + export type Outbound = ServerUpdateRequest$Outbound; +} + +export function serverUpdateRequestToJSON( + serverUpdateRequest: ServerUpdateRequest, +): string { + return JSON.stringify( + ServerUpdateRequest$outboundSchema.parse(serverUpdateRequest), + ); +} + +export function serverUpdateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ServerUpdateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ServerUpdateRequest' from JSON`, + ); +} diff --git a/src/models/operations/settingsassigndomainserver.ts b/src/models/operations/settingsassigndomainserver.ts new file mode 100644 index 0000000..ce01eef --- /dev/null +++ b/src/models/operations/settingsassigndomainserver.ts @@ -0,0 +1,111 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const SettingsAssignDomainServerCertificateType = { + Letsencrypt: "letsencrypt", + None: "none", +} as const; +export type SettingsAssignDomainServerCertificateType = ClosedEnum< + typeof SettingsAssignDomainServerCertificateType +>; + +export type SettingsAssignDomainServerRequest = { + host: string | null; + certificateType?: SettingsAssignDomainServerCertificateType | undefined; + letsEncryptEmail?: string | null | undefined; +}; + +/** @internal */ +export const SettingsAssignDomainServerCertificateType$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(SettingsAssignDomainServerCertificateType); + +/** @internal */ +export const SettingsAssignDomainServerCertificateType$outboundSchema: + z.ZodNativeEnum = + SettingsAssignDomainServerCertificateType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SettingsAssignDomainServerCertificateType$ { + /** @deprecated use `SettingsAssignDomainServerCertificateType$inboundSchema` instead. */ + export const inboundSchema = + SettingsAssignDomainServerCertificateType$inboundSchema; + /** @deprecated use `SettingsAssignDomainServerCertificateType$outboundSchema` instead. */ + export const outboundSchema = + SettingsAssignDomainServerCertificateType$outboundSchema; +} + +/** @internal */ +export const SettingsAssignDomainServerRequest$inboundSchema: z.ZodType< + SettingsAssignDomainServerRequest, + z.ZodTypeDef, + unknown +> = z.object({ + host: z.nullable(z.string()), + certificateType: SettingsAssignDomainServerCertificateType$inboundSchema + .default("none"), + letsEncryptEmail: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type SettingsAssignDomainServerRequest$Outbound = { + host: string | null; + certificateType: string; + letsEncryptEmail?: string | null | undefined; +}; + +/** @internal */ +export const SettingsAssignDomainServerRequest$outboundSchema: z.ZodType< + SettingsAssignDomainServerRequest$Outbound, + z.ZodTypeDef, + SettingsAssignDomainServerRequest +> = z.object({ + host: z.nullable(z.string()), + certificateType: SettingsAssignDomainServerCertificateType$outboundSchema + .default("none"), + letsEncryptEmail: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SettingsAssignDomainServerRequest$ { + /** @deprecated use `SettingsAssignDomainServerRequest$inboundSchema` instead. */ + export const inboundSchema = SettingsAssignDomainServerRequest$inboundSchema; + /** @deprecated use `SettingsAssignDomainServerRequest$outboundSchema` instead. */ + export const outboundSchema = + SettingsAssignDomainServerRequest$outboundSchema; + /** @deprecated use `SettingsAssignDomainServerRequest$Outbound` instead. */ + export type Outbound = SettingsAssignDomainServerRequest$Outbound; +} + +export function settingsAssignDomainServerRequestToJSON( + settingsAssignDomainServerRequest: SettingsAssignDomainServerRequest, +): string { + return JSON.stringify( + SettingsAssignDomainServerRequest$outboundSchema.parse( + settingsAssignDomainServerRequest, + ), + ); +} + +export function settingsAssignDomainServerRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SettingsAssignDomainServerRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SettingsAssignDomainServerRequest' from JSON`, + ); +} diff --git a/src/models/operations/settingscleanall.ts b/src/models/operations/settingscleanall.ts new file mode 100644 index 0000000..95cc432 --- /dev/null +++ b/src/models/operations/settingscleanall.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type SettingsCleanAllRequest = { + serverId?: string | undefined; +}; + +/** @internal */ +export const SettingsCleanAllRequest$inboundSchema: z.ZodType< + SettingsCleanAllRequest, + z.ZodTypeDef, + unknown +> = z.object({ + serverId: z.string().optional(), +}); + +/** @internal */ +export type SettingsCleanAllRequest$Outbound = { + serverId?: string | undefined; +}; + +/** @internal */ +export const SettingsCleanAllRequest$outboundSchema: z.ZodType< + SettingsCleanAllRequest$Outbound, + z.ZodTypeDef, + SettingsCleanAllRequest +> = z.object({ + serverId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SettingsCleanAllRequest$ { + /** @deprecated use `SettingsCleanAllRequest$inboundSchema` instead. */ + export const inboundSchema = SettingsCleanAllRequest$inboundSchema; + /** @deprecated use `SettingsCleanAllRequest$outboundSchema` instead. */ + export const outboundSchema = SettingsCleanAllRequest$outboundSchema; + /** @deprecated use `SettingsCleanAllRequest$Outbound` instead. */ + export type Outbound = SettingsCleanAllRequest$Outbound; +} + +export function settingsCleanAllRequestToJSON( + settingsCleanAllRequest: SettingsCleanAllRequest, +): string { + return JSON.stringify( + SettingsCleanAllRequest$outboundSchema.parse(settingsCleanAllRequest), + ); +} + +export function settingsCleanAllRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SettingsCleanAllRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SettingsCleanAllRequest' from JSON`, + ); +} diff --git a/src/models/operations/settingscleandockerbuilder.ts b/src/models/operations/settingscleandockerbuilder.ts new file mode 100644 index 0000000..18035e0 --- /dev/null +++ b/src/models/operations/settingscleandockerbuilder.ts @@ -0,0 +1,69 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type SettingsCleanDockerBuilderRequest = { + serverId?: string | undefined; +}; + +/** @internal */ +export const SettingsCleanDockerBuilderRequest$inboundSchema: z.ZodType< + SettingsCleanDockerBuilderRequest, + z.ZodTypeDef, + unknown +> = z.object({ + serverId: z.string().optional(), +}); + +/** @internal */ +export type SettingsCleanDockerBuilderRequest$Outbound = { + serverId?: string | undefined; +}; + +/** @internal */ +export const SettingsCleanDockerBuilderRequest$outboundSchema: z.ZodType< + SettingsCleanDockerBuilderRequest$Outbound, + z.ZodTypeDef, + SettingsCleanDockerBuilderRequest +> = z.object({ + serverId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SettingsCleanDockerBuilderRequest$ { + /** @deprecated use `SettingsCleanDockerBuilderRequest$inboundSchema` instead. */ + export const inboundSchema = SettingsCleanDockerBuilderRequest$inboundSchema; + /** @deprecated use `SettingsCleanDockerBuilderRequest$outboundSchema` instead. */ + export const outboundSchema = + SettingsCleanDockerBuilderRequest$outboundSchema; + /** @deprecated use `SettingsCleanDockerBuilderRequest$Outbound` instead. */ + export type Outbound = SettingsCleanDockerBuilderRequest$Outbound; +} + +export function settingsCleanDockerBuilderRequestToJSON( + settingsCleanDockerBuilderRequest: SettingsCleanDockerBuilderRequest, +): string { + return JSON.stringify( + SettingsCleanDockerBuilderRequest$outboundSchema.parse( + settingsCleanDockerBuilderRequest, + ), + ); +} + +export function settingsCleanDockerBuilderRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SettingsCleanDockerBuilderRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SettingsCleanDockerBuilderRequest' from JSON`, + ); +} diff --git a/src/models/operations/settingscleandockerprune.ts b/src/models/operations/settingscleandockerprune.ts new file mode 100644 index 0000000..21372f3 --- /dev/null +++ b/src/models/operations/settingscleandockerprune.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type SettingsCleanDockerPruneRequest = { + serverId?: string | undefined; +}; + +/** @internal */ +export const SettingsCleanDockerPruneRequest$inboundSchema: z.ZodType< + SettingsCleanDockerPruneRequest, + z.ZodTypeDef, + unknown +> = z.object({ + serverId: z.string().optional(), +}); + +/** @internal */ +export type SettingsCleanDockerPruneRequest$Outbound = { + serverId?: string | undefined; +}; + +/** @internal */ +export const SettingsCleanDockerPruneRequest$outboundSchema: z.ZodType< + SettingsCleanDockerPruneRequest$Outbound, + z.ZodTypeDef, + SettingsCleanDockerPruneRequest +> = z.object({ + serverId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SettingsCleanDockerPruneRequest$ { + /** @deprecated use `SettingsCleanDockerPruneRequest$inboundSchema` instead. */ + export const inboundSchema = SettingsCleanDockerPruneRequest$inboundSchema; + /** @deprecated use `SettingsCleanDockerPruneRequest$outboundSchema` instead. */ + export const outboundSchema = SettingsCleanDockerPruneRequest$outboundSchema; + /** @deprecated use `SettingsCleanDockerPruneRequest$Outbound` instead. */ + export type Outbound = SettingsCleanDockerPruneRequest$Outbound; +} + +export function settingsCleanDockerPruneRequestToJSON( + settingsCleanDockerPruneRequest: SettingsCleanDockerPruneRequest, +): string { + return JSON.stringify( + SettingsCleanDockerPruneRequest$outboundSchema.parse( + settingsCleanDockerPruneRequest, + ), + ); +} + +export function settingsCleanDockerPruneRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SettingsCleanDockerPruneRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SettingsCleanDockerPruneRequest' from JSON`, + ); +} diff --git a/src/models/operations/settingscleanstoppedcontainers.ts b/src/models/operations/settingscleanstoppedcontainers.ts new file mode 100644 index 0000000..b2db349 --- /dev/null +++ b/src/models/operations/settingscleanstoppedcontainers.ts @@ -0,0 +1,71 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type SettingsCleanStoppedContainersRequest = { + serverId?: string | undefined; +}; + +/** @internal */ +export const SettingsCleanStoppedContainersRequest$inboundSchema: z.ZodType< + SettingsCleanStoppedContainersRequest, + z.ZodTypeDef, + unknown +> = z.object({ + serverId: z.string().optional(), +}); + +/** @internal */ +export type SettingsCleanStoppedContainersRequest$Outbound = { + serverId?: string | undefined; +}; + +/** @internal */ +export const SettingsCleanStoppedContainersRequest$outboundSchema: z.ZodType< + SettingsCleanStoppedContainersRequest$Outbound, + z.ZodTypeDef, + SettingsCleanStoppedContainersRequest +> = z.object({ + serverId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SettingsCleanStoppedContainersRequest$ { + /** @deprecated use `SettingsCleanStoppedContainersRequest$inboundSchema` instead. */ + export const inboundSchema = + SettingsCleanStoppedContainersRequest$inboundSchema; + /** @deprecated use `SettingsCleanStoppedContainersRequest$outboundSchema` instead. */ + export const outboundSchema = + SettingsCleanStoppedContainersRequest$outboundSchema; + /** @deprecated use `SettingsCleanStoppedContainersRequest$Outbound` instead. */ + export type Outbound = SettingsCleanStoppedContainersRequest$Outbound; +} + +export function settingsCleanStoppedContainersRequestToJSON( + settingsCleanStoppedContainersRequest: SettingsCleanStoppedContainersRequest, +): string { + return JSON.stringify( + SettingsCleanStoppedContainersRequest$outboundSchema.parse( + settingsCleanStoppedContainersRequest, + ), + ); +} + +export function settingsCleanStoppedContainersRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + SettingsCleanStoppedContainersRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SettingsCleanStoppedContainersRequest' from JSON`, + ); +} diff --git a/src/models/operations/settingscleanunusedimages.ts b/src/models/operations/settingscleanunusedimages.ts new file mode 100644 index 0000000..74a0b6a --- /dev/null +++ b/src/models/operations/settingscleanunusedimages.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type SettingsCleanUnusedImagesRequest = { + serverId?: string | undefined; +}; + +/** @internal */ +export const SettingsCleanUnusedImagesRequest$inboundSchema: z.ZodType< + SettingsCleanUnusedImagesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + serverId: z.string().optional(), +}); + +/** @internal */ +export type SettingsCleanUnusedImagesRequest$Outbound = { + serverId?: string | undefined; +}; + +/** @internal */ +export const SettingsCleanUnusedImagesRequest$outboundSchema: z.ZodType< + SettingsCleanUnusedImagesRequest$Outbound, + z.ZodTypeDef, + SettingsCleanUnusedImagesRequest +> = z.object({ + serverId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SettingsCleanUnusedImagesRequest$ { + /** @deprecated use `SettingsCleanUnusedImagesRequest$inboundSchema` instead. */ + export const inboundSchema = SettingsCleanUnusedImagesRequest$inboundSchema; + /** @deprecated use `SettingsCleanUnusedImagesRequest$outboundSchema` instead. */ + export const outboundSchema = SettingsCleanUnusedImagesRequest$outboundSchema; + /** @deprecated use `SettingsCleanUnusedImagesRequest$Outbound` instead. */ + export type Outbound = SettingsCleanUnusedImagesRequest$Outbound; +} + +export function settingsCleanUnusedImagesRequestToJSON( + settingsCleanUnusedImagesRequest: SettingsCleanUnusedImagesRequest, +): string { + return JSON.stringify( + SettingsCleanUnusedImagesRequest$outboundSchema.parse( + settingsCleanUnusedImagesRequest, + ), + ); +} + +export function settingsCleanUnusedImagesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SettingsCleanUnusedImagesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SettingsCleanUnusedImagesRequest' from JSON`, + ); +} diff --git a/src/models/operations/settingscleanunusedvolumes.ts b/src/models/operations/settingscleanunusedvolumes.ts new file mode 100644 index 0000000..26950b4 --- /dev/null +++ b/src/models/operations/settingscleanunusedvolumes.ts @@ -0,0 +1,69 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type SettingsCleanUnusedVolumesRequest = { + serverId?: string | undefined; +}; + +/** @internal */ +export const SettingsCleanUnusedVolumesRequest$inboundSchema: z.ZodType< + SettingsCleanUnusedVolumesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + serverId: z.string().optional(), +}); + +/** @internal */ +export type SettingsCleanUnusedVolumesRequest$Outbound = { + serverId?: string | undefined; +}; + +/** @internal */ +export const SettingsCleanUnusedVolumesRequest$outboundSchema: z.ZodType< + SettingsCleanUnusedVolumesRequest$Outbound, + z.ZodTypeDef, + SettingsCleanUnusedVolumesRequest +> = z.object({ + serverId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SettingsCleanUnusedVolumesRequest$ { + /** @deprecated use `SettingsCleanUnusedVolumesRequest$inboundSchema` instead. */ + export const inboundSchema = SettingsCleanUnusedVolumesRequest$inboundSchema; + /** @deprecated use `SettingsCleanUnusedVolumesRequest$outboundSchema` instead. */ + export const outboundSchema = + SettingsCleanUnusedVolumesRequest$outboundSchema; + /** @deprecated use `SettingsCleanUnusedVolumesRequest$Outbound` instead. */ + export type Outbound = SettingsCleanUnusedVolumesRequest$Outbound; +} + +export function settingsCleanUnusedVolumesRequestToJSON( + settingsCleanUnusedVolumesRequest: SettingsCleanUnusedVolumesRequest, +): string { + return JSON.stringify( + SettingsCleanUnusedVolumesRequest$outboundSchema.parse( + settingsCleanUnusedVolumesRequest, + ), + ); +} + +export function settingsCleanUnusedVolumesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SettingsCleanUnusedVolumesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SettingsCleanUnusedVolumesRequest' from JSON`, + ); +} diff --git a/src/models/operations/settingshavetraefikdashboardportenabled.ts b/src/models/operations/settingshavetraefikdashboardportenabled.ts new file mode 100644 index 0000000..5171f15 --- /dev/null +++ b/src/models/operations/settingshavetraefikdashboardportenabled.ts @@ -0,0 +1,80 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type SettingsHaveTraefikDashboardPortEnabledRequest = { + serverId?: string | undefined; +}; + +/** @internal */ +export const SettingsHaveTraefikDashboardPortEnabledRequest$inboundSchema: + z.ZodType< + SettingsHaveTraefikDashboardPortEnabledRequest, + z.ZodTypeDef, + unknown + > = z.object({ + serverId: z.string().optional(), + }); + +/** @internal */ +export type SettingsHaveTraefikDashboardPortEnabledRequest$Outbound = { + serverId?: string | undefined; +}; + +/** @internal */ +export const SettingsHaveTraefikDashboardPortEnabledRequest$outboundSchema: + z.ZodType< + SettingsHaveTraefikDashboardPortEnabledRequest$Outbound, + z.ZodTypeDef, + SettingsHaveTraefikDashboardPortEnabledRequest + > = z.object({ + serverId: z.string().optional(), + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SettingsHaveTraefikDashboardPortEnabledRequest$ { + /** @deprecated use `SettingsHaveTraefikDashboardPortEnabledRequest$inboundSchema` instead. */ + export const inboundSchema = + SettingsHaveTraefikDashboardPortEnabledRequest$inboundSchema; + /** @deprecated use `SettingsHaveTraefikDashboardPortEnabledRequest$outboundSchema` instead. */ + export const outboundSchema = + SettingsHaveTraefikDashboardPortEnabledRequest$outboundSchema; + /** @deprecated use `SettingsHaveTraefikDashboardPortEnabledRequest$Outbound` instead. */ + export type Outbound = + SettingsHaveTraefikDashboardPortEnabledRequest$Outbound; +} + +export function settingsHaveTraefikDashboardPortEnabledRequestToJSON( + settingsHaveTraefikDashboardPortEnabledRequest: + SettingsHaveTraefikDashboardPortEnabledRequest, +): string { + return JSON.stringify( + SettingsHaveTraefikDashboardPortEnabledRequest$outboundSchema.parse( + settingsHaveTraefikDashboardPortEnabledRequest, + ), + ); +} + +export function settingsHaveTraefikDashboardPortEnabledRequestFromJSON( + jsonString: string, +): SafeParseResult< + SettingsHaveTraefikDashboardPortEnabledRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SettingsHaveTraefikDashboardPortEnabledRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'SettingsHaveTraefikDashboardPortEnabledRequest' from JSON`, + ); +} diff --git a/src/models/operations/settingsreaddirectories.ts b/src/models/operations/settingsreaddirectories.ts new file mode 100644 index 0000000..bf23fc2 --- /dev/null +++ b/src/models/operations/settingsreaddirectories.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type SettingsReadDirectoriesRequest = { + serverId?: string | undefined; +}; + +/** @internal */ +export const SettingsReadDirectoriesRequest$inboundSchema: z.ZodType< + SettingsReadDirectoriesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + serverId: z.string().optional(), +}); + +/** @internal */ +export type SettingsReadDirectoriesRequest$Outbound = { + serverId?: string | undefined; +}; + +/** @internal */ +export const SettingsReadDirectoriesRequest$outboundSchema: z.ZodType< + SettingsReadDirectoriesRequest$Outbound, + z.ZodTypeDef, + SettingsReadDirectoriesRequest +> = z.object({ + serverId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SettingsReadDirectoriesRequest$ { + /** @deprecated use `SettingsReadDirectoriesRequest$inboundSchema` instead. */ + export const inboundSchema = SettingsReadDirectoriesRequest$inboundSchema; + /** @deprecated use `SettingsReadDirectoriesRequest$outboundSchema` instead. */ + export const outboundSchema = SettingsReadDirectoriesRequest$outboundSchema; + /** @deprecated use `SettingsReadDirectoriesRequest$Outbound` instead. */ + export type Outbound = SettingsReadDirectoriesRequest$Outbound; +} + +export function settingsReadDirectoriesRequestToJSON( + settingsReadDirectoriesRequest: SettingsReadDirectoriesRequest, +): string { + return JSON.stringify( + SettingsReadDirectoriesRequest$outboundSchema.parse( + settingsReadDirectoriesRequest, + ), + ); +} + +export function settingsReadDirectoriesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SettingsReadDirectoriesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SettingsReadDirectoriesRequest' from JSON`, + ); +} diff --git a/src/models/operations/settingsreadtraefikenv.ts b/src/models/operations/settingsreadtraefikenv.ts new file mode 100644 index 0000000..9389454 --- /dev/null +++ b/src/models/operations/settingsreadtraefikenv.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type SettingsReadTraefikEnvRequest = { + serverId?: string | undefined; +}; + +/** @internal */ +export const SettingsReadTraefikEnvRequest$inboundSchema: z.ZodType< + SettingsReadTraefikEnvRequest, + z.ZodTypeDef, + unknown +> = z.object({ + serverId: z.string().optional(), +}); + +/** @internal */ +export type SettingsReadTraefikEnvRequest$Outbound = { + serverId?: string | undefined; +}; + +/** @internal */ +export const SettingsReadTraefikEnvRequest$outboundSchema: z.ZodType< + SettingsReadTraefikEnvRequest$Outbound, + z.ZodTypeDef, + SettingsReadTraefikEnvRequest +> = z.object({ + serverId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SettingsReadTraefikEnvRequest$ { + /** @deprecated use `SettingsReadTraefikEnvRequest$inboundSchema` instead. */ + export const inboundSchema = SettingsReadTraefikEnvRequest$inboundSchema; + /** @deprecated use `SettingsReadTraefikEnvRequest$outboundSchema` instead. */ + export const outboundSchema = SettingsReadTraefikEnvRequest$outboundSchema; + /** @deprecated use `SettingsReadTraefikEnvRequest$Outbound` instead. */ + export type Outbound = SettingsReadTraefikEnvRequest$Outbound; +} + +export function settingsReadTraefikEnvRequestToJSON( + settingsReadTraefikEnvRequest: SettingsReadTraefikEnvRequest, +): string { + return JSON.stringify( + SettingsReadTraefikEnvRequest$outboundSchema.parse( + settingsReadTraefikEnvRequest, + ), + ); +} + +export function settingsReadTraefikEnvRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SettingsReadTraefikEnvRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SettingsReadTraefikEnvRequest' from JSON`, + ); +} diff --git a/src/models/operations/settingsreadtraefikfile.ts b/src/models/operations/settingsreadtraefikfile.ts new file mode 100644 index 0000000..34867d2 --- /dev/null +++ b/src/models/operations/settingsreadtraefikfile.ts @@ -0,0 +1,72 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type SettingsReadTraefikFileRequest = { + path: string; + serverId?: string | undefined; +}; + +/** @internal */ +export const SettingsReadTraefikFileRequest$inboundSchema: z.ZodType< + SettingsReadTraefikFileRequest, + z.ZodTypeDef, + unknown +> = z.object({ + path: z.string(), + serverId: z.string().optional(), +}); + +/** @internal */ +export type SettingsReadTraefikFileRequest$Outbound = { + path: string; + serverId?: string | undefined; +}; + +/** @internal */ +export const SettingsReadTraefikFileRequest$outboundSchema: z.ZodType< + SettingsReadTraefikFileRequest$Outbound, + z.ZodTypeDef, + SettingsReadTraefikFileRequest +> = z.object({ + path: z.string(), + serverId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SettingsReadTraefikFileRequest$ { + /** @deprecated use `SettingsReadTraefikFileRequest$inboundSchema` instead. */ + export const inboundSchema = SettingsReadTraefikFileRequest$inboundSchema; + /** @deprecated use `SettingsReadTraefikFileRequest$outboundSchema` instead. */ + export const outboundSchema = SettingsReadTraefikFileRequest$outboundSchema; + /** @deprecated use `SettingsReadTraefikFileRequest$Outbound` instead. */ + export type Outbound = SettingsReadTraefikFileRequest$Outbound; +} + +export function settingsReadTraefikFileRequestToJSON( + settingsReadTraefikFileRequest: SettingsReadTraefikFileRequest, +): string { + return JSON.stringify( + SettingsReadTraefikFileRequest$outboundSchema.parse( + settingsReadTraefikFileRequest, + ), + ); +} + +export function settingsReadTraefikFileRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SettingsReadTraefikFileRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SettingsReadTraefikFileRequest' from JSON`, + ); +} diff --git a/src/models/operations/settingsreloadtraefik.ts b/src/models/operations/settingsreloadtraefik.ts new file mode 100644 index 0000000..1a4f9c1 --- /dev/null +++ b/src/models/operations/settingsreloadtraefik.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type SettingsReloadTraefikRequest = { + serverId?: string | undefined; +}; + +/** @internal */ +export const SettingsReloadTraefikRequest$inboundSchema: z.ZodType< + SettingsReloadTraefikRequest, + z.ZodTypeDef, + unknown +> = z.object({ + serverId: z.string().optional(), +}); + +/** @internal */ +export type SettingsReloadTraefikRequest$Outbound = { + serverId?: string | undefined; +}; + +/** @internal */ +export const SettingsReloadTraefikRequest$outboundSchema: z.ZodType< + SettingsReloadTraefikRequest$Outbound, + z.ZodTypeDef, + SettingsReloadTraefikRequest +> = z.object({ + serverId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SettingsReloadTraefikRequest$ { + /** @deprecated use `SettingsReloadTraefikRequest$inboundSchema` instead. */ + export const inboundSchema = SettingsReloadTraefikRequest$inboundSchema; + /** @deprecated use `SettingsReloadTraefikRequest$outboundSchema` instead. */ + export const outboundSchema = SettingsReloadTraefikRequest$outboundSchema; + /** @deprecated use `SettingsReloadTraefikRequest$Outbound` instead. */ + export type Outbound = SettingsReloadTraefikRequest$Outbound; +} + +export function settingsReloadTraefikRequestToJSON( + settingsReloadTraefikRequest: SettingsReloadTraefikRequest, +): string { + return JSON.stringify( + SettingsReloadTraefikRequest$outboundSchema.parse( + settingsReloadTraefikRequest, + ), + ); +} + +export function settingsReloadTraefikRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SettingsReloadTraefikRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SettingsReloadTraefikRequest' from JSON`, + ); +} diff --git a/src/models/operations/settingssavesshprivatekey.ts b/src/models/operations/settingssavesshprivatekey.ts new file mode 100644 index 0000000..e9baa41 --- /dev/null +++ b/src/models/operations/settingssavesshprivatekey.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type SettingsSaveSSHPrivateKeyRequest = { + sshPrivateKey?: string | null | undefined; +}; + +/** @internal */ +export const SettingsSaveSSHPrivateKeyRequest$inboundSchema: z.ZodType< + SettingsSaveSSHPrivateKeyRequest, + z.ZodTypeDef, + unknown +> = z.object({ + sshPrivateKey: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type SettingsSaveSSHPrivateKeyRequest$Outbound = { + sshPrivateKey?: string | null | undefined; +}; + +/** @internal */ +export const SettingsSaveSSHPrivateKeyRequest$outboundSchema: z.ZodType< + SettingsSaveSSHPrivateKeyRequest$Outbound, + z.ZodTypeDef, + SettingsSaveSSHPrivateKeyRequest +> = z.object({ + sshPrivateKey: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SettingsSaveSSHPrivateKeyRequest$ { + /** @deprecated use `SettingsSaveSSHPrivateKeyRequest$inboundSchema` instead. */ + export const inboundSchema = SettingsSaveSSHPrivateKeyRequest$inboundSchema; + /** @deprecated use `SettingsSaveSSHPrivateKeyRequest$outboundSchema` instead. */ + export const outboundSchema = SettingsSaveSSHPrivateKeyRequest$outboundSchema; + /** @deprecated use `SettingsSaveSSHPrivateKeyRequest$Outbound` instead. */ + export type Outbound = SettingsSaveSSHPrivateKeyRequest$Outbound; +} + +export function settingsSaveSSHPrivateKeyRequestToJSON( + settingsSaveSSHPrivateKeyRequest: SettingsSaveSSHPrivateKeyRequest, +): string { + return JSON.stringify( + SettingsSaveSSHPrivateKeyRequest$outboundSchema.parse( + settingsSaveSSHPrivateKeyRequest, + ), + ); +} + +export function settingsSaveSSHPrivateKeyRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SettingsSaveSSHPrivateKeyRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SettingsSaveSSHPrivateKeyRequest' from JSON`, + ); +} diff --git a/src/models/operations/settingstoggledashboard.ts b/src/models/operations/settingstoggledashboard.ts new file mode 100644 index 0000000..740ac6c --- /dev/null +++ b/src/models/operations/settingstoggledashboard.ts @@ -0,0 +1,72 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type SettingsToggleDashboardRequest = { + enableDashboard?: boolean | undefined; + serverId?: string | undefined; +}; + +/** @internal */ +export const SettingsToggleDashboardRequest$inboundSchema: z.ZodType< + SettingsToggleDashboardRequest, + z.ZodTypeDef, + unknown +> = z.object({ + enableDashboard: z.boolean().optional(), + serverId: z.string().optional(), +}); + +/** @internal */ +export type SettingsToggleDashboardRequest$Outbound = { + enableDashboard?: boolean | undefined; + serverId?: string | undefined; +}; + +/** @internal */ +export const SettingsToggleDashboardRequest$outboundSchema: z.ZodType< + SettingsToggleDashboardRequest$Outbound, + z.ZodTypeDef, + SettingsToggleDashboardRequest +> = z.object({ + enableDashboard: z.boolean().optional(), + serverId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SettingsToggleDashboardRequest$ { + /** @deprecated use `SettingsToggleDashboardRequest$inboundSchema` instead. */ + export const inboundSchema = SettingsToggleDashboardRequest$inboundSchema; + /** @deprecated use `SettingsToggleDashboardRequest$outboundSchema` instead. */ + export const outboundSchema = SettingsToggleDashboardRequest$outboundSchema; + /** @deprecated use `SettingsToggleDashboardRequest$Outbound` instead. */ + export type Outbound = SettingsToggleDashboardRequest$Outbound; +} + +export function settingsToggleDashboardRequestToJSON( + settingsToggleDashboardRequest: SettingsToggleDashboardRequest, +): string { + return JSON.stringify( + SettingsToggleDashboardRequest$outboundSchema.parse( + settingsToggleDashboardRequest, + ), + ); +} + +export function settingsToggleDashboardRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SettingsToggleDashboardRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SettingsToggleDashboardRequest' from JSON`, + ); +} diff --git a/src/models/operations/settingstogglelogrotate.ts b/src/models/operations/settingstogglelogrotate.ts new file mode 100644 index 0000000..46a583c --- /dev/null +++ b/src/models/operations/settingstogglelogrotate.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type SettingsToggleLogRotateRequest = { + enable: boolean; +}; + +/** @internal */ +export const SettingsToggleLogRotateRequest$inboundSchema: z.ZodType< + SettingsToggleLogRotateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + enable: z.boolean(), +}); + +/** @internal */ +export type SettingsToggleLogRotateRequest$Outbound = { + enable: boolean; +}; + +/** @internal */ +export const SettingsToggleLogRotateRequest$outboundSchema: z.ZodType< + SettingsToggleLogRotateRequest$Outbound, + z.ZodTypeDef, + SettingsToggleLogRotateRequest +> = z.object({ + enable: z.boolean(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SettingsToggleLogRotateRequest$ { + /** @deprecated use `SettingsToggleLogRotateRequest$inboundSchema` instead. */ + export const inboundSchema = SettingsToggleLogRotateRequest$inboundSchema; + /** @deprecated use `SettingsToggleLogRotateRequest$outboundSchema` instead. */ + export const outboundSchema = SettingsToggleLogRotateRequest$outboundSchema; + /** @deprecated use `SettingsToggleLogRotateRequest$Outbound` instead. */ + export type Outbound = SettingsToggleLogRotateRequest$Outbound; +} + +export function settingsToggleLogRotateRequestToJSON( + settingsToggleLogRotateRequest: SettingsToggleLogRotateRequest, +): string { + return JSON.stringify( + SettingsToggleLogRotateRequest$outboundSchema.parse( + settingsToggleLogRotateRequest, + ), + ); +} + +export function settingsToggleLogRotateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SettingsToggleLogRotateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SettingsToggleLogRotateRequest' from JSON`, + ); +} diff --git a/src/models/operations/settingstogglerequests.ts b/src/models/operations/settingstogglerequests.ts new file mode 100644 index 0000000..472da11 --- /dev/null +++ b/src/models/operations/settingstogglerequests.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type SettingsToggleRequestsRequest = { + enable: boolean; +}; + +/** @internal */ +export const SettingsToggleRequestsRequest$inboundSchema: z.ZodType< + SettingsToggleRequestsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + enable: z.boolean(), +}); + +/** @internal */ +export type SettingsToggleRequestsRequest$Outbound = { + enable: boolean; +}; + +/** @internal */ +export const SettingsToggleRequestsRequest$outboundSchema: z.ZodType< + SettingsToggleRequestsRequest$Outbound, + z.ZodTypeDef, + SettingsToggleRequestsRequest +> = z.object({ + enable: z.boolean(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SettingsToggleRequestsRequest$ { + /** @deprecated use `SettingsToggleRequestsRequest$inboundSchema` instead. */ + export const inboundSchema = SettingsToggleRequestsRequest$inboundSchema; + /** @deprecated use `SettingsToggleRequestsRequest$outboundSchema` instead. */ + export const outboundSchema = SettingsToggleRequestsRequest$outboundSchema; + /** @deprecated use `SettingsToggleRequestsRequest$Outbound` instead. */ + export type Outbound = SettingsToggleRequestsRequest$Outbound; +} + +export function settingsToggleRequestsRequestToJSON( + settingsToggleRequestsRequest: SettingsToggleRequestsRequest, +): string { + return JSON.stringify( + SettingsToggleRequestsRequest$outboundSchema.parse( + settingsToggleRequestsRequest, + ), + ); +} + +export function settingsToggleRequestsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SettingsToggleRequestsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SettingsToggleRequestsRequest' from JSON`, + ); +} diff --git a/src/models/operations/settingsupdatedockercleanup.ts b/src/models/operations/settingsupdatedockercleanup.ts new file mode 100644 index 0000000..bd05c87 --- /dev/null +++ b/src/models/operations/settingsupdatedockercleanup.ts @@ -0,0 +1,74 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type SettingsUpdateDockerCleanupRequest = { + enableDockerCleanup: boolean; + serverId?: string | undefined; +}; + +/** @internal */ +export const SettingsUpdateDockerCleanupRequest$inboundSchema: z.ZodType< + SettingsUpdateDockerCleanupRequest, + z.ZodTypeDef, + unknown +> = z.object({ + enableDockerCleanup: z.boolean(), + serverId: z.string().optional(), +}); + +/** @internal */ +export type SettingsUpdateDockerCleanupRequest$Outbound = { + enableDockerCleanup: boolean; + serverId?: string | undefined; +}; + +/** @internal */ +export const SettingsUpdateDockerCleanupRequest$outboundSchema: z.ZodType< + SettingsUpdateDockerCleanupRequest$Outbound, + z.ZodTypeDef, + SettingsUpdateDockerCleanupRequest +> = z.object({ + enableDockerCleanup: z.boolean(), + serverId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SettingsUpdateDockerCleanupRequest$ { + /** @deprecated use `SettingsUpdateDockerCleanupRequest$inboundSchema` instead. */ + export const inboundSchema = SettingsUpdateDockerCleanupRequest$inboundSchema; + /** @deprecated use `SettingsUpdateDockerCleanupRequest$outboundSchema` instead. */ + export const outboundSchema = + SettingsUpdateDockerCleanupRequest$outboundSchema; + /** @deprecated use `SettingsUpdateDockerCleanupRequest$Outbound` instead. */ + export type Outbound = SettingsUpdateDockerCleanupRequest$Outbound; +} + +export function settingsUpdateDockerCleanupRequestToJSON( + settingsUpdateDockerCleanupRequest: SettingsUpdateDockerCleanupRequest, +): string { + return JSON.stringify( + SettingsUpdateDockerCleanupRequest$outboundSchema.parse( + settingsUpdateDockerCleanupRequest, + ), + ); +} + +export function settingsUpdateDockerCleanupRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + SettingsUpdateDockerCleanupRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SettingsUpdateDockerCleanupRequest' from JSON`, + ); +} diff --git a/src/models/operations/settingsupdatemiddlewaretraefikconfig.ts b/src/models/operations/settingsupdatemiddlewaretraefikconfig.ts new file mode 100644 index 0000000..022af5b --- /dev/null +++ b/src/models/operations/settingsupdatemiddlewaretraefikconfig.ts @@ -0,0 +1,79 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type SettingsUpdateMiddlewareTraefikConfigRequest = { + traefikConfig: string; +}; + +/** @internal */ +export const SettingsUpdateMiddlewareTraefikConfigRequest$inboundSchema: + z.ZodType< + SettingsUpdateMiddlewareTraefikConfigRequest, + z.ZodTypeDef, + unknown + > = z.object({ + traefikConfig: z.string(), + }); + +/** @internal */ +export type SettingsUpdateMiddlewareTraefikConfigRequest$Outbound = { + traefikConfig: string; +}; + +/** @internal */ +export const SettingsUpdateMiddlewareTraefikConfigRequest$outboundSchema: + z.ZodType< + SettingsUpdateMiddlewareTraefikConfigRequest$Outbound, + z.ZodTypeDef, + SettingsUpdateMiddlewareTraefikConfigRequest + > = z.object({ + traefikConfig: z.string(), + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SettingsUpdateMiddlewareTraefikConfigRequest$ { + /** @deprecated use `SettingsUpdateMiddlewareTraefikConfigRequest$inboundSchema` instead. */ + export const inboundSchema = + SettingsUpdateMiddlewareTraefikConfigRequest$inboundSchema; + /** @deprecated use `SettingsUpdateMiddlewareTraefikConfigRequest$outboundSchema` instead. */ + export const outboundSchema = + SettingsUpdateMiddlewareTraefikConfigRequest$outboundSchema; + /** @deprecated use `SettingsUpdateMiddlewareTraefikConfigRequest$Outbound` instead. */ + export type Outbound = SettingsUpdateMiddlewareTraefikConfigRequest$Outbound; +} + +export function settingsUpdateMiddlewareTraefikConfigRequestToJSON( + settingsUpdateMiddlewareTraefikConfigRequest: + SettingsUpdateMiddlewareTraefikConfigRequest, +): string { + return JSON.stringify( + SettingsUpdateMiddlewareTraefikConfigRequest$outboundSchema.parse( + settingsUpdateMiddlewareTraefikConfigRequest, + ), + ); +} + +export function settingsUpdateMiddlewareTraefikConfigRequestFromJSON( + jsonString: string, +): SafeParseResult< + SettingsUpdateMiddlewareTraefikConfigRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SettingsUpdateMiddlewareTraefikConfigRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'SettingsUpdateMiddlewareTraefikConfigRequest' from JSON`, + ); +} diff --git a/src/models/operations/settingsupdatetraefikconfig.ts b/src/models/operations/settingsupdatetraefikconfig.ts new file mode 100644 index 0000000..cad3bb9 --- /dev/null +++ b/src/models/operations/settingsupdatetraefikconfig.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type SettingsUpdateTraefikConfigRequest = { + traefikConfig: string; +}; + +/** @internal */ +export const SettingsUpdateTraefikConfigRequest$inboundSchema: z.ZodType< + SettingsUpdateTraefikConfigRequest, + z.ZodTypeDef, + unknown +> = z.object({ + traefikConfig: z.string(), +}); + +/** @internal */ +export type SettingsUpdateTraefikConfigRequest$Outbound = { + traefikConfig: string; +}; + +/** @internal */ +export const SettingsUpdateTraefikConfigRequest$outboundSchema: z.ZodType< + SettingsUpdateTraefikConfigRequest$Outbound, + z.ZodTypeDef, + SettingsUpdateTraefikConfigRequest +> = z.object({ + traefikConfig: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SettingsUpdateTraefikConfigRequest$ { + /** @deprecated use `SettingsUpdateTraefikConfigRequest$inboundSchema` instead. */ + export const inboundSchema = SettingsUpdateTraefikConfigRequest$inboundSchema; + /** @deprecated use `SettingsUpdateTraefikConfigRequest$outboundSchema` instead. */ + export const outboundSchema = + SettingsUpdateTraefikConfigRequest$outboundSchema; + /** @deprecated use `SettingsUpdateTraefikConfigRequest$Outbound` instead. */ + export type Outbound = SettingsUpdateTraefikConfigRequest$Outbound; +} + +export function settingsUpdateTraefikConfigRequestToJSON( + settingsUpdateTraefikConfigRequest: SettingsUpdateTraefikConfigRequest, +): string { + return JSON.stringify( + SettingsUpdateTraefikConfigRequest$outboundSchema.parse( + settingsUpdateTraefikConfigRequest, + ), + ); +} + +export function settingsUpdateTraefikConfigRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + SettingsUpdateTraefikConfigRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SettingsUpdateTraefikConfigRequest' from JSON`, + ); +} diff --git a/src/models/operations/settingsupdatetraefikfile.ts b/src/models/operations/settingsupdatetraefikfile.ts new file mode 100644 index 0000000..1345bc0 --- /dev/null +++ b/src/models/operations/settingsupdatetraefikfile.ts @@ -0,0 +1,76 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type SettingsUpdateTraefikFileRequest = { + path: string; + traefikConfig: string; + serverId?: string | undefined; +}; + +/** @internal */ +export const SettingsUpdateTraefikFileRequest$inboundSchema: z.ZodType< + SettingsUpdateTraefikFileRequest, + z.ZodTypeDef, + unknown +> = z.object({ + path: z.string(), + traefikConfig: z.string(), + serverId: z.string().optional(), +}); + +/** @internal */ +export type SettingsUpdateTraefikFileRequest$Outbound = { + path: string; + traefikConfig: string; + serverId?: string | undefined; +}; + +/** @internal */ +export const SettingsUpdateTraefikFileRequest$outboundSchema: z.ZodType< + SettingsUpdateTraefikFileRequest$Outbound, + z.ZodTypeDef, + SettingsUpdateTraefikFileRequest +> = z.object({ + path: z.string(), + traefikConfig: z.string(), + serverId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SettingsUpdateTraefikFileRequest$ { + /** @deprecated use `SettingsUpdateTraefikFileRequest$inboundSchema` instead. */ + export const inboundSchema = SettingsUpdateTraefikFileRequest$inboundSchema; + /** @deprecated use `SettingsUpdateTraefikFileRequest$outboundSchema` instead. */ + export const outboundSchema = SettingsUpdateTraefikFileRequest$outboundSchema; + /** @deprecated use `SettingsUpdateTraefikFileRequest$Outbound` instead. */ + export type Outbound = SettingsUpdateTraefikFileRequest$Outbound; +} + +export function settingsUpdateTraefikFileRequestToJSON( + settingsUpdateTraefikFileRequest: SettingsUpdateTraefikFileRequest, +): string { + return JSON.stringify( + SettingsUpdateTraefikFileRequest$outboundSchema.parse( + settingsUpdateTraefikFileRequest, + ), + ); +} + +export function settingsUpdateTraefikFileRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SettingsUpdateTraefikFileRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SettingsUpdateTraefikFileRequest' from JSON`, + ); +} diff --git a/src/models/operations/settingsupdatewebservertraefikconfig.ts b/src/models/operations/settingsupdatewebservertraefikconfig.ts new file mode 100644 index 0000000..fda315a --- /dev/null +++ b/src/models/operations/settingsupdatewebservertraefikconfig.ts @@ -0,0 +1,79 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type SettingsUpdateWebServerTraefikConfigRequest = { + traefikConfig: string; +}; + +/** @internal */ +export const SettingsUpdateWebServerTraefikConfigRequest$inboundSchema: + z.ZodType< + SettingsUpdateWebServerTraefikConfigRequest, + z.ZodTypeDef, + unknown + > = z.object({ + traefikConfig: z.string(), + }); + +/** @internal */ +export type SettingsUpdateWebServerTraefikConfigRequest$Outbound = { + traefikConfig: string; +}; + +/** @internal */ +export const SettingsUpdateWebServerTraefikConfigRequest$outboundSchema: + z.ZodType< + SettingsUpdateWebServerTraefikConfigRequest$Outbound, + z.ZodTypeDef, + SettingsUpdateWebServerTraefikConfigRequest + > = z.object({ + traefikConfig: z.string(), + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SettingsUpdateWebServerTraefikConfigRequest$ { + /** @deprecated use `SettingsUpdateWebServerTraefikConfigRequest$inboundSchema` instead. */ + export const inboundSchema = + SettingsUpdateWebServerTraefikConfigRequest$inboundSchema; + /** @deprecated use `SettingsUpdateWebServerTraefikConfigRequest$outboundSchema` instead. */ + export const outboundSchema = + SettingsUpdateWebServerTraefikConfigRequest$outboundSchema; + /** @deprecated use `SettingsUpdateWebServerTraefikConfigRequest$Outbound` instead. */ + export type Outbound = SettingsUpdateWebServerTraefikConfigRequest$Outbound; +} + +export function settingsUpdateWebServerTraefikConfigRequestToJSON( + settingsUpdateWebServerTraefikConfigRequest: + SettingsUpdateWebServerTraefikConfigRequest, +): string { + return JSON.stringify( + SettingsUpdateWebServerTraefikConfigRequest$outboundSchema.parse( + settingsUpdateWebServerTraefikConfigRequest, + ), + ); +} + +export function settingsUpdateWebServerTraefikConfigRequestFromJSON( + jsonString: string, +): SafeParseResult< + SettingsUpdateWebServerTraefikConfigRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SettingsUpdateWebServerTraefikConfigRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'SettingsUpdateWebServerTraefikConfigRequest' from JSON`, + ); +} diff --git a/src/models/operations/settingswritetraefikenv.ts b/src/models/operations/settingswritetraefikenv.ts new file mode 100644 index 0000000..a4fb41d --- /dev/null +++ b/src/models/operations/settingswritetraefikenv.ts @@ -0,0 +1,72 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type SettingsWriteTraefikEnvRequest = { + env: string; + serverId?: string | undefined; +}; + +/** @internal */ +export const SettingsWriteTraefikEnvRequest$inboundSchema: z.ZodType< + SettingsWriteTraefikEnvRequest, + z.ZodTypeDef, + unknown +> = z.object({ + env: z.string(), + serverId: z.string().optional(), +}); + +/** @internal */ +export type SettingsWriteTraefikEnvRequest$Outbound = { + env: string; + serverId?: string | undefined; +}; + +/** @internal */ +export const SettingsWriteTraefikEnvRequest$outboundSchema: z.ZodType< + SettingsWriteTraefikEnvRequest$Outbound, + z.ZodTypeDef, + SettingsWriteTraefikEnvRequest +> = z.object({ + env: z.string(), + serverId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SettingsWriteTraefikEnvRequest$ { + /** @deprecated use `SettingsWriteTraefikEnvRequest$inboundSchema` instead. */ + export const inboundSchema = SettingsWriteTraefikEnvRequest$inboundSchema; + /** @deprecated use `SettingsWriteTraefikEnvRequest$outboundSchema` instead. */ + export const outboundSchema = SettingsWriteTraefikEnvRequest$outboundSchema; + /** @deprecated use `SettingsWriteTraefikEnvRequest$Outbound` instead. */ + export type Outbound = SettingsWriteTraefikEnvRequest$Outbound; +} + +export function settingsWriteTraefikEnvRequestToJSON( + settingsWriteTraefikEnvRequest: SettingsWriteTraefikEnvRequest, +): string { + return JSON.stringify( + SettingsWriteTraefikEnvRequest$outboundSchema.parse( + settingsWriteTraefikEnvRequest, + ), + ); +} + +export function settingsWriteTraefikEnvRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SettingsWriteTraefikEnvRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SettingsWriteTraefikEnvRequest' from JSON`, + ); +} diff --git a/src/models/operations/sshkeycreate.ts b/src/models/operations/sshkeycreate.ts new file mode 100644 index 0000000..3cab38b --- /dev/null +++ b/src/models/operations/sshkeycreate.ts @@ -0,0 +1,82 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type SshKeyCreateRequest = { + name: string; + description?: string | null | undefined; + privateKey: string; + publicKey: string; + adminId?: string | null | undefined; +}; + +/** @internal */ +export const SshKeyCreateRequest$inboundSchema: z.ZodType< + SshKeyCreateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + description: z.nullable(z.string()).optional(), + privateKey: z.string(), + publicKey: z.string(), + adminId: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type SshKeyCreateRequest$Outbound = { + name: string; + description?: string | null | undefined; + privateKey: string; + publicKey: string; + adminId?: string | null | undefined; +}; + +/** @internal */ +export const SshKeyCreateRequest$outboundSchema: z.ZodType< + SshKeyCreateRequest$Outbound, + z.ZodTypeDef, + SshKeyCreateRequest +> = z.object({ + name: z.string(), + description: z.nullable(z.string()).optional(), + privateKey: z.string(), + publicKey: z.string(), + adminId: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SshKeyCreateRequest$ { + /** @deprecated use `SshKeyCreateRequest$inboundSchema` instead. */ + export const inboundSchema = SshKeyCreateRequest$inboundSchema; + /** @deprecated use `SshKeyCreateRequest$outboundSchema` instead. */ + export const outboundSchema = SshKeyCreateRequest$outboundSchema; + /** @deprecated use `SshKeyCreateRequest$Outbound` instead. */ + export type Outbound = SshKeyCreateRequest$Outbound; +} + +export function sshKeyCreateRequestToJSON( + sshKeyCreateRequest: SshKeyCreateRequest, +): string { + return JSON.stringify( + SshKeyCreateRequest$outboundSchema.parse(sshKeyCreateRequest), + ); +} + +export function sshKeyCreateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SshKeyCreateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SshKeyCreateRequest' from JSON`, + ); +} diff --git a/src/models/operations/sshkeygenerate.ts b/src/models/operations/sshkeygenerate.ts new file mode 100644 index 0000000..227cd09 --- /dev/null +++ b/src/models/operations/sshkeygenerate.ts @@ -0,0 +1,94 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const SshKeyGenerateType = { + Rsa: "rsa", + Ed25519: "ed25519", +} as const; +export type SshKeyGenerateType = ClosedEnum; + +export type SshKeyGenerateRequest = { + type?: SshKeyGenerateType | undefined; +}; + +/** @internal */ +export const SshKeyGenerateType$inboundSchema: z.ZodNativeEnum< + typeof SshKeyGenerateType +> = z.nativeEnum(SshKeyGenerateType); + +/** @internal */ +export const SshKeyGenerateType$outboundSchema: z.ZodNativeEnum< + typeof SshKeyGenerateType +> = SshKeyGenerateType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SshKeyGenerateType$ { + /** @deprecated use `SshKeyGenerateType$inboundSchema` instead. */ + export const inboundSchema = SshKeyGenerateType$inboundSchema; + /** @deprecated use `SshKeyGenerateType$outboundSchema` instead. */ + export const outboundSchema = SshKeyGenerateType$outboundSchema; +} + +/** @internal */ +export const SshKeyGenerateRequest$inboundSchema: z.ZodType< + SshKeyGenerateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + type: SshKeyGenerateType$inboundSchema.optional(), +}); + +/** @internal */ +export type SshKeyGenerateRequest$Outbound = { + type?: string | undefined; +}; + +/** @internal */ +export const SshKeyGenerateRequest$outboundSchema: z.ZodType< + SshKeyGenerateRequest$Outbound, + z.ZodTypeDef, + SshKeyGenerateRequest +> = z.object({ + type: SshKeyGenerateType$outboundSchema.optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SshKeyGenerateRequest$ { + /** @deprecated use `SshKeyGenerateRequest$inboundSchema` instead. */ + export const inboundSchema = SshKeyGenerateRequest$inboundSchema; + /** @deprecated use `SshKeyGenerateRequest$outboundSchema` instead. */ + export const outboundSchema = SshKeyGenerateRequest$outboundSchema; + /** @deprecated use `SshKeyGenerateRequest$Outbound` instead. */ + export type Outbound = SshKeyGenerateRequest$Outbound; +} + +export function sshKeyGenerateRequestToJSON( + sshKeyGenerateRequest: SshKeyGenerateRequest, +): string { + return JSON.stringify( + SshKeyGenerateRequest$outboundSchema.parse(sshKeyGenerateRequest), + ); +} + +export function sshKeyGenerateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SshKeyGenerateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SshKeyGenerateRequest' from JSON`, + ); +} diff --git a/src/models/operations/sshkeyone.ts b/src/models/operations/sshkeyone.ts new file mode 100644 index 0000000..916d5e9 --- /dev/null +++ b/src/models/operations/sshkeyone.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type SshKeyOneRequest = { + sshKeyId: string; +}; + +/** @internal */ +export const SshKeyOneRequest$inboundSchema: z.ZodType< + SshKeyOneRequest, + z.ZodTypeDef, + unknown +> = z.object({ + sshKeyId: z.string(), +}); + +/** @internal */ +export type SshKeyOneRequest$Outbound = { + sshKeyId: string; +}; + +/** @internal */ +export const SshKeyOneRequest$outboundSchema: z.ZodType< + SshKeyOneRequest$Outbound, + z.ZodTypeDef, + SshKeyOneRequest +> = z.object({ + sshKeyId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SshKeyOneRequest$ { + /** @deprecated use `SshKeyOneRequest$inboundSchema` instead. */ + export const inboundSchema = SshKeyOneRequest$inboundSchema; + /** @deprecated use `SshKeyOneRequest$outboundSchema` instead. */ + export const outboundSchema = SshKeyOneRequest$outboundSchema; + /** @deprecated use `SshKeyOneRequest$Outbound` instead. */ + export type Outbound = SshKeyOneRequest$Outbound; +} + +export function sshKeyOneRequestToJSON( + sshKeyOneRequest: SshKeyOneRequest, +): string { + return JSON.stringify( + SshKeyOneRequest$outboundSchema.parse(sshKeyOneRequest), + ); +} + +export function sshKeyOneRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SshKeyOneRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SshKeyOneRequest' from JSON`, + ); +} diff --git a/src/models/operations/sshkeyremove.ts b/src/models/operations/sshkeyremove.ts new file mode 100644 index 0000000..1635fbb --- /dev/null +++ b/src/models/operations/sshkeyremove.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type SshKeyRemoveRequest = { + sshKeyId: string; +}; + +/** @internal */ +export const SshKeyRemoveRequest$inboundSchema: z.ZodType< + SshKeyRemoveRequest, + z.ZodTypeDef, + unknown +> = z.object({ + sshKeyId: z.string(), +}); + +/** @internal */ +export type SshKeyRemoveRequest$Outbound = { + sshKeyId: string; +}; + +/** @internal */ +export const SshKeyRemoveRequest$outboundSchema: z.ZodType< + SshKeyRemoveRequest$Outbound, + z.ZodTypeDef, + SshKeyRemoveRequest +> = z.object({ + sshKeyId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SshKeyRemoveRequest$ { + /** @deprecated use `SshKeyRemoveRequest$inboundSchema` instead. */ + export const inboundSchema = SshKeyRemoveRequest$inboundSchema; + /** @deprecated use `SshKeyRemoveRequest$outboundSchema` instead. */ + export const outboundSchema = SshKeyRemoveRequest$outboundSchema; + /** @deprecated use `SshKeyRemoveRequest$Outbound` instead. */ + export type Outbound = SshKeyRemoveRequest$Outbound; +} + +export function sshKeyRemoveRequestToJSON( + sshKeyRemoveRequest: SshKeyRemoveRequest, +): string { + return JSON.stringify( + SshKeyRemoveRequest$outboundSchema.parse(sshKeyRemoveRequest), + ); +} + +export function sshKeyRemoveRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SshKeyRemoveRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SshKeyRemoveRequest' from JSON`, + ); +} diff --git a/src/models/operations/sshkeyupdate.ts b/src/models/operations/sshkeyupdate.ts new file mode 100644 index 0000000..d35b12f --- /dev/null +++ b/src/models/operations/sshkeyupdate.ts @@ -0,0 +1,78 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type SshKeyUpdateRequest = { + name?: string | undefined; + description?: string | null | undefined; + lastUsedAt?: string | null | undefined; + sshKeyId: string; +}; + +/** @internal */ +export const SshKeyUpdateRequest$inboundSchema: z.ZodType< + SshKeyUpdateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string().optional(), + description: z.nullable(z.string()).optional(), + lastUsedAt: z.nullable(z.string()).optional(), + sshKeyId: z.string(), +}); + +/** @internal */ +export type SshKeyUpdateRequest$Outbound = { + name?: string | undefined; + description?: string | null | undefined; + lastUsedAt?: string | null | undefined; + sshKeyId: string; +}; + +/** @internal */ +export const SshKeyUpdateRequest$outboundSchema: z.ZodType< + SshKeyUpdateRequest$Outbound, + z.ZodTypeDef, + SshKeyUpdateRequest +> = z.object({ + name: z.string().optional(), + description: z.nullable(z.string()).optional(), + lastUsedAt: z.nullable(z.string()).optional(), + sshKeyId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SshKeyUpdateRequest$ { + /** @deprecated use `SshKeyUpdateRequest$inboundSchema` instead. */ + export const inboundSchema = SshKeyUpdateRequest$inboundSchema; + /** @deprecated use `SshKeyUpdateRequest$outboundSchema` instead. */ + export const outboundSchema = SshKeyUpdateRequest$outboundSchema; + /** @deprecated use `SshKeyUpdateRequest$Outbound` instead. */ + export type Outbound = SshKeyUpdateRequest$Outbound; +} + +export function sshKeyUpdateRequestToJSON( + sshKeyUpdateRequest: SshKeyUpdateRequest, +): string { + return JSON.stringify( + SshKeyUpdateRequest$outboundSchema.parse(sshKeyUpdateRequest), + ); +} + +export function sshKeyUpdateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SshKeyUpdateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SshKeyUpdateRequest' from JSON`, + ); +} diff --git a/src/models/operations/stripecreatecheckoutsession.ts b/src/models/operations/stripecreatecheckoutsession.ts new file mode 100644 index 0000000..8076504 --- /dev/null +++ b/src/models/operations/stripecreatecheckoutsession.ts @@ -0,0 +1,78 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type StripeCreateCheckoutSessionRequest = { + productId: string; + serverQuantity: number; + isAnnual: boolean; +}; + +/** @internal */ +export const StripeCreateCheckoutSessionRequest$inboundSchema: z.ZodType< + StripeCreateCheckoutSessionRequest, + z.ZodTypeDef, + unknown +> = z.object({ + productId: z.string(), + serverQuantity: z.number(), + isAnnual: z.boolean(), +}); + +/** @internal */ +export type StripeCreateCheckoutSessionRequest$Outbound = { + productId: string; + serverQuantity: number; + isAnnual: boolean; +}; + +/** @internal */ +export const StripeCreateCheckoutSessionRequest$outboundSchema: z.ZodType< + StripeCreateCheckoutSessionRequest$Outbound, + z.ZodTypeDef, + StripeCreateCheckoutSessionRequest +> = z.object({ + productId: z.string(), + serverQuantity: z.number(), + isAnnual: z.boolean(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace StripeCreateCheckoutSessionRequest$ { + /** @deprecated use `StripeCreateCheckoutSessionRequest$inboundSchema` instead. */ + export const inboundSchema = StripeCreateCheckoutSessionRequest$inboundSchema; + /** @deprecated use `StripeCreateCheckoutSessionRequest$outboundSchema` instead. */ + export const outboundSchema = + StripeCreateCheckoutSessionRequest$outboundSchema; + /** @deprecated use `StripeCreateCheckoutSessionRequest$Outbound` instead. */ + export type Outbound = StripeCreateCheckoutSessionRequest$Outbound; +} + +export function stripeCreateCheckoutSessionRequestToJSON( + stripeCreateCheckoutSessionRequest: StripeCreateCheckoutSessionRequest, +): string { + return JSON.stringify( + StripeCreateCheckoutSessionRequest$outboundSchema.parse( + stripeCreateCheckoutSessionRequest, + ), + ); +} + +export function stripeCreateCheckoutSessionRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + StripeCreateCheckoutSessionRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'StripeCreateCheckoutSessionRequest' from JSON`, + ); +} diff --git a/src/models/operations/userbyauthid.ts b/src/models/operations/userbyauthid.ts new file mode 100644 index 0000000..4cd8a32 --- /dev/null +++ b/src/models/operations/userbyauthid.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UserByAuthIdRequest = { + authId: string; +}; + +/** @internal */ +export const UserByAuthIdRequest$inboundSchema: z.ZodType< + UserByAuthIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + authId: z.string(), +}); + +/** @internal */ +export type UserByAuthIdRequest$Outbound = { + authId: string; +}; + +/** @internal */ +export const UserByAuthIdRequest$outboundSchema: z.ZodType< + UserByAuthIdRequest$Outbound, + z.ZodTypeDef, + UserByAuthIdRequest +> = z.object({ + authId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UserByAuthIdRequest$ { + /** @deprecated use `UserByAuthIdRequest$inboundSchema` instead. */ + export const inboundSchema = UserByAuthIdRequest$inboundSchema; + /** @deprecated use `UserByAuthIdRequest$outboundSchema` instead. */ + export const outboundSchema = UserByAuthIdRequest$outboundSchema; + /** @deprecated use `UserByAuthIdRequest$Outbound` instead. */ + export type Outbound = UserByAuthIdRequest$Outbound; +} + +export function userByAuthIdRequestToJSON( + userByAuthIdRequest: UserByAuthIdRequest, +): string { + return JSON.stringify( + UserByAuthIdRequest$outboundSchema.parse(userByAuthIdRequest), + ); +} + +export function userByAuthIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UserByAuthIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UserByAuthIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/userbyuserid.ts b/src/models/operations/userbyuserid.ts new file mode 100644 index 0000000..d7ece13 --- /dev/null +++ b/src/models/operations/userbyuserid.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UserByUserIdRequest = { + userId: string; +}; + +/** @internal */ +export const UserByUserIdRequest$inboundSchema: z.ZodType< + UserByUserIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + userId: z.string(), +}); + +/** @internal */ +export type UserByUserIdRequest$Outbound = { + userId: string; +}; + +/** @internal */ +export const UserByUserIdRequest$outboundSchema: z.ZodType< + UserByUserIdRequest$Outbound, + z.ZodTypeDef, + UserByUserIdRequest +> = z.object({ + userId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UserByUserIdRequest$ { + /** @deprecated use `UserByUserIdRequest$inboundSchema` instead. */ + export const inboundSchema = UserByUserIdRequest$inboundSchema; + /** @deprecated use `UserByUserIdRequest$outboundSchema` instead. */ + export const outboundSchema = UserByUserIdRequest$outboundSchema; + /** @deprecated use `UserByUserIdRequest$Outbound` instead. */ + export type Outbound = UserByUserIdRequest$Outbound; +} + +export function userByUserIdRequestToJSON( + userByUserIdRequest: UserByUserIdRequest, +): string { + return JSON.stringify( + UserByUserIdRequest$outboundSchema.parse(userByUserIdRequest), + ); +} + +export function userByUserIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UserByUserIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UserByUserIdRequest' from JSON`, + ); +} diff --git a/src/models/security.ts b/src/models/security.ts new file mode 100644 index 0000000..14cb623 --- /dev/null +++ b/src/models/security.ts @@ -0,0 +1,71 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type Security = { + authorization?: string | undefined; +}; + +/** @internal */ +export const Security$inboundSchema: z.ZodType< + Security, + z.ZodTypeDef, + unknown +> = z.object({ + Authorization: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "Authorization": "authorization", + }); +}); + +/** @internal */ +export type Security$Outbound = { + Authorization?: string | undefined; +}; + +/** @internal */ +export const Security$outboundSchema: z.ZodType< + Security$Outbound, + z.ZodTypeDef, + Security +> = z.object({ + authorization: z.string().optional(), +}).transform((v) => { + return remap$(v, { + authorization: "Authorization", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Security$ { + /** @deprecated use `Security$inboundSchema` instead. */ + export const inboundSchema = Security$inboundSchema; + /** @deprecated use `Security$outboundSchema` instead. */ + export const outboundSchema = Security$outboundSchema; + /** @deprecated use `Security$Outbound` instead. */ + export type Outbound = Security$Outbound; +} + +export function securityToJSON(security: Security): string { + return JSON.stringify(Security$outboundSchema.parse(security)); +} + +export function securityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Security$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Security' from JSON`, + ); +} diff --git a/src/sdk/admin.ts b/src/sdk/admin.ts new file mode 100644 index 0000000..d34c016 --- /dev/null +++ b/src/sdk/admin.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { adminAssignPermissions } from "../funcs/adminAssignPermissions.js"; +import { adminCreateUserInvitation } from "../funcs/adminCreateUserInvitation.js"; +import { adminGetOne } from "../funcs/adminGetOne.js"; +import { adminGetUserByToken } from "../funcs/adminGetUserByToken.js"; +import { adminRemoveUser } from "../funcs/adminRemoveUser.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Admin extends ClientSDK { + async getOne( + options?: RequestOptions, + ): Promise { + return unwrapAsync(adminGetOne( + this, + options, + )); + } + + async createUserInvitation( + request: operations.AdminCreateUserInvitationRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(adminCreateUserInvitation( + this, + request, + options, + )); + } + + async removeUser( + request: operations.AdminRemoveUserRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(adminRemoveUser( + this, + request, + options, + )); + } + + async getUserByToken( + request: operations.AdminGetUserByTokenRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(adminGetUserByToken( + this, + request, + options, + )); + } + + async assignPermissions( + request: operations.AdminAssignPermissionsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(adminAssignPermissions( + this, + request, + options, + )); + } +} diff --git a/src/sdk/application.ts b/src/sdk/application.ts new file mode 100644 index 0000000..d490587 --- /dev/null +++ b/src/sdk/application.ts @@ -0,0 +1,274 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { applicationCleanQueues } from "../funcs/applicationCleanQueues.js"; +import { applicationCreate } from "../funcs/applicationCreate.js"; +import { applicationDelete } from "../funcs/applicationDelete.js"; +import { applicationDeploy } from "../funcs/applicationDeploy.js"; +import { applicationGetOne } from "../funcs/applicationGetOne.js"; +import { applicationMarkRunning } from "../funcs/applicationMarkRunning.js"; +import { applicationReadAppMonitoring } from "../funcs/applicationReadAppMonitoring.js"; +import { applicationReadTraefikConfig } from "../funcs/applicationReadTraefikConfig.js"; +import { applicationRedeploy } from "../funcs/applicationRedeploy.js"; +import { applicationRefreshToken } from "../funcs/applicationRefreshToken.js"; +import { applicationReload } from "../funcs/applicationReload.js"; +import { applicationSaveBitbucketProvider } from "../funcs/applicationSaveBitbucketProvider.js"; +import { applicationSaveBuildType } from "../funcs/applicationSaveBuildType.js"; +import { applicationSaveDockerProvider } from "../funcs/applicationSaveDockerProvider.js"; +import { applicationSaveEnvironment } from "../funcs/applicationSaveEnvironment.js"; +import { applicationSaveGithubProvider } from "../funcs/applicationSaveGithubProvider.js"; +import { applicationSaveGitlabProvider } from "../funcs/applicationSaveGitlabProvider.js"; +import { applicationSaveGitProdiver } from "../funcs/applicationSaveGitProdiver.js"; +import { applicationStart } from "../funcs/applicationStart.js"; +import { applicationStop } from "../funcs/applicationStop.js"; +import { applicationUpdate } from "../funcs/applicationUpdate.js"; +import { applicationUpdateTraefikConfig } from "../funcs/applicationUpdateTraefikConfig.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Application extends ClientSDK { + async create( + request: operations.ApplicationCreateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationCreate( + this, + request, + options, + )); + } + + async getOne( + request: operations.ApplicationOneRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationGetOne( + this, + request, + options, + )); + } + + async reload( + request: operations.ApplicationReloadRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationReload( + this, + request, + options, + )); + } + + async delete( + request: operations.ApplicationDeleteRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationDelete( + this, + request, + options, + )); + } + + async stop( + request: operations.ApplicationStopRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationStop( + this, + request, + options, + )); + } + + async start( + request: operations.ApplicationStartRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationStart( + this, + request, + options, + )); + } + + async redeploy( + request: operations.ApplicationRedeployRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationRedeploy( + this, + request, + options, + )); + } + + async saveEnvironment( + request: operations.ApplicationSaveEnvironmentRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationSaveEnvironment( + this, + request, + options, + )); + } + + async saveBuildType( + request: operations.ApplicationSaveBuildTypeRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationSaveBuildType( + this, + request, + options, + )); + } + + async saveGithubProvider( + request: operations.ApplicationSaveGithubProviderRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationSaveGithubProvider( + this, + request, + options, + )); + } + + async saveGitlabProvider( + request: operations.ApplicationSaveGitlabProviderRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationSaveGitlabProvider( + this, + request, + options, + )); + } + + async saveBitbucketProvider( + request: operations.ApplicationSaveBitbucketProviderRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationSaveBitbucketProvider( + this, + request, + options, + )); + } + + async saveDockerProvider( + request: operations.ApplicationSaveDockerProviderRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationSaveDockerProvider( + this, + request, + options, + )); + } + + async saveGitProdiver( + request: operations.ApplicationSaveGitProdiverRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationSaveGitProdiver( + this, + request, + options, + )); + } + + async markRunning( + request: operations.ApplicationMarkRunningRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationMarkRunning( + this, + request, + options, + )); + } + + async update( + request: operations.ApplicationUpdateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationUpdate( + this, + request, + options, + )); + } + + async refreshToken( + request: operations.ApplicationRefreshTokenRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationRefreshToken( + this, + request, + options, + )); + } + + async deploy( + request: operations.ApplicationDeployRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationDeploy( + this, + request, + options, + )); + } + + async cleanQueues( + request: operations.ApplicationCleanQueuesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationCleanQueues( + this, + request, + options, + )); + } + + async readTraefikConfig( + request: operations.ApplicationReadTraefikConfigRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationReadTraefikConfig( + this, + request, + options, + )); + } + + async updateTraefikConfig( + request: operations.ApplicationUpdateTraefikConfigRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationUpdateTraefikConfig( + this, + request, + options, + )); + } + + async readAppMonitoring( + request: operations.ApplicationReadAppMonitoringRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationReadAppMonitoring( + this, + request, + options, + )); + } +} diff --git a/src/sdk/auth.ts b/src/sdk/auth.ts new file mode 100644 index 0000000..de98ceb --- /dev/null +++ b/src/sdk/auth.ts @@ -0,0 +1,180 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { authConfirmEmail } from "../funcs/authConfirmEmail.js"; +import { authCreateAdmin } from "../funcs/authCreateAdmin.js"; +import { authCreateUser } from "../funcs/authCreateUser.js"; +import { authDisable2FA } from "../funcs/authDisable2FA.js"; +import { authGenerate2FASecret } from "../funcs/authGenerate2FASecret.js"; +import { authGenerateToken } from "../funcs/authGenerateToken.js"; +import { authGet } from "../funcs/authGet.js"; +import { authGetOne } from "../funcs/authGetOne.js"; +import { authLogin } from "../funcs/authLogin.js"; +import { authLogout } from "../funcs/authLogout.js"; +import { authResetPassword } from "../funcs/authResetPassword.js"; +import { authSendResetPasswordEmail } from "../funcs/authSendResetPasswordEmail.js"; +import { authUpdate } from "../funcs/authUpdate.js"; +import { authVerify2faSetup } from "../funcs/authVerify2faSetup.js"; +import { authVerifyLogin2FA } from "../funcs/authVerifyLogin2FA.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Auth extends ClientSDK { + async createAdmin( + request: operations.AuthCreateAdminRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(authCreateAdmin( + this, + request, + options, + )); + } + + async createUser( + request: operations.AuthCreateUserRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(authCreateUser( + this, + request, + options, + )); + } + + async login( + request: operations.AuthLoginRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(authLogin( + this, + request, + options, + )); + } + + async getOne( + options?: RequestOptions, + ): Promise { + return unwrapAsync(authGetOne( + this, + options, + )); + } + + async logout( + options?: RequestOptions, + ): Promise { + return unwrapAsync(authLogout( + this, + options, + )); + } + + async update( + request: operations.AuthUpdateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(authUpdate( + this, + request, + options, + )); + } + + async generateToken( + options?: RequestOptions, + ): Promise { + return unwrapAsync(authGenerateToken( + this, + options, + )); + } + + async get( + request: operations.AuthOneRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(authGet( + this, + request, + options, + )); + } + + async generate2FASecret( + options?: RequestOptions, + ): Promise { + return unwrapAsync(authGenerate2FASecret( + this, + options, + )); + } + + async verify2faSetup( + request: operations.AuthVerify2FASetupRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(authVerify2faSetup( + this, + request, + options, + )); + } + + async verifyLogin2FA( + request: operations.AuthVerifyLogin2FARequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(authVerifyLogin2FA( + this, + request, + options, + )); + } + + async disable2FA( + options?: RequestOptions, + ): Promise { + return unwrapAsync(authDisable2FA( + this, + options, + )); + } + + async sendResetPasswordEmail( + request: operations.AuthSendResetPasswordEmailRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(authSendResetPasswordEmail( + this, + request, + options, + )); + } + + async resetPassword( + request: operations.AuthResetPasswordRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(authResetPassword( + this, + request, + options, + )); + } + + async confirmEmail( + request: operations.AuthConfirmEmailRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(authConfirmEmail( + this, + request, + options, + )); + } +} diff --git a/src/sdk/backup.ts b/src/sdk/backup.ts new file mode 100644 index 0000000..2bb8796 --- /dev/null +++ b/src/sdk/backup.ts @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { backupCreate } from "../funcs/backupCreate.js"; +import { backupGet } from "../funcs/backupGet.js"; +import { backupManualBackupMariadb } from "../funcs/backupManualBackupMariadb.js"; +import { backupManualBackupMongo } from "../funcs/backupManualBackupMongo.js"; +import { backupManualBackupMysql } from "../funcs/backupManualBackupMysql.js"; +import { backupManualBackupPostgres } from "../funcs/backupManualBackupPostgres.js"; +import { backupRemove } from "../funcs/backupRemove.js"; +import { backupUpdate } from "../funcs/backupUpdate.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Backup extends ClientSDK { + async create( + request: operations.BackupCreateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(backupCreate( + this, + request, + options, + )); + } + + async get( + request: operations.BackupOneRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(backupGet( + this, + request, + options, + )); + } + + async update( + request: operations.BackupUpdateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(backupUpdate( + this, + request, + options, + )); + } + + async remove( + request: operations.BackupRemoveRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(backupRemove( + this, + request, + options, + )); + } + + async manualBackupPostgres( + request: operations.BackupManualBackupPostgresRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(backupManualBackupPostgres( + this, + request, + options, + )); + } + + async manualBackupMysql( + request: operations.BackupManualBackupMySqlRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(backupManualBackupMysql( + this, + request, + options, + )); + } + + async manualBackupMariadb( + request: operations.BackupManualBackupMariadbRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(backupManualBackupMariadb( + this, + request, + options, + )); + } + + async manualBackupMongo( + request: operations.BackupManualBackupMongoRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(backupManualBackupMongo( + this, + request, + options, + )); + } +} diff --git a/src/sdk/bitbucket.ts b/src/sdk/bitbucket.ts new file mode 100644 index 0000000..2332af7 --- /dev/null +++ b/src/sdk/bitbucket.ts @@ -0,0 +1,92 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { bitbucketCreate } from "../funcs/bitbucketCreate.js"; +import { bitbucketGet } from "../funcs/bitbucketGet.js"; +import { bitbucketGetBranches } from "../funcs/bitbucketGetBranches.js"; +import { bitbucketGetRepositories } from "../funcs/bitbucketGetRepositories.js"; +import { bitbucketProviders } from "../funcs/bitbucketProviders.js"; +import { bitbucketTestConnection } from "../funcs/bitbucketTestConnection.js"; +import { bitbucketUpdate } from "../funcs/bitbucketUpdate.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Bitbucket extends ClientSDK { + async create( + request: operations.BitbucketCreateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(bitbucketCreate( + this, + request, + options, + )); + } + + async get( + request: operations.BitbucketOneRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(bitbucketGet( + this, + request, + options, + )); + } + + async providers( + options?: RequestOptions, + ): Promise { + return unwrapAsync(bitbucketProviders( + this, + options, + )); + } + + async getRepositories( + request: operations.BitbucketGetBitbucketRepositoriesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(bitbucketGetRepositories( + this, + request, + options, + )); + } + + async getBranches( + request: operations.BitbucketGetBitbucketBranchesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(bitbucketGetBranches( + this, + request, + options, + )); + } + + async testConnection( + request: operations.BitbucketTestConnectionRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(bitbucketTestConnection( + this, + request, + options, + )); + } + + async update( + request: operations.BitbucketUpdateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(bitbucketUpdate( + this, + request, + options, + )); + } +} diff --git a/src/sdk/certificates.ts b/src/sdk/certificates.ts new file mode 100644 index 0000000..0f89f53 --- /dev/null +++ b/src/sdk/certificates.ts @@ -0,0 +1,56 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { certificatesAll } from "../funcs/certificatesAll.js"; +import { certificatesCreate } from "../funcs/certificatesCreate.js"; +import { certificatesGet } from "../funcs/certificatesGet.js"; +import { certificatesRemove } from "../funcs/certificatesRemove.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Certificates extends ClientSDK { + async create( + request: operations.CertificatesCreateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(certificatesCreate( + this, + request, + options, + )); + } + + async get( + request: operations.CertificatesOneRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(certificatesGet( + this, + request, + options, + )); + } + + async remove( + request: operations.CertificatesRemoveRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(certificatesRemove( + this, + request, + options, + )); + } + + async all( + options?: RequestOptions, + ): Promise { + return unwrapAsync(certificatesAll( + this, + options, + )); + } +} diff --git a/src/sdk/cluster.ts b/src/sdk/cluster.ts new file mode 100644 index 0000000..46911ca --- /dev/null +++ b/src/sdk/cluster.ts @@ -0,0 +1,52 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { clusterAddManager } from "../funcs/clusterAddManager.js"; +import { clusterAddWorker } from "../funcs/clusterAddWorker.js"; +import { clusterGetNodes } from "../funcs/clusterGetNodes.js"; +import { clusterRemoveWorker } from "../funcs/clusterRemoveWorker.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Cluster extends ClientSDK { + async getNodes( + options?: RequestOptions, + ): Promise { + return unwrapAsync(clusterGetNodes( + this, + options, + )); + } + + async removeWorker( + request: operations.ClusterRemoveWorkerRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(clusterRemoveWorker( + this, + request, + options, + )); + } + + async addWorker( + options?: RequestOptions, + ): Promise { + return unwrapAsync(clusterAddWorker( + this, + options, + )); + } + + async addManager( + options?: RequestOptions, + ): Promise { + return unwrapAsync(clusterAddManager( + this, + options, + )); + } +} diff --git a/src/sdk/compose.ts b/src/sdk/compose.ts new file mode 100644 index 0000000..f4d0790 --- /dev/null +++ b/src/sdk/compose.ts @@ -0,0 +1,198 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { composeCleanQueues } from "../funcs/composeCleanQueues.js"; +import { composeCreate } from "../funcs/composeCreate.js"; +import { composeDelete } from "../funcs/composeDelete.js"; +import { composeDeploy } from "../funcs/composeDeploy.js"; +import { composeDeployTemplate } from "../funcs/composeDeployTemplate.js"; +import { composeFetchSourceType } from "../funcs/composeFetchSourceType.js"; +import { composeGetConverted } from "../funcs/composeGetConverted.js"; +import { composeGetDefaultCommand } from "../funcs/composeGetDefaultCommand.js"; +import { composeGetOne } from "../funcs/composeGetOne.js"; +import { composeGetTags } from "../funcs/composeGetTags.js"; +import { composeGetTemplates } from "../funcs/composeGetTemplates.js"; +import { composeRandomizeCompose } from "../funcs/composeRandomizeCompose.js"; +import { composeRedeploy } from "../funcs/composeRedeploy.js"; +import { composeRefreshToken } from "../funcs/composeRefreshToken.js"; +import { composeStop } from "../funcs/composeStop.js"; +import { composeUpdate } from "../funcs/composeUpdate.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Compose extends ClientSDK { + async create( + request: operations.ComposeCreateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(composeCreate( + this, + request, + options, + )); + } + + async getOne( + request: operations.ComposeOneRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(composeGetOne( + this, + request, + options, + )); + } + + async update( + request: operations.ComposeUpdateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(composeUpdate( + this, + request, + options, + )); + } + + async delete( + request: operations.ComposeDeleteRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(composeDelete( + this, + request, + options, + )); + } + + async cleanQueues( + request: operations.ComposeCleanQueuesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(composeCleanQueues( + this, + request, + options, + )); + } + + async fetchSourceType( + request: operations.ComposeFetchSourceTypeRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(composeFetchSourceType( + this, + request, + options, + )); + } + + async randomizeCompose( + request: operations.ComposeRandomizeComposeRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(composeRandomizeCompose( + this, + request, + options, + )); + } + + async getConverted( + request: operations.ComposeGetConvertedComposeRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(composeGetConverted( + this, + request, + options, + )); + } + + async deploy( + request: operations.ComposeDeployRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(composeDeploy( + this, + request, + options, + )); + } + + async redeploy( + request: operations.ComposeRedeployRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(composeRedeploy( + this, + request, + options, + )); + } + + async stop( + request: operations.ComposeStopRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(composeStop( + this, + request, + options, + )); + } + + async getDefaultCommand( + request: operations.ComposeGetDefaultCommandRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(composeGetDefaultCommand( + this, + request, + options, + )); + } + + async refreshToken( + request: operations.ComposeRefreshTokenRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(composeRefreshToken( + this, + request, + options, + )); + } + + async deployTemplate( + request: operations.ComposeDeployTemplateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(composeDeployTemplate( + this, + request, + options, + )); + } + + async getTemplates( + options?: RequestOptions, + ): Promise { + return unwrapAsync(composeGetTemplates( + this, + options, + )); + } + + async getTags( + options?: RequestOptions, + ): Promise { + return unwrapAsync(composeGetTags( + this, + options, + )); + } +} diff --git a/src/sdk/deployment.ts b/src/sdk/deployment.ts new file mode 100644 index 0000000..33ad398 --- /dev/null +++ b/src/sdk/deployment.ts @@ -0,0 +1,46 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { deploymentAllByCompose } from "../funcs/deploymentAllByCompose.js"; +import { deploymentAllByServer } from "../funcs/deploymentAllByServer.js"; +import { deploymentGet } from "../funcs/deploymentGet.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Deployment extends ClientSDK { + async get( + request: operations.DeploymentAllRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(deploymentGet( + this, + request, + options, + )); + } + + async allByCompose( + request: operations.DeploymentAllByComposeRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(deploymentAllByCompose( + this, + request, + options, + )); + } + + async allByServer( + request: operations.DeploymentAllByServerRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(deploymentAllByServer( + this, + request, + options, + )); + } +} diff --git a/src/sdk/destination.ts b/src/sdk/destination.ts new file mode 100644 index 0000000..7c38918 --- /dev/null +++ b/src/sdk/destination.ts @@ -0,0 +1,80 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { destinationCreate } from "../funcs/destinationCreate.js"; +import { destinationGet } from "../funcs/destinationGet.js"; +import { destinationGetOne } from "../funcs/destinationGetOne.js"; +import { destinationRemove } from "../funcs/destinationRemove.js"; +import { destinationTestConnection } from "../funcs/destinationTestConnection.js"; +import { destinationUpdate } from "../funcs/destinationUpdate.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Destination extends ClientSDK { + async create( + request: operations.DestinationCreateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(destinationCreate( + this, + request, + options, + )); + } + + async testConnection( + request: operations.DestinationTestConnectionRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(destinationTestConnection( + this, + request, + options, + )); + } + + async getOne( + request: operations.DestinationOneRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(destinationGetOne( + this, + request, + options, + )); + } + + async get( + options?: RequestOptions, + ): Promise { + return unwrapAsync(destinationGet( + this, + options, + )); + } + + async remove( + request: operations.DestinationRemoveRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(destinationRemove( + this, + request, + options, + )); + } + + async update( + request: operations.DestinationUpdateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(destinationUpdate( + this, + request, + options, + )); + } +} diff --git a/src/sdk/docker.ts b/src/sdk/docker.ts new file mode 100644 index 0000000..3377789 --- /dev/null +++ b/src/sdk/docker.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { dockerGetConfig } from "../funcs/dockerGetConfig.js"; +import { dockerGetContainers } from "../funcs/dockerGetContainers.js"; +import { dockerGetContainersByAppLabel } from "../funcs/dockerGetContainersByAppLabel.js"; +import { dockerGetContainersByAppNameMatch } from "../funcs/dockerGetContainersByAppNameMatch.js"; +import { dockerRestartContainer } from "../funcs/dockerRestartContainer.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Docker extends ClientSDK { + async getContainers( + request?: operations.DockerGetContainersRequest | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(dockerGetContainers( + this, + request, + options, + )); + } + + async restartContainer( + request: operations.DockerRestartContainerRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(dockerRestartContainer( + this, + request, + options, + )); + } + + async getConfig( + request: operations.DockerGetConfigRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(dockerGetConfig( + this, + request, + options, + )); + } + + async getContainersByAppNameMatch( + request: operations.DockerGetContainersByAppNameMatchRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(dockerGetContainersByAppNameMatch( + this, + request, + options, + )); + } + + async getContainersByAppLabel( + request: operations.DockerGetContainersByAppLabelRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(dockerGetContainersByAppLabel( + this, + request, + options, + )); + } +} diff --git a/src/sdk/domain.ts b/src/sdk/domain.ts new file mode 100644 index 0000000..f59f24b --- /dev/null +++ b/src/sdk/domain.ts @@ -0,0 +1,94 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { domainByApplicationId } from "../funcs/domainByApplicationId.js"; +import { domainByComposeId } from "../funcs/domainByComposeId.js"; +import { domainCreate } from "../funcs/domainCreate.js"; +import { domainDelete } from "../funcs/domainDelete.js"; +import { domainGenerateDomain } from "../funcs/domainGenerateDomain.js"; +import { domainGet } from "../funcs/domainGet.js"; +import { domainUpdate } from "../funcs/domainUpdate.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Domain extends ClientSDK { + async create( + request: operations.DomainCreateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(domainCreate( + this, + request, + options, + )); + } + + async byApplicationId( + request: operations.DomainByApplicationIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(domainByApplicationId( + this, + request, + options, + )); + } + + async byComposeId( + request: operations.DomainByComposeIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(domainByComposeId( + this, + request, + options, + )); + } + + async generateDomain( + request: operations.DomainGenerateDomainRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(domainGenerateDomain( + this, + request, + options, + )); + } + + async update( + request: operations.DomainUpdateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(domainUpdate( + this, + request, + options, + )); + } + + async get( + request: operations.DomainOneRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(domainGet( + this, + request, + options, + )); + } + + async delete( + request: operations.DomainDeleteRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(domainDelete( + this, + request, + options, + )); + } +} diff --git a/src/sdk/github.ts b/src/sdk/github.ts new file mode 100644 index 0000000..362b27a --- /dev/null +++ b/src/sdk/github.ts @@ -0,0 +1,80 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { githubGetBranches } from "../funcs/githubGetBranches.js"; +import { githubGetProviders } from "../funcs/githubGetProviders.js"; +import { githubGetRepositories } from "../funcs/githubGetRepositories.js"; +import { githubOne } from "../funcs/githubOne.js"; +import { githubTestConnection } from "../funcs/githubTestConnection.js"; +import { githubUpdate } from "../funcs/githubUpdate.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Github extends ClientSDK { + async one( + request: operations.GithubOneRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(githubOne( + this, + request, + options, + )); + } + + async getRepositories( + request: operations.GithubGetGithubRepositoriesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(githubGetRepositories( + this, + request, + options, + )); + } + + async getBranches( + request: operations.GithubGetGithubBranchesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(githubGetBranches( + this, + request, + options, + )); + } + + async getProviders( + options?: RequestOptions, + ): Promise { + return unwrapAsync(githubGetProviders( + this, + options, + )); + } + + async testConnection( + request: operations.GithubTestConnectionRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(githubTestConnection( + this, + request, + options, + )); + } + + async update( + request: operations.GithubUpdateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(githubUpdate( + this, + request, + options, + )); + } +} diff --git a/src/sdk/gitlab.ts b/src/sdk/gitlab.ts new file mode 100644 index 0000000..2f62fce --- /dev/null +++ b/src/sdk/gitlab.ts @@ -0,0 +1,92 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { gitlabCreate } from "../funcs/gitlabCreate.js"; +import { gitlabGetGitlabBranches } from "../funcs/gitlabGetGitlabBranches.js"; +import { gitlabGetGitlabRepositories } from "../funcs/gitlabGetGitlabRepositories.js"; +import { gitlabOne } from "../funcs/gitlabOne.js"; +import { gitlabProviders } from "../funcs/gitlabProviders.js"; +import { gitlabTestConnection } from "../funcs/gitlabTestConnection.js"; +import { gitlabUpdate } from "../funcs/gitlabUpdate.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Gitlab extends ClientSDK { + async create( + request: operations.GitlabCreateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(gitlabCreate( + this, + request, + options, + )); + } + + async one( + request: operations.GitlabOneRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(gitlabOne( + this, + request, + options, + )); + } + + async providers( + options?: RequestOptions, + ): Promise { + return unwrapAsync(gitlabProviders( + this, + options, + )); + } + + async getGitlabRepositories( + request: operations.GitlabGetGitlabRepositoriesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(gitlabGetGitlabRepositories( + this, + request, + options, + )); + } + + async getGitlabBranches( + request: operations.GitlabGetGitlabBranchesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(gitlabGetGitlabBranches( + this, + request, + options, + )); + } + + async testConnection( + request: operations.GitlabTestConnectionRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(gitlabTestConnection( + this, + request, + options, + )); + } + + async update( + request: operations.GitlabUpdateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(gitlabUpdate( + this, + request, + options, + )); + } +} diff --git a/src/sdk/gitprovider.ts b/src/sdk/gitprovider.ts new file mode 100644 index 0000000..b6ccc1a --- /dev/null +++ b/src/sdk/gitprovider.ts @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { gitProviderGetAll } from "../funcs/gitProviderGetAll.js"; +import { gitProviderRemove } from "../funcs/gitProviderRemove.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class GitProvider extends ClientSDK { + async getAll( + options?: RequestOptions, + ): Promise { + return unwrapAsync(gitProviderGetAll( + this, + options, + )); + } + + async remove( + request: operations.GitProviderRemoveRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(gitProviderRemove( + this, + request, + options, + )); + } +} diff --git a/src/sdk/index.ts b/src/sdk/index.ts new file mode 100644 index 0000000..ecac226 --- /dev/null +++ b/src/sdk/index.ts @@ -0,0 +1,5 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export * from "./sdk.js"; diff --git a/src/sdk/mariadb.ts b/src/sdk/mariadb.ts new file mode 100644 index 0000000..8b26f6e --- /dev/null +++ b/src/sdk/mariadb.ts @@ -0,0 +1,142 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { mariadbChangeStatus } from "../funcs/mariadbChangeStatus.js"; +import { mariadbCreate } from "../funcs/mariadbCreate.js"; +import { mariadbDeploy } from "../funcs/mariadbDeploy.js"; +import { mariadbGet } from "../funcs/mariadbGet.js"; +import { mariadbReload } from "../funcs/mariadbReload.js"; +import { mariadbRemove } from "../funcs/mariadbRemove.js"; +import { mariadbSaveEnvironment } from "../funcs/mariadbSaveEnvironment.js"; +import { mariadbSaveExternalPort } from "../funcs/mariadbSaveExternalPort.js"; +import { mariadbStart } from "../funcs/mariadbStart.js"; +import { mariadbStop } from "../funcs/mariadbStop.js"; +import { mariadbUpdate } from "../funcs/mariadbUpdate.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Mariadb extends ClientSDK { + async create( + request: operations.MariadbCreateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mariadbCreate( + this, + request, + options, + )); + } + + async get( + request: operations.MariadbOneRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mariadbGet( + this, + request, + options, + )); + } + + async start( + request: operations.MariadbStartRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mariadbStart( + this, + request, + options, + )); + } + + async stop( + request: operations.MariadbStopRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mariadbStop( + this, + request, + options, + )); + } + + async saveExternalPort( + request: operations.MariadbSaveExternalPortRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mariadbSaveExternalPort( + this, + request, + options, + )); + } + + async deploy( + request: operations.MariadbDeployRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mariadbDeploy( + this, + request, + options, + )); + } + + async changeStatus( + request: operations.MariadbChangeStatusRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mariadbChangeStatus( + this, + request, + options, + )); + } + + async remove( + request: operations.MariadbRemoveRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mariadbRemove( + this, + request, + options, + )); + } + + async saveEnvironment( + request: operations.MariadbSaveEnvironmentRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mariadbSaveEnvironment( + this, + request, + options, + )); + } + + async reload( + request: operations.MariadbReloadRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mariadbReload( + this, + request, + options, + )); + } + + async update( + request: operations.MariadbUpdateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mariadbUpdate( + this, + request, + options, + )); + } +} diff --git a/src/sdk/mongo.ts b/src/sdk/mongo.ts new file mode 100644 index 0000000..d41bc42 --- /dev/null +++ b/src/sdk/mongo.ts @@ -0,0 +1,142 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { mongoChangeStatus } from "../funcs/mongoChangeStatus.js"; +import { mongoCreate } from "../funcs/mongoCreate.js"; +import { mongoDeploy } from "../funcs/mongoDeploy.js"; +import { mongoGet } from "../funcs/mongoGet.js"; +import { mongoReload } from "../funcs/mongoReload.js"; +import { mongoRemove } from "../funcs/mongoRemove.js"; +import { mongoSaveEnvironment } from "../funcs/mongoSaveEnvironment.js"; +import { mongoSaveExternalPort } from "../funcs/mongoSaveExternalPort.js"; +import { mongoStart } from "../funcs/mongoStart.js"; +import { mongoStop } from "../funcs/mongoStop.js"; +import { mongoUpdate } from "../funcs/mongoUpdate.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Mongo extends ClientSDK { + async create( + request: operations.MongoCreateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mongoCreate( + this, + request, + options, + )); + } + + async get( + request: operations.MongoOneRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mongoGet( + this, + request, + options, + )); + } + + async start( + request: operations.MongoStartRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mongoStart( + this, + request, + options, + )); + } + + async stop( + request: operations.MongoStopRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mongoStop( + this, + request, + options, + )); + } + + async saveExternalPort( + request: operations.MongoSaveExternalPortRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mongoSaveExternalPort( + this, + request, + options, + )); + } + + async deploy( + request: operations.MongoDeployRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mongoDeploy( + this, + request, + options, + )); + } + + async changeStatus( + request: operations.MongoChangeStatusRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mongoChangeStatus( + this, + request, + options, + )); + } + + async reload( + request: operations.MongoReloadRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mongoReload( + this, + request, + options, + )); + } + + async remove( + request: operations.MongoRemoveRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mongoRemove( + this, + request, + options, + )); + } + + async saveEnvironment( + request: operations.MongoSaveEnvironmentRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mongoSaveEnvironment( + this, + request, + options, + )); + } + + async update( + request: operations.MongoUpdateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mongoUpdate( + this, + request, + options, + )); + } +} diff --git a/src/sdk/mounts.ts b/src/sdk/mounts.ts new file mode 100644 index 0000000..e51776d --- /dev/null +++ b/src/sdk/mounts.ts @@ -0,0 +1,58 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { mountsCreate } from "../funcs/mountsCreate.js"; +import { mountsGet } from "../funcs/mountsGet.js"; +import { mountsRemove } from "../funcs/mountsRemove.js"; +import { mountsUpdate } from "../funcs/mountsUpdate.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Mounts extends ClientSDK { + async create( + request: operations.MountsCreateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mountsCreate( + this, + request, + options, + )); + } + + async remove( + request: operations.MountsRemoveRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mountsRemove( + this, + request, + options, + )); + } + + async get( + request: operations.MountsOneRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mountsGet( + this, + request, + options, + )); + } + + async update( + request: operations.MountsUpdateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mountsUpdate( + this, + request, + options, + )); + } +} diff --git a/src/sdk/mysql.ts b/src/sdk/mysql.ts new file mode 100644 index 0000000..05397a9 --- /dev/null +++ b/src/sdk/mysql.ts @@ -0,0 +1,142 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { mysqlChangeStatus } from "../funcs/mysqlChangeStatus.js"; +import { mysqlCreate } from "../funcs/mysqlCreate.js"; +import { mysqlDeploy } from "../funcs/mysqlDeploy.js"; +import { mysqlGet } from "../funcs/mysqlGet.js"; +import { mysqlReload } from "../funcs/mysqlReload.js"; +import { mysqlRemove } from "../funcs/mysqlRemove.js"; +import { mysqlSaveEnvironment } from "../funcs/mysqlSaveEnvironment.js"; +import { mysqlSaveExternalPort } from "../funcs/mysqlSaveExternalPort.js"; +import { mysqlStart } from "../funcs/mysqlStart.js"; +import { mysqlStop } from "../funcs/mysqlStop.js"; +import { mysqlUpdate } from "../funcs/mysqlUpdate.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Mysql extends ClientSDK { + async create( + request: operations.MysqlCreateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mysqlCreate( + this, + request, + options, + )); + } + + async get( + request: operations.MysqlOneRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mysqlGet( + this, + request, + options, + )); + } + + async start( + request: operations.MysqlStartRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mysqlStart( + this, + request, + options, + )); + } + + async stop( + request: operations.MysqlStopRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mysqlStop( + this, + request, + options, + )); + } + + async saveExternalPort( + request: operations.MysqlSaveExternalPortRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mysqlSaveExternalPort( + this, + request, + options, + )); + } + + async deploy( + request: operations.MysqlDeployRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mysqlDeploy( + this, + request, + options, + )); + } + + async changeStatus( + request: operations.MysqlChangeStatusRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mysqlChangeStatus( + this, + request, + options, + )); + } + + async reload( + request: operations.MysqlReloadRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mysqlReload( + this, + request, + options, + )); + } + + async remove( + request: operations.MysqlRemoveRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mysqlRemove( + this, + request, + options, + )); + } + + async saveEnvironment( + request: operations.MysqlSaveEnvironmentRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mysqlSaveEnvironment( + this, + request, + options, + )); + } + + async update( + request: operations.MysqlUpdateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mysqlUpdate( + this, + request, + options, + )); + } +} diff --git a/src/sdk/notification.ts b/src/sdk/notification.ts new file mode 100644 index 0000000..7442a2a --- /dev/null +++ b/src/sdk/notification.ts @@ -0,0 +1,176 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { notificationCreateDiscord } from "../funcs/notificationCreateDiscord.js"; +import { notificationCreateEmail } from "../funcs/notificationCreateEmail.js"; +import { notificationCreateSlack } from "../funcs/notificationCreateSlack.js"; +import { notificationCreateTelegram } from "../funcs/notificationCreateTelegram.js"; +import { notificationGetAll } from "../funcs/notificationGetAll.js"; +import { notificationRemove } from "../funcs/notificationRemove.js"; +import { notificationTestDiscordConnection } from "../funcs/notificationTestDiscordConnection.js"; +import { notificationTestEmailConnection } from "../funcs/notificationTestEmailConnection.js"; +import { notificationTestSlackConnection } from "../funcs/notificationTestSlackConnection.js"; +import { notificationTestTelegramConnection } from "../funcs/notificationTestTelegramConnection.js"; +import { notificationUpdateDiscord } from "../funcs/notificationUpdateDiscord.js"; +import { notificationUpdateEmail } from "../funcs/notificationUpdateEmail.js"; +import { notificationUpdateSlack } from "../funcs/notificationUpdateSlack.js"; +import { notificationUpdateTelegram } from "../funcs/notificationUpdateTelegram.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Notification extends ClientSDK { + async createSlack( + request: operations.NotificationCreateSlackRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(notificationCreateSlack( + this, + request, + options, + )); + } + + async updateSlack( + request: operations.NotificationUpdateSlackRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(notificationUpdateSlack( + this, + request, + options, + )); + } + + async testSlackConnection( + request: operations.NotificationTestSlackConnectionRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(notificationTestSlackConnection( + this, + request, + options, + )); + } + + async createTelegram( + request: operations.NotificationCreateTelegramRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(notificationCreateTelegram( + this, + request, + options, + )); + } + + async updateTelegram( + request: operations.NotificationUpdateTelegramRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(notificationUpdateTelegram( + this, + request, + options, + )); + } + + async testTelegramConnection( + request: operations.NotificationTestTelegramConnectionRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(notificationTestTelegramConnection( + this, + request, + options, + )); + } + + async createDiscord( + request: operations.NotificationCreateDiscordRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(notificationCreateDiscord( + this, + request, + options, + )); + } + + async updateDiscord( + request: operations.NotificationUpdateDiscordRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(notificationUpdateDiscord( + this, + request, + options, + )); + } + + async testDiscordConnection( + request: operations.NotificationTestDiscordConnectionRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(notificationTestDiscordConnection( + this, + request, + options, + )); + } + + async createEmail( + request: operations.NotificationCreateEmailRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(notificationCreateEmail( + this, + request, + options, + )); + } + + async updateEmail( + request: operations.NotificationUpdateEmailRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(notificationUpdateEmail( + this, + request, + options, + )); + } + + async testEmailConnection( + request: operations.NotificationTestEmailConnectionRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(notificationTestEmailConnection( + this, + request, + options, + )); + } + + async remove( + request: operations.NotificationRemoveRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(notificationRemove( + this, + request, + options, + )); + } + + async getAll( + options?: RequestOptions, + ): Promise { + return unwrapAsync(notificationGetAll( + this, + options, + )); + } +} diff --git a/src/sdk/notifications.ts b/src/sdk/notifications.ts new file mode 100644 index 0000000..e77efdc --- /dev/null +++ b/src/sdk/notifications.ts @@ -0,0 +1,22 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { notificationsGet } from "../funcs/notificationsGet.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Notifications extends ClientSDK { + async get( + request: operations.NotificationOneRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(notificationsGet( + this, + request, + options, + )); + } +} diff --git a/src/sdk/port.ts b/src/sdk/port.ts new file mode 100644 index 0000000..008b42a --- /dev/null +++ b/src/sdk/port.ts @@ -0,0 +1,58 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { portCreate } from "../funcs/portCreate.js"; +import { portDelete } from "../funcs/portDelete.js"; +import { portGet } from "../funcs/portGet.js"; +import { portUpdate } from "../funcs/portUpdate.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Port extends ClientSDK { + async create( + request: operations.PortCreateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(portCreate( + this, + request, + options, + )); + } + + async get( + request: operations.PortOneRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(portGet( + this, + request, + options, + )); + } + + async delete( + request: operations.PortDeleteRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(portDelete( + this, + request, + options, + )); + } + + async update( + request: operations.PortUpdateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(portUpdate( + this, + request, + options, + )); + } +} diff --git a/src/sdk/postgres.ts b/src/sdk/postgres.ts new file mode 100644 index 0000000..5ef8ff1 --- /dev/null +++ b/src/sdk/postgres.ts @@ -0,0 +1,142 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { postgresChangeStatus } from "../funcs/postgresChangeStatus.js"; +import { postgresCreate } from "../funcs/postgresCreate.js"; +import { postgresDeploy } from "../funcs/postgresDeploy.js"; +import { postgresGet } from "../funcs/postgresGet.js"; +import { postgresReload } from "../funcs/postgresReload.js"; +import { postgresRemove } from "../funcs/postgresRemove.js"; +import { postgresSaveEnvironment } from "../funcs/postgresSaveEnvironment.js"; +import { postgresSaveExternalPort } from "../funcs/postgresSaveExternalPort.js"; +import { postgresStart } from "../funcs/postgresStart.js"; +import { postgresStop } from "../funcs/postgresStop.js"; +import { postgresUpdate } from "../funcs/postgresUpdate.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Postgres extends ClientSDK { + async create( + request: operations.PostgresCreateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(postgresCreate( + this, + request, + options, + )); + } + + async get( + request: operations.PostgresOneRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(postgresGet( + this, + request, + options, + )); + } + + async start( + request: operations.PostgresStartRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(postgresStart( + this, + request, + options, + )); + } + + async stop( + request: operations.PostgresStopRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(postgresStop( + this, + request, + options, + )); + } + + async saveExternalPort( + request: operations.PostgresSaveExternalPortRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(postgresSaveExternalPort( + this, + request, + options, + )); + } + + async deploy( + request: operations.PostgresDeployRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(postgresDeploy( + this, + request, + options, + )); + } + + async changeStatus( + request: operations.PostgresChangeStatusRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(postgresChangeStatus( + this, + request, + options, + )); + } + + async remove( + request: operations.PostgresRemoveRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(postgresRemove( + this, + request, + options, + )); + } + + async saveEnvironment( + request: operations.PostgresSaveEnvironmentRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(postgresSaveEnvironment( + this, + request, + options, + )); + } + + async reload( + request: operations.PostgresReloadRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(postgresReload( + this, + request, + options, + )); + } + + async update( + request: operations.PostgresUpdateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(postgresUpdate( + this, + request, + options, + )); + } +} diff --git a/src/sdk/project.ts b/src/sdk/project.ts new file mode 100644 index 0000000..6caf074 --- /dev/null +++ b/src/sdk/project.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { projectAll } from "../funcs/projectAll.js"; +import { projectCreate } from "../funcs/projectCreate.js"; +import { projectGet } from "../funcs/projectGet.js"; +import { projectRemove } from "../funcs/projectRemove.js"; +import { projectUpdate } from "../funcs/projectUpdate.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Project extends ClientSDK { + async create( + request: operations.ProjectCreateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(projectCreate( + this, + request, + options, + )); + } + + async get( + request: operations.ProjectOneRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(projectGet( + this, + request, + options, + )); + } + + async all( + options?: RequestOptions, + ): Promise { + return unwrapAsync(projectAll( + this, + options, + )); + } + + async remove( + request: operations.ProjectRemoveRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(projectRemove( + this, + request, + options, + )); + } + + async update( + request: operations.ProjectUpdateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(projectUpdate( + this, + request, + options, + )); + } +} diff --git a/src/sdk/redirects.ts b/src/sdk/redirects.ts new file mode 100644 index 0000000..8a58e2a --- /dev/null +++ b/src/sdk/redirects.ts @@ -0,0 +1,58 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { redirectsCreate } from "../funcs/redirectsCreate.js"; +import { redirectsDelete } from "../funcs/redirectsDelete.js"; +import { redirectsGetOne } from "../funcs/redirectsGetOne.js"; +import { redirectsUpdate } from "../funcs/redirectsUpdate.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Redirects extends ClientSDK { + async create( + request: operations.RedirectsCreateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(redirectsCreate( + this, + request, + options, + )); + } + + async getOne( + request: operations.RedirectsOneRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(redirectsGetOne( + this, + request, + options, + )); + } + + async delete( + request: operations.RedirectsDeleteRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(redirectsDelete( + this, + request, + options, + )); + } + + async update( + request: operations.RedirectsUpdateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(redirectsUpdate( + this, + request, + options, + )); + } +} diff --git a/src/sdk/redis.ts b/src/sdk/redis.ts new file mode 100644 index 0000000..00b634f --- /dev/null +++ b/src/sdk/redis.ts @@ -0,0 +1,142 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { redisChangeStatus } from "../funcs/redisChangeStatus.js"; +import { redisCreate } from "../funcs/redisCreate.js"; +import { redisDeploy } from "../funcs/redisDeploy.js"; +import { redisGet } from "../funcs/redisGet.js"; +import { redisReload } from "../funcs/redisReload.js"; +import { redisRemove } from "../funcs/redisRemove.js"; +import { redisSaveEnvironment } from "../funcs/redisSaveEnvironment.js"; +import { redisSaveExternalPort } from "../funcs/redisSaveExternalPort.js"; +import { redisStart } from "../funcs/redisStart.js"; +import { redisStop } from "../funcs/redisStop.js"; +import { redisUpdate } from "../funcs/redisUpdate.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Redis extends ClientSDK { + async create( + request: operations.RedisCreateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(redisCreate( + this, + request, + options, + )); + } + + async get( + request: operations.RedisOneRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(redisGet( + this, + request, + options, + )); + } + + async start( + request: operations.RedisStartRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(redisStart( + this, + request, + options, + )); + } + + async reload( + request: operations.RedisReloadRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(redisReload( + this, + request, + options, + )); + } + + async stop( + request: operations.RedisStopRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(redisStop( + this, + request, + options, + )); + } + + async saveExternalPort( + request: operations.RedisSaveExternalPortRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(redisSaveExternalPort( + this, + request, + options, + )); + } + + async deploy( + request: operations.RedisDeployRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(redisDeploy( + this, + request, + options, + )); + } + + async changeStatus( + request: operations.RedisChangeStatusRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(redisChangeStatus( + this, + request, + options, + )); + } + + async remove( + request: operations.RedisRemoveRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(redisRemove( + this, + request, + options, + )); + } + + async saveEnvironment( + request: operations.RedisSaveEnvironmentRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(redisSaveEnvironment( + this, + request, + options, + )); + } + + async update( + request: operations.RedisUpdateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(redisUpdate( + this, + request, + options, + )); + } +} diff --git a/src/sdk/registry.ts b/src/sdk/registry.ts new file mode 100644 index 0000000..1308814 --- /dev/null +++ b/src/sdk/registry.ts @@ -0,0 +1,80 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { registryCreate } from "../funcs/registryCreate.js"; +import { registryGet } from "../funcs/registryGet.js"; +import { registryGetAll } from "../funcs/registryGetAll.js"; +import { registryRemove } from "../funcs/registryRemove.js"; +import { registryTestRegistry } from "../funcs/registryTestRegistry.js"; +import { registryUpdate } from "../funcs/registryUpdate.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Registry extends ClientSDK { + async create( + request: operations.RegistryCreateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(registryCreate( + this, + request, + options, + )); + } + + async remove( + request: operations.RegistryRemoveRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(registryRemove( + this, + request, + options, + )); + } + + async update( + request: operations.RegistryUpdateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(registryUpdate( + this, + request, + options, + )); + } + + async getAll( + options?: RequestOptions, + ): Promise { + return unwrapAsync(registryGetAll( + this, + options, + )); + } + + async get( + request: operations.RegistryOneRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(registryGet( + this, + request, + options, + )); + } + + async testRegistry( + request: operations.RegistryTestRegistryRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(registryTestRegistry( + this, + request, + options, + )); + } +} diff --git a/src/sdk/sdk.ts b/src/sdk/sdk.ts new file mode 100644 index 0000000..a77a050 --- /dev/null +++ b/src/sdk/sdk.ts @@ -0,0 +1,217 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ClientSDK } from "../lib/sdks.js"; +import { Admin } from "./admin.js"; +import { Application } from "./application.js"; +import { Auth } from "./auth.js"; +import { Backup } from "./backup.js"; +import { Bitbucket } from "./bitbucket.js"; +import { Certificates } from "./certificates.js"; +import { Cluster } from "./cluster.js"; +import { Compose } from "./compose.js"; +import { Deployment } from "./deployment.js"; +import { Destination } from "./destination.js"; +import { Docker } from "./docker.js"; +import { Domain } from "./domain.js"; +import { Github } from "./github.js"; +import { Gitlab } from "./gitlab.js"; +import { GitProvider } from "./gitprovider.js"; +import { Mariadb } from "./mariadb.js"; +import { Mongo } from "./mongo.js"; +import { Mounts } from "./mounts.js"; +import { Mysql } from "./mysql.js"; +import { Notification } from "./notification.js"; +import { Notifications } from "./notifications.js"; +import { Port } from "./port.js"; +import { Postgres } from "./postgres.js"; +import { Project } from "./project.js"; +import { Redirects } from "./redirects.js"; +import { Redis } from "./redis.js"; +import { Registry } from "./registry.js"; +import { Security } from "./security.js"; +import { Server } from "./server.js"; +import { Servers } from "./servers.js"; +import { Settings } from "./settings.js"; +import { SshKey } from "./sshkey.js"; +import { SshKeys } from "./sshkeys.js"; +import { Stripe } from "./stripe.js"; +import { User } from "./user.js"; + +export class Dokploy extends ClientSDK { + private _admin?: Admin; + get admin(): Admin { + return (this._admin ??= new Admin(this._options)); + } + + private _docker?: Docker; + get docker(): Docker { + return (this._docker ??= new Docker(this._options)); + } + + private _auth?: Auth; + get auth(): Auth { + return (this._auth ??= new Auth(this._options)); + } + + private _project?: Project; + get project(): Project { + return (this._project ??= new Project(this._options)); + } + + private _application?: Application; + get application(): Application { + return (this._application ??= new Application(this._options)); + } + + private _mysql?: Mysql; + get mysql(): Mysql { + return (this._mysql ??= new Mysql(this._options)); + } + + private _postgres?: Postgres; + get postgres(): Postgres { + return (this._postgres ??= new Postgres(this._options)); + } + + private _redis?: Redis; + get redis(): Redis { + return (this._redis ??= new Redis(this._options)); + } + + private _mongo?: Mongo; + get mongo(): Mongo { + return (this._mongo ??= new Mongo(this._options)); + } + + private _mariadb?: Mariadb; + get mariadb(): Mariadb { + return (this._mariadb ??= new Mariadb(this._options)); + } + + private _compose?: Compose; + get compose(): Compose { + return (this._compose ??= new Compose(this._options)); + } + + private _user?: User; + get user(): User { + return (this._user ??= new User(this._options)); + } + + private _domain?: Domain; + get domain(): Domain { + return (this._domain ??= new Domain(this._options)); + } + + private _destination?: Destination; + get destination(): Destination { + return (this._destination ??= new Destination(this._options)); + } + + private _backup?: Backup; + get backup(): Backup { + return (this._backup ??= new Backup(this._options)); + } + + private _deployment?: Deployment; + get deployment(): Deployment { + return (this._deployment ??= new Deployment(this._options)); + } + + private _mounts?: Mounts; + get mounts(): Mounts { + return (this._mounts ??= new Mounts(this._options)); + } + + private _certificates?: Certificates; + get certificates(): Certificates { + return (this._certificates ??= new Certificates(this._options)); + } + + private _settings?: Settings; + get settings(): Settings { + return (this._settings ??= new Settings(this._options)); + } + + private _security?: Security; + get security(): Security { + return (this._security ??= new Security(this._options)); + } + + private _redirects?: Redirects; + get redirects(): Redirects { + return (this._redirects ??= new Redirects(this._options)); + } + + private _port?: Port; + get port(): Port { + return (this._port ??= new Port(this._options)); + } + + private _registry?: Registry; + get registry(): Registry { + return (this._registry ??= new Registry(this._options)); + } + + private _cluster?: Cluster; + get cluster(): Cluster { + return (this._cluster ??= new Cluster(this._options)); + } + + private _notification?: Notification; + get notification(): Notification { + return (this._notification ??= new Notification(this._options)); + } + + private _notifications?: Notifications; + get notifications(): Notifications { + return (this._notifications ??= new Notifications(this._options)); + } + + private _sshKeys?: SshKeys; + get sshKeys(): SshKeys { + return (this._sshKeys ??= new SshKeys(this._options)); + } + + private _sshKey?: SshKey; + get sshKey(): SshKey { + return (this._sshKey ??= new SshKey(this._options)); + } + + private _gitProvider?: GitProvider; + get gitProvider(): GitProvider { + return (this._gitProvider ??= new GitProvider(this._options)); + } + + private _bitbucket?: Bitbucket; + get bitbucket(): Bitbucket { + return (this._bitbucket ??= new Bitbucket(this._options)); + } + + private _gitlab?: Gitlab; + get gitlab(): Gitlab { + return (this._gitlab ??= new Gitlab(this._options)); + } + + private _github?: Github; + get github(): Github { + return (this._github ??= new Github(this._options)); + } + + private _server?: Server; + get server(): Server { + return (this._server ??= new Server(this._options)); + } + + private _servers?: Servers; + get servers(): Servers { + return (this._servers ??= new Servers(this._options)); + } + + private _stripe?: Stripe; + get stripe(): Stripe { + return (this._stripe ??= new Stripe(this._options)); + } +} diff --git a/src/sdk/security.ts b/src/sdk/security.ts new file mode 100644 index 0000000..74052ab --- /dev/null +++ b/src/sdk/security.ts @@ -0,0 +1,58 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { securityCreate } from "../funcs/securityCreate.js"; +import { securityDelete } from "../funcs/securityDelete.js"; +import { securityGet } from "../funcs/securityGet.js"; +import { securityUpdate } from "../funcs/securityUpdate.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Security extends ClientSDK { + async create( + request: operations.SecurityCreateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(securityCreate( + this, + request, + options, + )); + } + + async get( + request: operations.SecurityOneRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(securityGet( + this, + request, + options, + )); + } + + async delete( + request: operations.SecurityDeleteRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(securityDelete( + this, + request, + options, + )); + } + + async update( + request: operations.SecurityUpdateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(securityUpdate( + this, + request, + options, + )); + } +} diff --git a/src/sdk/server.ts b/src/sdk/server.ts new file mode 100644 index 0000000..1a65276 --- /dev/null +++ b/src/sdk/server.ts @@ -0,0 +1,78 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { serverAll } from "../funcs/serverAll.js"; +import { serverCreate } from "../funcs/serverCreate.js"; +import { serverRemove } from "../funcs/serverRemove.js"; +import { serverSetup } from "../funcs/serverSetup.js"; +import { serverUpdate } from "../funcs/serverUpdate.js"; +import { serverWithSSHKey } from "../funcs/serverWithSSHKey.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Server extends ClientSDK { + async create( + request: operations.ServerCreateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(serverCreate( + this, + request, + options, + )); + } + + async all( + options?: RequestOptions, + ): Promise { + return unwrapAsync(serverAll( + this, + options, + )); + } + + async withSSHKey( + options?: RequestOptions, + ): Promise { + return unwrapAsync(serverWithSSHKey( + this, + options, + )); + } + + async setup( + request: operations.ServerSetupRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(serverSetup( + this, + request, + options, + )); + } + + async remove( + request: operations.ServerRemoveRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(serverRemove( + this, + request, + options, + )); + } + + async update( + request: operations.ServerUpdateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(serverUpdate( + this, + request, + options, + )); + } +} diff --git a/src/sdk/servers.ts b/src/sdk/servers.ts new file mode 100644 index 0000000..43e0695 --- /dev/null +++ b/src/sdk/servers.ts @@ -0,0 +1,22 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { serversGet } from "../funcs/serversGet.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Servers extends ClientSDK { + async get( + request: operations.ServerOneRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(serversGet( + this, + request, + options, + )); + } +} diff --git a/src/sdk/settings.ts b/src/sdk/settings.ts new file mode 100644 index 0000000..37c020b --- /dev/null +++ b/src/sdk/settings.ts @@ -0,0 +1,436 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { settingsAssignDomainServer } from "../funcs/settingsAssignDomainServer.js"; +import { settingsCheckAndUpdateImage } from "../funcs/settingsCheckAndUpdateImage.js"; +import { settingsCleanAll } from "../funcs/settingsCleanAll.js"; +import { settingsCleanDockerBuilder } from "../funcs/settingsCleanDockerBuilder.js"; +import { settingsCleanDockerPrune } from "../funcs/settingsCleanDockerPrune.js"; +import { settingsCleanMonitoring } from "../funcs/settingsCleanMonitoring.js"; +import { settingsCleanSshPrivateKey } from "../funcs/settingsCleanSshPrivateKey.js"; +import { settingsCleanStoppedContainers } from "../funcs/settingsCleanStoppedContainers.js"; +import { settingsCleanUnusedImages } from "../funcs/settingsCleanUnusedImages.js"; +import { settingsCleanUnusedVolumes } from "../funcs/settingsCleanUnusedVolumes.js"; +import { settingsGetDokployVersion } from "../funcs/settingsGetDokployVersion.js"; +import { settingsGetIp } from "../funcs/settingsGetIp.js"; +import { settingsGetLogRotateStatus } from "../funcs/settingsGetLogRotateStatus.js"; +import { settingsGetOpenApiDocument } from "../funcs/settingsGetOpenApiDocument.js"; +import { settingsHaveActivateRequests } from "../funcs/settingsHaveActivateRequests.js"; +import { settingsHaveTraefikDashboardPortEnabled } from "../funcs/settingsHaveTraefikDashboardPortEnabled.js"; +import { settingsHealth } from "../funcs/settingsHealth.js"; +import { settingsIsCloud } from "../funcs/settingsIsCloud.js"; +import { settingsReadDirectories } from "../funcs/settingsReadDirectories.js"; +import { settingsReadMiddlewareTraefikConfig } from "../funcs/settingsReadMiddlewareTraefikConfig.js"; +import { settingsReadStats } from "../funcs/settingsReadStats.js"; +import { settingsReadTraefikConfig } from "../funcs/settingsReadTraefikConfig.js"; +import { settingsReadTraefikEnv } from "../funcs/settingsReadTraefikEnv.js"; +import { settingsReadTraefikFile } from "../funcs/settingsReadTraefikFile.js"; +import { settingsReadWebServerTraefikConfig } from "../funcs/settingsReadWebServerTraefikConfig.js"; +import { settingsReloadServer } from "../funcs/settingsReloadServer.js"; +import { settingsReloadTraefik } from "../funcs/settingsReloadTraefik.js"; +import { settingsSaveSshPrivateKey } from "../funcs/settingsSaveSshPrivateKey.js"; +import { settingsToggleDashboard } from "../funcs/settingsToggleDashboard.js"; +import { settingsToggleLogRotate } from "../funcs/settingsToggleLogRotate.js"; +import { settingsToggleRequests } from "../funcs/settingsToggleRequests.js"; +import { settingsUpdateDockerCleanup } from "../funcs/settingsUpdateDockerCleanup.js"; +import { settingsUpdateMiddlewareTraefikConfig } from "../funcs/settingsUpdateMiddlewareTraefikConfig.js"; +import { settingsUpdateServer } from "../funcs/settingsUpdateServer.js"; +import { settingsUpdateTraefikConfig } from "../funcs/settingsUpdateTraefikConfig.js"; +import { settingsUpdateTraefikFile } from "../funcs/settingsUpdateTraefikFile.js"; +import { settingsUpdateWebServerTraefikConfig } from "../funcs/settingsUpdateWebServerTraefikConfig.js"; +import { settingsWriteTraefikEnv } from "../funcs/settingsWriteTraefikEnv.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Settings extends ClientSDK { + async reloadServer( + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsReloadServer( + this, + options, + )); + } + + async reloadTraefik( + request?: operations.SettingsReloadTraefikRequest | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsReloadTraefik( + this, + request, + options, + )); + } + + async toggleDashboard( + request: operations.SettingsToggleDashboardRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsToggleDashboard( + this, + request, + options, + )); + } + + async cleanUnusedImages( + request?: operations.SettingsCleanUnusedImagesRequest | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsCleanUnusedImages( + this, + request, + options, + )); + } + + async cleanUnusedVolumes( + request?: operations.SettingsCleanUnusedVolumesRequest | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsCleanUnusedVolumes( + this, + request, + options, + )); + } + + async cleanStoppedContainers( + request?: operations.SettingsCleanStoppedContainersRequest | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsCleanStoppedContainers( + this, + request, + options, + )); + } + + async cleanDockerBuilder( + request?: operations.SettingsCleanDockerBuilderRequest | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsCleanDockerBuilder( + this, + request, + options, + )); + } + + async cleanDockerPrune( + request?: operations.SettingsCleanDockerPruneRequest | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsCleanDockerPrune( + this, + request, + options, + )); + } + + async cleanAll( + request?: operations.SettingsCleanAllRequest | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsCleanAll( + this, + request, + options, + )); + } + + async cleanMonitoring( + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsCleanMonitoring( + this, + options, + )); + } + + async saveSshPrivateKey( + request: operations.SettingsSaveSSHPrivateKeyRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsSaveSshPrivateKey( + this, + request, + options, + )); + } + + async assignDomainServer( + request: operations.SettingsAssignDomainServerRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsAssignDomainServer( + this, + request, + options, + )); + } + + async cleanSshPrivateKey( + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsCleanSshPrivateKey( + this, + options, + )); + } + + async updateDockerCleanup( + request: operations.SettingsUpdateDockerCleanupRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsUpdateDockerCleanup( + this, + request, + options, + )); + } + + async readTraefikConfig( + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsReadTraefikConfig( + this, + options, + )); + } + + async updateTraefikConfig( + request: operations.SettingsUpdateTraefikConfigRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsUpdateTraefikConfig( + this, + request, + options, + )); + } + + async readWebServerTraefikConfig( + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsReadWebServerTraefikConfig( + this, + options, + )); + } + + async updateWebServerTraefikConfig( + request: operations.SettingsUpdateWebServerTraefikConfigRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsUpdateWebServerTraefikConfig( + this, + request, + options, + )); + } + + async readMiddlewareTraefikConfig( + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsReadMiddlewareTraefikConfig( + this, + options, + )); + } + + async updateMiddlewareTraefikConfig( + request: operations.SettingsUpdateMiddlewareTraefikConfigRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsUpdateMiddlewareTraefikConfig( + this, + request, + options, + )); + } + + async checkAndUpdateImage( + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsCheckAndUpdateImage( + this, + options, + )); + } + + async updateServer( + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsUpdateServer( + this, + options, + )); + } + + async getDokployVersion( + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsGetDokployVersion( + this, + options, + )); + } + + async readDirectories( + request?: operations.SettingsReadDirectoriesRequest | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsReadDirectories( + this, + request, + options, + )); + } + + async updateTraefikFile( + request: operations.SettingsUpdateTraefikFileRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsUpdateTraefikFile( + this, + request, + options, + )); + } + + async readTraefikFile( + request: operations.SettingsReadTraefikFileRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsReadTraefikFile( + this, + request, + options, + )); + } + + async getIp( + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsGetIp( + this, + options, + )); + } + + async getOpenApiDocument( + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsGetOpenApiDocument( + this, + options, + )); + } + + async readTraefikEnv( + request?: operations.SettingsReadTraefikEnvRequest | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsReadTraefikEnv( + this, + request, + options, + )); + } + + async writeTraefikEnv( + request: operations.SettingsWriteTraefikEnvRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsWriteTraefikEnv( + this, + request, + options, + )); + } + + async haveTraefikDashboardPortEnabled( + request?: + | operations.SettingsHaveTraefikDashboardPortEnabledRequest + | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsHaveTraefikDashboardPortEnabled( + this, + request, + options, + )); + } + + async readStats( + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsReadStats( + this, + options, + )); + } + + async getLogRotateStatus( + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsGetLogRotateStatus( + this, + options, + )); + } + + async toggleLogRotate( + request: operations.SettingsToggleLogRotateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsToggleLogRotate( + this, + request, + options, + )); + } + + async haveActivateRequests( + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsHaveActivateRequests( + this, + options, + )); + } + + async toggleRequests( + request: operations.SettingsToggleRequestsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsToggleRequests( + this, + request, + options, + )); + } + + async isCloud( + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsIsCloud( + this, + options, + )); + } + + async health( + options?: RequestOptions, + ): Promise { + return unwrapAsync(settingsHealth( + this, + options, + )); + } +} diff --git a/src/sdk/sshkey.ts b/src/sdk/sshkey.ts new file mode 100644 index 0000000..2e0fa4e --- /dev/null +++ b/src/sdk/sshkey.ts @@ -0,0 +1,58 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { sshKeyGenerate } from "../funcs/sshKeyGenerate.js"; +import { sshKeyGet } from "../funcs/sshKeyGet.js"; +import { sshKeyRemove } from "../funcs/sshKeyRemove.js"; +import { sshKeyUpdate } from "../funcs/sshKeyUpdate.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class SshKey extends ClientSDK { + async remove( + request: operations.SshKeyRemoveRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(sshKeyRemove( + this, + request, + options, + )); + } + + async get( + request: operations.SshKeyOneRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(sshKeyGet( + this, + request, + options, + )); + } + + async generate( + request: operations.SshKeyGenerateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(sshKeyGenerate( + this, + request, + options, + )); + } + + async update( + request: operations.SshKeyUpdateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(sshKeyUpdate( + this, + request, + options, + )); + } +} diff --git a/src/sdk/sshkeys.ts b/src/sdk/sshkeys.ts new file mode 100644 index 0000000..4def590 --- /dev/null +++ b/src/sdk/sshkeys.ts @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { sshKeysAll } from "../funcs/sshKeysAll.js"; +import { sshKeysCreate } from "../funcs/sshKeysCreate.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class SshKeys extends ClientSDK { + async create( + request: operations.SshKeyCreateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(sshKeysCreate( + this, + request, + options, + )); + } + + async all( + options?: RequestOptions, + ): Promise { + return unwrapAsync(sshKeysAll( + this, + options, + )); + } +} diff --git a/src/sdk/stripe.ts b/src/sdk/stripe.ts new file mode 100644 index 0000000..287a665 --- /dev/null +++ b/src/sdk/stripe.ts @@ -0,0 +1,52 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { stripeCanCreateMoreServers } from "../funcs/stripeCanCreateMoreServers.js"; +import { stripeCreateCheckoutSession } from "../funcs/stripeCreateCheckoutSession.js"; +import { stripeCreateCustomerPortalSession } from "../funcs/stripeCreateCustomerPortalSession.js"; +import { stripeGetProducts } from "../funcs/stripeGetProducts.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Stripe extends ClientSDK { + async getProducts( + options?: RequestOptions, + ): Promise { + return unwrapAsync(stripeGetProducts( + this, + options, + )); + } + + async createCheckoutSession( + request: operations.StripeCreateCheckoutSessionRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(stripeCreateCheckoutSession( + this, + request, + options, + )); + } + + async createCustomerPortalSession( + options?: RequestOptions, + ): Promise { + return unwrapAsync(stripeCreateCustomerPortalSession( + this, + options, + )); + } + + async canCreateMoreServers( + options?: RequestOptions, + ): Promise { + return unwrapAsync(stripeCanCreateMoreServers( + this, + options, + )); + } +} diff --git a/src/sdk/user.ts b/src/sdk/user.ts new file mode 100644 index 0000000..5b129fc --- /dev/null +++ b/src/sdk/user.ts @@ -0,0 +1,44 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { userByAuthId } from "../funcs/userByAuthId.js"; +import { userByUserId } from "../funcs/userByUserId.js"; +import { userGetAll } from "../funcs/userGetAll.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class User extends ClientSDK { + async getAll( + options?: RequestOptions, + ): Promise { + return unwrapAsync(userGetAll( + this, + options, + )); + } + + async byAuthId( + request: operations.UserByAuthIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(userByAuthId( + this, + request, + options, + )); + } + + async byUserId( + request: operations.UserByUserIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(userByUserId( + this, + request, + options, + )); + } +} diff --git a/src/types/async.ts b/src/types/async.ts new file mode 100644 index 0000000..689dba5 --- /dev/null +++ b/src/types/async.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export type APICall = + | { + status: "complete"; + request: Request; + response: Response; + } + | { + status: "request-error"; + request: Request; + response?: undefined; + } + | { + status: "invalid"; + request?: undefined; + response?: undefined; + }; + +export class APIPromise implements Promise { + readonly #promise: Promise<[T, APICall]>; + readonly #unwrapped: Promise; + + readonly [Symbol.toStringTag] = "APIPromise"; + + constructor(p: [T, APICall] | Promise<[T, APICall]>) { + this.#promise = p instanceof Promise ? p : Promise.resolve(p); + this.#unwrapped = + p instanceof Promise + ? this.#promise.then(([value]) => value) + : Promise.resolve(p[0]); + } + + then( + onfulfilled?: + | ((value: T) => TResult1 | PromiseLike) + | null + | undefined, + onrejected?: + | ((reason: any) => TResult2 | PromiseLike) + | null + | undefined, + ): Promise { + return this.#promise.then( + onfulfilled ? ([value]) => onfulfilled(value) : void 0, + onrejected, + ); + } + + catch( + onrejected?: + | ((reason: any) => TResult | PromiseLike) + | null + | undefined, + ): Promise { + return this.#unwrapped.catch(onrejected); + } + + finally(onfinally?: (() => void) | null | undefined): Promise { + return this.#unwrapped.finally(onfinally); + } + + $inspect(): Promise<[T, APICall]> { + return this.#promise; + } +} diff --git a/src/types/blobs.ts b/src/types/blobs.ts new file mode 100644 index 0000000..4ce8460 --- /dev/null +++ b/src/types/blobs.ts @@ -0,0 +1,31 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export const blobLikeSchema: z.ZodType = + z.custom(isBlobLike, { + message: "expected a Blob, File or Blob-like object", + fatal: true, + }); + +export function isBlobLike(val: unknown): val is Blob { + if (val instanceof Blob) { + return true; + } + + if (typeof val !== "object" || val == null || !(Symbol.toStringTag in val)) { + return false; + } + + const name = val[Symbol.toStringTag]; + if (typeof name !== "string") { + return false; + } + if (name !== "Blob" && name !== "File") { + return false; + } + + return "stream" in val && typeof val.stream === "function"; +} diff --git a/src/types/constdatetime.ts b/src/types/constdatetime.ts new file mode 100644 index 0000000..eeff4dd --- /dev/null +++ b/src/types/constdatetime.ts @@ -0,0 +1,15 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export function constDateTime( + val: string, +): z.ZodType { + return z.custom((v) => { + return ( + typeof v === "string" && new Date(v).getTime() === new Date(val).getTime() + ); + }, `Value must be equivalent to ${val}`); +} diff --git a/src/types/enums.ts b/src/types/enums.ts new file mode 100644 index 0000000..6fb6d91 --- /dev/null +++ b/src/types/enums.ts @@ -0,0 +1,16 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +declare const __brand: unique symbol; +export type Unrecognized = T & { [__brand]: "unrecognized" }; + +export function catchUnrecognizedEnum(value: T): Unrecognized { + return value as Unrecognized; +} + +type Prettify = { [K in keyof T]: T[K] } & {}; +export type ClosedEnum = T[keyof T]; +export type OpenEnum = + | Prettify + | Unrecognized; diff --git a/src/types/fp.ts b/src/types/fp.ts new file mode 100644 index 0000000..ccbe51e --- /dev/null +++ b/src/types/fp.ts @@ -0,0 +1,50 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +/** + * A monad that captures the result of a function call or an error if it was not + * successful. Railway programming, enabled by this type, can be a nicer + * alternative to traditional exception throwing because it allows functions to + * declare all _known_ errors with static types and then check for them + * exhaustively in application code. Thrown exception have a type of `unknown` + * and break out of regular control flow of programs making them harder to + * inspect and more verbose work with due to try-catch blocks. + */ +export type Result = + | { ok: true; value: T; error?: never } + | { ok: false; value?: never; error: E }; + +export function OK(value: V): Result { + return { ok: true, value }; +} + +export function ERR(error: E): Result { + return { ok: false, error }; +} + +/** + * unwrap is a convenience function for extracting a value from a result or + * throwing if there was an error. + */ +export function unwrap(r: Result): T { + if (!r.ok) { + throw r.error; + } + return r.value; +} + +/** + * unwrapAsync is a convenience function for resolving a value from a Promise + * of a result or rejecting if an error occurred. + */ +export async function unwrapAsync( + pr: Promise>, +): Promise { + const r = await pr; + if (!r.ok) { + throw r.error; + } + + return r.value; +} diff --git a/src/types/index.ts b/src/types/index.ts new file mode 100644 index 0000000..e124e81 --- /dev/null +++ b/src/types/index.ts @@ -0,0 +1,11 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export { blobLikeSchema, isBlobLike } from "./blobs.js"; +export { catchUnrecognizedEnum } from "./enums.js"; +export type { ClosedEnum, OpenEnum, Unrecognized } from "./enums.js"; +export type { Result } from "./fp.js"; +export type { PageIterator, Paginator } from "./operations.js"; +export { createPageIterator } from "./operations.js"; +export { RFCDate } from "./rfcdate.js"; diff --git a/src/types/operations.ts b/src/types/operations.ts new file mode 100644 index 0000000..beb81e1 --- /dev/null +++ b/src/types/operations.ts @@ -0,0 +1,105 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { Result } from "./fp.js"; + +export type Paginator = () => Promise }> | null; + +export type PageIterator = V & { + next: Paginator; + [Symbol.asyncIterator]: () => AsyncIterableIterator; + "~next"?: PageState | undefined; +}; + +export function createPageIterator( + page: V & { next: Paginator }, + halt: (v: V) => boolean, +): { + [Symbol.asyncIterator]: () => AsyncIterableIterator; +} { + return { + [Symbol.asyncIterator]: async function* paginator() { + yield page; + if (halt(page)) { + return; + } + + let p: typeof page | null = page; + for (p = await p.next(); p != null; p = await p.next()) { + yield p; + if (halt(p)) { + return; + } + } + }, + }; +} + +/** + * This utility create a special iterator that yields a single value and + * terminates. It is useful in paginated SDK functions that have early return + * paths when things go wrong. + */ +export function haltIterator( + v: V, +): PageIterator { + return { + ...v, + next: () => null, + [Symbol.asyncIterator]: async function* paginator() { + yield v; + }, + }; +} + +/** + * Converts an async iterator of `Result` into an async iterator of `V`. + * When error results occur, the underlying error value is thrown. + */ +export async function unwrapResultIterator( + iteratorPromise: Promise, PageState>>, +): Promise> { + const resultIter = await iteratorPromise; + + if (!resultIter.ok) { + throw resultIter.error; + } + + return { + ...resultIter.value, + next: unwrapPaginator(resultIter.next), + "~next": resultIter["~next"], + [Symbol.asyncIterator]: async function* paginator() { + for await (const page of resultIter) { + if (!page.ok) { + throw page.error; + } + yield page.value; + } + }, + }; +} + +function unwrapPaginator( + paginator: Paginator>, +): Paginator { + return () => { + const nextResult = paginator(); + if (nextResult == null) { + return null; + } + return nextResult.then((res) => { + if (!res.ok) { + throw res.error; + } + const out = { + ...res.value, + next: unwrapPaginator(res.next), + }; + return out; + }); + }; +} + +export const URL_OVERRIDE = Symbol("URL_OVERRIDE"); diff --git a/src/types/rfcdate.ts b/src/types/rfcdate.ts new file mode 100644 index 0000000..c79b3f5 --- /dev/null +++ b/src/types/rfcdate.ts @@ -0,0 +1,54 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +const dateRE = /^\d{4}-\d{2}-\d{2}$/; + +export class RFCDate { + private serialized: string; + + /** + * Creates a new RFCDate instance using today's date. + */ + static today(): RFCDate { + return new RFCDate(new Date()); + } + + /** + * Creates a new RFCDate instance using the provided input. + * If a string is used then in must be in the format YYYY-MM-DD. + * + * @param date A Date object or a date string in YYYY-MM-DD format + * @example + * new RFCDate("2022-01-01") + * @example + * new RFCDate(new Date()) + */ + constructor(date: Date | string) { + if (typeof date === "string" && !dateRE.test(date)) { + throw new RangeError( + "RFCDate: date strings must be in the format YYYY-MM-DD: " + date, + ); + } + + const value = new Date(date); + if (isNaN(+value)) { + throw new RangeError("RFCDate: invalid date provided: " + date); + } + + this.serialized = value.toISOString().slice(0, "YYYY-MM-DD".length); + if (!dateRE.test(this.serialized)) { + throw new TypeError( + `RFCDate: failed to build valid date with given value: ${date} serialized to ${this.serialized}`, + ); + } + } + + toJSON(): string { + return this.toString(); + } + + toString(): string { + return this.serialized; + } +} diff --git a/src/types/streams.ts b/src/types/streams.ts new file mode 100644 index 0000000..a0163e7 --- /dev/null +++ b/src/types/streams.ts @@ -0,0 +1,21 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export function isReadableStream( + val: unknown, +): val is ReadableStream { + if (typeof val !== "object" || val === null) { + return false; + } + + // Check for the presence of methods specific to ReadableStream + const stream = val as ReadableStream; + + // ReadableStream has methods like getReader, cancel, and tee + return ( + typeof stream.getReader === "function" && + typeof stream.cancel === "function" && + typeof stream.tee === "function" + ); +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..94d81a3 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,41 @@ +{ + "compilerOptions": { + "incremental": true, + "tsBuildInfoFile": ".tsbuildinfo", + "target": "ES2020", + "lib": ["ES2022", "DOM", "DOM.Iterable"], + "jsx": "react-jsx", + + "module": "Node16", + "moduleResolution": "Node16", + + "allowJs": true, + + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "outDir": ".", + + + // https://github.com/tsconfig/bases/blob/a1bf7c0fa2e094b068ca3e1448ca2ece4157977e/bases/strictest.json + "strict": true, + "allowUnusedLabels": false, + "allowUnreachableCode": false, + "exactOptionalPropertyTypes": true, + "useUnknownInCatchVariables": true, + "noFallthroughCasesInSwitch": true, + "noImplicitOverride": true, + "noImplicitReturns": true, + "noPropertyAccessFromIndexSignature": true, + "noUncheckedIndexedAccess": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "isolatedModules": true, + "checkJs": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true + }, + "include": ["src"], + "exclude": ["node_modules"] +}